generated-configure.sh revision 2435:0b6178060b7f
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
666ELF_LIBS
667ELF_CFLAGS
668STLPORT_LIB
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIB_FILE
686ENABLE_LIBFFI_BUNDLING
687LIBFFI_LIBS
688LIBFFI_CFLAGS
689ALSA_LIBS
690ALSA_CFLAGS
691FREETYPE_BUNDLE_LIB_PATH
692FREETYPE_LIBS
693FREETYPE_CFLAGS
694CUPS_CFLAGS
695X_EXTRA_LIBS
696X_LIBS
697X_PRE_LIBS
698X_CFLAGS
699XMKMF
700MSVCP_DLL
701MSVCR_DLL
702LIBCXX
703FIXPATH_DETACH_FLAG
704FIXPATH
705BUILD_GTEST
706ENABLE_AOT
707INCLUDE_DTRACE
708GCOV_ENABLED
709ZIP_EXTERNAL_DEBUG_SYMBOLS
710COPY_DEBUG_SYMBOLS
711COMPILE_WITH_DEBUG_SYMBOLS
712CFLAGS_WARNINGS_ARE_ERRORS
713BUILD_CC_DISABLE_WARNING_PREFIX
714DISABLE_WARNING_PREFIX
715HOTSPOT_SET_WARNINGS_AS_ERRORS
716WARNINGS_AS_ERRORS
717COMPILER_SUPPORTS_TARGET_BITS_FLAG
718ZERO_ARCHFLAG
719LDFLAGS_TESTEXE
720LDFLAGS_TESTLIB
721CXXFLAGS_TESTEXE
722CXXFLAGS_TESTLIB
723CFLAGS_TESTEXE
724CFLAGS_TESTLIB
725OPENJDK_BUILD_JVM_LIBS
726OPENJDK_BUILD_JVM_ASFLAGS
727OPENJDK_BUILD_JVM_LDFLAGS
728OPENJDK_BUILD_JVM_CFLAGS
729OPENJDK_BUILD_LDFLAGS_HASH_STYLE
730OPENJDK_BUILD_LDFLAGS_CXX_JDK
731OPENJDK_BUILD_JDKEXE_LIBS
732OPENJDK_BUILD_JDKLIB_LIBS
733OPENJDK_BUILD_LDFLAGS_JDKEXE
734OPENJDK_BUILD_LDFLAGS_JDKLIB
735OPENJDK_BUILD_CXXFLAGS_JDKEXE
736OPENJDK_BUILD_CXXFLAGS_JDKLIB
737OPENJDK_BUILD_CFLAGS_JDKEXE
738OPENJDK_BUILD_CFLAGS_JDKLIB
739OPENJDK_BUILD_CXXSTD_CXXFLAG
740JVM_LIBS
741JVM_ASFLAGS
742JVM_LDFLAGS
743JVM_CFLAGS
744LDFLAGS_HASH_STYLE
745LDFLAGS_CXX_JDK
746JDKEXE_LIBS
747JDKLIB_LIBS
748LDFLAGS_JDKEXE
749LDFLAGS_JDKLIB
750CXXFLAGS_JDKEXE
751CXXFLAGS_JDKLIB
752CFLAGS_JDKEXE
753CFLAGS_JDKLIB
754MACOSX_VERSION_MIN
755CXXSTD_CXXFLAG
756JDK_ARCH_ABI_PROP_NAME
757CXX_O_FLAG_SIZE
758CXX_O_FLAG_NONE
759CXX_O_FLAG_DEBUG
760CXX_O_FLAG_NORM
761CXX_O_FLAG_HI
762CXX_O_FLAG_HIGHEST
763CXX_O_FLAG_HIGHEST_JVM
764C_O_FLAG_SIZE
765C_O_FLAG_NONE
766C_O_FLAG_DEBUG
767C_O_FLAG_NORM
768C_O_FLAG_HI
769C_O_FLAG_HIGHEST
770C_O_FLAG_HIGHEST_JVM
771JVM_CFLAGS_SYMBOLS
772CXXFLAGS_DEBUG_SYMBOLS
773CFLAGS_DEBUG_SYMBOLS
774CXX_FLAG_DEPS
775C_FLAG_DEPS
776SHARED_LIBRARY_FLAGS
777SET_SHARED_LIBRARY_MAPFILE
778SET_SHARED_LIBRARY_NAME
779SET_SHARED_LIBRARY_ORIGIN
780SET_EXECUTABLE_ORIGIN
781CXX_FLAG_REORDER
782C_FLAG_REORDER
783JVM_RCFLAGS
784RC_FLAGS
785AR_OUT_OPTION
786LD_OUT_OPTION
787EXE_OUT_OPTION
788CC_OUT_OPTION
789STRIPFLAGS
790ARFLAGS
791COMPILER_BINDCMD_FILE_FLAG
792COMPILER_COMMAND_FILE_FLAG
793COMPILER_TARGET_BITS_FLAG
794JT_HOME
795JTREGEXE
796HOTSPOT_TOOLCHAIN_TYPE
797USING_BROKEN_SUSE_LD
798PACKAGE_PATH
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857EXE_SUFFIX
858OBJ_SUFFIX
859STATIC_LIBRARY
860SHARED_LIBRARY
861STATIC_LIBRARY_SUFFIX
862SHARED_LIBRARY_SUFFIX
863LIBRARY_PREFIX
864TOOLCHAIN_TYPE
865STATIC_BUILD
866IMPORT_MODULES_MAKE
867IMPORT_MODULES_SRC
868IMPORT_MODULES_MAN
869IMPORT_MODULES_LEGAL
870IMPORT_MODULES_CONF
871IMPORT_MODULES_LIBS
872IMPORT_MODULES_CMDS
873IMPORT_MODULES_CLASSES
874BUILD_OUTPUT
875JDK_TOPDIR
876NASHORN_TOPDIR
877HOTSPOT_TOPDIR
878JAXWS_TOPDIR
879JAXP_TOPDIR
880CORBA_TOPDIR
881LANGTOOLS_TOPDIR
882EXTERNAL_BUILDJDK
883BUILD_JDK
884CREATE_BUILDJDK
885JLINK
886JMOD
887BOOT_JDK_BITS
888JAVAC_FLAGS
889BOOT_JDK_MODULAR
890BOOT_JDK_SOURCETARGET
891JARSIGNER
892JAR
893JAVAH
894JAVAC
895JAVA
896BOOT_JDK
897JAVA_CHECK
898JAVAC_CHECK
899VERSION_IS_GA
900VERSION_SHORT
901VERSION_STRING
902VERSION_NUMBER_FOUR_POSITIONS
903VERSION_NUMBER
904VERSION_OPT
905VERSION_BUILD
906VERSION_PRE
907VERSION_PATCH
908VERSION_SECURITY
909VERSION_MINOR
910VERSION_MAJOR
911MACOSX_BUNDLE_ID_BASE
912MACOSX_BUNDLE_NAME_BASE
913HOTSPOT_VM_DISTRO
914COMPANY_NAME
915JDK_RC_PLATFORM_NAME
916PRODUCT_SUFFIX
917PRODUCT_NAME
918LAUNCHER_NAME
919JLINK_KEEP_PACKAGED_MODULES
920COPYRIGHT_YEAR
921COMPRESS_JARS
922INCLUDE_SA
923UNLIMITED_CRYPTO
924CACERTS_FILE
925ENABLE_HEADLESS_ONLY
926DEFAULT_MAKE_TARGET
927OS_VERSION_MICRO
928OS_VERSION_MINOR
929OS_VERSION_MAJOR
930PKG_CONFIG
931BASH_ARGS
932SETFILE
933CODESIGN
934XATTR
935DSYMUTIL
936IS_GNU_TIME
937PATCH
938DTRACE
939TIME
940STAT
941HG
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
977ZERO_ARCHDEF
978HOTSPOT_BUILD_CPU_DEFINE
979HOTSPOT_BUILD_CPU_ARCH
980HOTSPOT_BUILD_CPU
981HOTSPOT_BUILD_OS_TYPE
982HOTSPOT_BUILD_OS
983OPENJDK_BUILD_BUNDLE_PLATFORM
984OPENJDK_BUILD_CPU_BUNDLE
985OPENJDK_BUILD_OS_BUNDLE
986OPENJDK_BUILD_OS_EXPORT_DIR
987OPENJDK_BUILD_CPU_OSARCH
988OPENJDK_BUILD_CPU_ISADIR
989OPENJDK_BUILD_CPU_LEGACY_LIB
990OPENJDK_BUILD_CPU_LEGACY
991HOTSPOT_TARGET_CPU_DEFINE
992HOTSPOT_TARGET_CPU_ARCH
993HOTSPOT_TARGET_CPU
994HOTSPOT_TARGET_OS_TYPE
995HOTSPOT_TARGET_OS
996DEFINE_CROSS_COMPILE_ARCH
997LP64
998OPENJDK_TARGET_BUNDLE_PLATFORM
999OPENJDK_TARGET_CPU_BUNDLE
1000OPENJDK_TARGET_OS_BUNDLE
1001OPENJDK_TARGET_OS_EXPORT_DIR
1002OPENJDK_TARGET_CPU_OSARCH
1003OPENJDK_TARGET_CPU_ISADIR
1004OPENJDK_TARGET_CPU_LEGACY_LIB
1005OPENJDK_TARGET_CPU_LEGACY
1006REQUIRED_OS_VERSION
1007REQUIRED_OS_NAME
1008COMPILE_TYPE
1009OPENJDK_TARGET_CPU_ENDIAN
1010OPENJDK_TARGET_CPU_BITS
1011OPENJDK_TARGET_CPU_ARCH
1012OPENJDK_TARGET_CPU
1013OPENJDK_TARGET_OS_ENV
1014OPENJDK_TARGET_OS_TYPE
1015OPENJDK_TARGET_OS
1016OPENJDK_BUILD_CPU_ENDIAN
1017OPENJDK_BUILD_CPU_BITS
1018OPENJDK_BUILD_CPU_ARCH
1019OPENJDK_BUILD_CPU
1020OPENJDK_BUILD_OS_ENV
1021OPENJDK_BUILD_OS_TYPE
1022OPENJDK_BUILD_OS
1023OPENJDK_BUILD_AUTOCONF_NAME
1024OPENJDK_TARGET_AUTOCONF_NAME
1025target_os
1026target_vendor
1027target_cpu
1028target
1029host_os
1030host_vendor
1031host_cpu
1032host
1033build_os
1034build_vendor
1035build_cpu
1036build
1037NICE
1038CPIO
1039DF
1040READLINK
1041CYGPATH
1042SED
1043FGREP
1044EGREP
1045GREP
1046AWK
1047XARGS
1048WHICH
1049WC
1050UNIQ
1051UNAME
1052TR
1053TOUCH
1054TEE
1055TAR
1056TAIL
1057SORT
1058SH
1059RMDIR
1060RM
1061PRINTF
1062NAWK
1063MV
1064MKTEMP
1065MKDIR
1066LS
1067LN
1068GZIP
1069GUNZIP
1070HEAD
1071FIND
1072FILE
1073EXPR
1074ECHO
1075DIRNAME
1076DIFF
1077DATE
1078CUT
1079CP
1080COMM
1081CMP
1082CHMOD
1083CAT
1084BASH
1085BASENAME
1086DATE_WHEN_CONFIGURED
1087ORIGINAL_PATH
1088CONFIGURE_COMMAND_LINE
1089target_alias
1090host_alias
1091build_alias
1092LIBS
1093ECHO_T
1094ECHO_N
1095ECHO_C
1096DEFS
1097mandir
1098localedir
1099libdir
1100psdir
1101pdfdir
1102dvidir
1103htmldir
1104infodir
1105docdir
1106oldincludedir
1107includedir
1108localstatedir
1109sharedstatedir
1110sysconfdir
1111datadir
1112datarootdir
1113libexecdir
1114sbindir
1115bindir
1116program_transform_name
1117prefix
1118exec_prefix
1119PACKAGE_URL
1120PACKAGE_BUGREPORT
1121PACKAGE_STRING
1122PACKAGE_VERSION
1123PACKAGE_TARNAME
1124PACKAGE_NAME
1125PATH_SEPARATOR
1126SHELL'
1127ac_subst_files=''
1128ac_user_opts='
1129enable_option_checking
1130with_target_bits
1131enable_openjdk_only
1132with_custom_make_dir
1133with_jdk_variant
1134enable_debug
1135with_debug_level
1136with_jvm_variants
1137with_cpu_port
1138with_devkit
1139with_sys_root
1140with_sysroot
1141with_tools_dir
1142with_toolchain_path
1143with_extra_path
1144with_sdk_name
1145with_conf_name
1146with_output_sync
1147with_default_make_target
1148enable_headless_only
1149with_cacerts_file
1150enable_unlimited_crypto
1151with_copyright_year
1152enable_keep_packaged_modules
1153with_milestone
1154with_update_version
1155with_user_release_suffix
1156with_build_number
1157with_version_string
1158with_version_pre
1159with_version_opt
1160with_version_build
1161with_version_major
1162with_version_minor
1163with_version_security
1164with_version_patch
1165with_boot_jdk
1166with_build_jdk
1167with_add_source_root
1168with_override_source_root
1169with_adds_and_overrides
1170with_override_langtools
1171with_override_corba
1172with_override_jaxp
1173with_override_jaxws
1174with_override_hotspot
1175with_override_nashorn
1176with_override_jdk
1177with_import_hotspot
1178with_import_modules
1179enable_static_build
1180with_toolchain_type
1181with_extra_cflags
1182with_extra_cxxflags
1183with_extra_ldflags
1184with_toolchain_version
1185with_build_devkit
1186with_jtreg
1187with_abi_profile
1188enable_warnings_as_errors
1189with_native_debug_symbols
1190enable_debug_symbols
1191enable_zip_debug_info
1192enable_native_coverage
1193enable_dtrace
1194enable_aot
1195enable_hotspot_gtest
1196with_stdc__lib
1197with_msvcr_dll
1198with_msvcp_dll
1199with_x
1200with_cups
1201with_cups_include
1202with_freetype
1203with_freetype_include
1204with_freetype_lib
1205with_freetype_src
1206enable_freetype_bundling
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_libelf
1223with_libelf_include
1224with_libelf_lib
1225with_jvm_features
1226with_jvm_interpreter
1227enable_jtreg_failure_handler
1228enable_generate_classlist
1229with_num_cores
1230with_memory_size
1231with_jobs
1232with_test_jobs
1233with_boot_jdk_jvmargs
1234with_sjavac_server_java
1235enable_sjavac
1236enable_javac_server
1237enable_icecc
1238enable_precompiled_headers
1239enable_ccache
1240with_ccache_dir
1241'
1242      ac_precious_vars='build_alias
1243host_alias
1244target_alias
1245BASENAME
1246BASH
1247CAT
1248CHMOD
1249CMP
1250COMM
1251CP
1252CUT
1253DATE
1254DIFF
1255DIRNAME
1256ECHO
1257EXPR
1258FILE
1259FIND
1260HEAD
1261GUNZIP
1262GZIP
1263LN
1264LS
1265MKDIR
1266MKTEMP
1267MV
1268NAWK
1269PRINTF
1270RM
1271RMDIR
1272SH
1273SORT
1274TAIL
1275TAR
1276TEE
1277TOUCH
1278TR
1279UNAME
1280UNIQ
1281WC
1282WHICH
1283XARGS
1284AWK
1285GREP
1286EGREP
1287FGREP
1288SED
1289CYGPATH
1290READLINK
1291DF
1292CPIO
1293NICE
1294MAKE
1295UNZIP
1296ZIPEXE
1297LDD
1298OTOOL
1299READELF
1300HG
1301STAT
1302TIME
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
1351ELF_CFLAGS
1352ELF_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --enable-headless-only  only build headless (no GUI) support [disabled]
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-abi-profile      specify ABI profile for ARM builds
2129                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2130                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2131                          [toolchain dependent]
2132  --with-native-debug-symbols
2133                          set the native debug symbol configuration (none,
2134                          internal, external, zipped) [varying]
2135  --with-stdc++lib=<static>,<dynamic>,<default>
2136                          force linking of the C++ runtime on Linux to either
2137                          static or dynamic, default is static with dynamic as
2138                          fallback
2139  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2140                          (Windows only) [probed]
2141  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2142                          (Windows only) [probed]
2143  --with-x                use the X Window System
2144  --with-cups             specify prefix directory for the cups package
2145                          (expecting the headers under PATH/include)
2146  --with-cups-include     specify directory for the cups include files
2147  --with-freetype         specify prefix directory for the freetype package
2148                          (expecting the libraries under PATH/lib and the
2149                          headers under PATH/include)
2150  --with-freetype-include specify directory for the freetype include files
2151  --with-freetype-lib     specify directory for the freetype library
2152  --with-freetype-src     specify directory with freetype sources to
2153                          automatically build the library (experimental,
2154                          Windows-only)
2155  --with-alsa             specify prefix directory for the alsa package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-alsa-include     specify directory for the alsa include files
2159  --with-alsa-lib         specify directory for the alsa library
2160  --with-libffi           specify prefix directory for the libffi package
2161                          (expecting the libraries under PATH/lib and the
2162                          headers under PATH/include)
2163  --with-libffi-include   specify directory for the libffi include files
2164  --with-libffi-lib       specify directory for the libffi library
2165  --with-libjpeg          use libjpeg from build system or OpenJDK source
2166                          (system, bundled) [bundled]
2167  --with-giflib           use giflib from build system or OpenJDK source
2168                          (system, bundled) [bundled]
2169  --with-libpng           use libpng from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-zlib             use zlib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-lcms             use lcms2 from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-dxsdk            Deprecated. Option is kept for backwards
2176                          compatibility and is ignored
2177  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2178                          compatibility and is ignored
2179  --with-dxsdk-include    Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-libelf           specify prefix directory for the libelf package
2182                          (expecting the libraries under PATH/lib and the
2183                          headers under PATH/include)
2184  --with-libelf-include   specify directory for the libelf include files
2185  --with-libelf-lib       specify directory for the libelf library
2186  --with-jvm-features     additional JVM features to enable (separated by
2187                          comma), use '--help' to show possible values [none]
2188  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2189                          compatibility and is ignored
2190  --with-num-cores        number of cores in the build system, e.g.
2191                          --with-num-cores=8 [probed]
2192  --with-memory-size      memory (in MB) available in the build system, e.g.
2193                          --with-memory-size=1024 [probed]
2194  --with-jobs             number of parallel jobs to let make run [calculated
2195                          based on cores and memory]
2196  --with-test-jobs        number of parallel tests jobs to run [based on build
2197                          jobs]
2198  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2199                          invocations of boot JDK, overriding the default
2200                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2201                          -enableassertions"
2202  --with-sjavac-server-java
2203                          use this java binary for running the sjavac
2204                          background server [Boot JDK java]
2205  --with-ccache-dir       where to store ccache files [~/.ccache]
2206
2207Some influential environment variables:
2208  BASENAME    Override default value for BASENAME
2209  BASH        Override default value for BASH
2210  CAT         Override default value for CAT
2211  CHMOD       Override default value for CHMOD
2212  CMP         Override default value for CMP
2213  COMM        Override default value for COMM
2214  CP          Override default value for CP
2215  CUT         Override default value for CUT
2216  DATE        Override default value for DATE
2217  DIFF        Override default value for DIFF
2218  DIRNAME     Override default value for DIRNAME
2219  ECHO        Override default value for ECHO
2220  EXPR        Override default value for EXPR
2221  FILE        Override default value for FILE
2222  FIND        Override default value for FIND
2223  HEAD        Override default value for HEAD
2224  GUNZIP      Override default value for GUNZIP
2225  GZIP        Override default value for GZIP
2226  LN          Override default value for LN
2227  LS          Override default value for LS
2228  MKDIR       Override default value for MKDIR
2229  MKTEMP      Override default value for MKTEMP
2230  MV          Override default value for MV
2231  NAWK        Override default value for NAWK
2232  PRINTF      Override default value for PRINTF
2233  RM          Override default value for RM
2234  RMDIR       Override default value for RMDIR
2235  SH          Override default value for SH
2236  SORT        Override default value for SORT
2237  TAIL        Override default value for TAIL
2238  TAR         Override default value for TAR
2239  TEE         Override default value for TEE
2240  TOUCH       Override default value for TOUCH
2241  TR          Override default value for TR
2242  UNAME       Override default value for UNAME
2243  UNIQ        Override default value for UNIQ
2244  WC          Override default value for WC
2245  WHICH       Override default value for WHICH
2246  XARGS       Override default value for XARGS
2247  AWK         Override default value for AWK
2248  GREP        Override default value for GREP
2249  EGREP       Override default value for EGREP
2250  FGREP       Override default value for FGREP
2251  SED         Override default value for SED
2252  CYGPATH     Override default value for CYGPATH
2253  READLINK    Override default value for READLINK
2254  DF          Override default value for DF
2255  CPIO        Override default value for CPIO
2256  NICE        Override default value for NICE
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  HG          Override default value for HG
2264  STAT        Override default value for STAT
2265  TIME        Override default value for TIME
2266  DTRACE      Override default value for DTRACE
2267  PATCH       Override default value for PATCH
2268  DSYMUTIL    Override default value for DSYMUTIL
2269  XATTR       Override default value for XATTR
2270  CODESIGN    Override default value for CODESIGN
2271  SETFILE     Override default value for SETFILE
2272  PKG_CONFIG  path to pkg-config utility
2273  JAVA        Override default value for JAVA
2274  JAVAC       Override default value for JAVAC
2275  JAVAH       Override default value for JAVAH
2276  JAR         Override default value for JAR
2277  JARSIGNER   Override default value for JARSIGNER
2278  CC          C compiler command
2279  CFLAGS      C compiler flags
2280  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2281              nonstandard directory <lib dir>
2282  LIBS        libraries to pass to the linker, e.g. -l<library>
2283  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2284              you have headers in a nonstandard directory <include dir>
2285  CXX         C++ compiler command
2286  CXXFLAGS    C++ compiler flags
2287  CPP         C preprocessor
2288  CXXCPP      C++ preprocessor
2289  AS          Override default value for AS
2290  AR          Override default value for AR
2291  LIPO        Override default value for LIPO
2292  STRIP       Override default value for STRIP
2293  NM          Override default value for NM
2294  GNM         Override default value for GNM
2295  OBJCOPY     Override default value for OBJCOPY
2296  OBJDUMP     Override default value for OBJDUMP
2297  BUILD_CC    Override default value for BUILD_CC
2298  BUILD_CXX   Override default value for BUILD_CXX
2299  BUILD_NM    Override default value for BUILD_NM
2300  BUILD_AR    Override default value for BUILD_AR
2301  BUILD_OBJCOPY
2302              Override default value for BUILD_OBJCOPY
2303  BUILD_STRIP Override default value for BUILD_STRIP
2304  JTREGEXE    Override default value for JTREGEXE
2305  XMKMF       Path to xmkmf, Makefile generator for X Window System
2306  FREETYPE_CFLAGS
2307              C compiler flags for FREETYPE, overriding pkg-config
2308  FREETYPE_LIBS
2309              linker flags for FREETYPE, overriding pkg-config
2310  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2311  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2312  LIBFFI_CFLAGS
2313              C compiler flags for LIBFFI, overriding pkg-config
2314  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2315  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2316  PNG_LIBS    linker flags for PNG, overriding pkg-config
2317  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2318  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2319  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2320  ELF_LIBS    linker flags for ELF, 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, 2016, 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, 2016, 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, 2016, 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, 2016, 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, 2016, 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# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4787# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4788#
4789# This code is free software; you can redistribute it and/or modify it
4790# under the terms of the GNU General Public License version 2 only, as
4791# published by the Free Software Foundation.  Oracle designates this
4792# particular file as subject to the "Classpath" exception as provided
4793# by Oracle in the LICENSE file that accompanied this code.
4794#
4795# This code is distributed in the hope that it will be useful, but WITHOUT
4796# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4797# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4798# version 2 for more details (a copy is included in the LICENSE file that
4799# accompanied this code).
4800#
4801# You should have received a copy of the GNU General Public License version
4802# 2 along with this work; if not, write to the Free Software Foundation,
4803# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4804#
4805# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4806# or visit www.oracle.com if you need additional information or have any
4807# questions.
4808#
4809
4810################################################################################
4811# Setup libelf (ELF library)
4812################################################################################
4813
4814
4815
4816################################################################################
4817# Determine which libraries are needed for this configuration
4818################################################################################
4819
4820
4821################################################################################
4822# Parse library options, and setup needed libraries
4823################################################################################
4824
4825
4826################################################################################
4827# Setup llvm (Low-Level VM)
4828################################################################################
4829
4830
4831################################################################################
4832# Setup various libraries, typically small system libraries
4833################################################################################
4834
4835
4836################################################################################
4837# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4838# redistribute it in the test image.
4839################################################################################
4840
4841
4842
4843#
4844# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4845# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4846#
4847# This code is free software; you can redistribute it and/or modify it
4848# under the terms of the GNU General Public License version 2 only, as
4849# published by the Free Software Foundation.  Oracle designates this
4850# particular file as subject to the "Classpath" exception as provided
4851# by Oracle in the LICENSE file that accompanied this code.
4852#
4853# This code is distributed in the hope that it will be useful, but WITHOUT
4854# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4855# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4856# version 2 for more details (a copy is included in the LICENSE file that
4857# accompanied this code).
4858#
4859# You should have received a copy of the GNU General Public License version
4860# 2 along with this work; if not, write to the Free Software Foundation,
4861# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4862#
4863# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4864# or visit www.oracle.com if you need additional information or have any
4865# questions.
4866#
4867
4868# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4869# Converts autoconf style CPU name to OpenJDK style, into
4870# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4871
4872
4873# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4874# Converts autoconf style OS name to OpenJDK style, into
4875# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4876
4877
4878# Expects $host_os $host_cpu $build_os and $build_cpu
4879# and $with_target_bits to have been setup!
4880#
4881# Translate the standard triplet(quadruplet) definition
4882# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4883# OPENJDK_BUILD_OS, etc.
4884
4885
4886# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4887# accordingly. Must be done after setting up build and target system, but before
4888# doing anything else with these values.
4889
4890
4891# Setup the legacy variables, for controlling the old makefiles.
4892#
4893
4894
4895# $1 - Either TARGET or BUILD to setup the variables for.
4896
4897
4898
4899
4900#%%% Build and target systems %%%
4901
4902
4903
4904
4905# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4906# Add -mX to various FLAGS variables.
4907
4908
4909
4910
4911
4912
4913#
4914# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4915# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4916#
4917# This code is free software; you can redistribute it and/or modify it
4918# under the terms of the GNU General Public License version 2 only, as
4919# published by the Free Software Foundation.  Oracle designates this
4920# particular file as subject to the "Classpath" exception as provided
4921# by Oracle in the LICENSE file that accompanied this code.
4922#
4923# This code is distributed in the hope that it will be useful, but WITHOUT
4924# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4925# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4926# version 2 for more details (a copy is included in the LICENSE file that
4927# accompanied this code).
4928#
4929# You should have received a copy of the GNU General Public License version
4930# 2 along with this work; if not, write to the Free Software Foundation,
4931# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4932#
4933# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4934# or visit www.oracle.com if you need additional information or have any
4935# questions.
4936#
4937
4938
4939
4940
4941
4942
4943
4944################################################################################
4945# Define a mechanism for importing extra prebuilt modules
4946#
4947
4948
4949
4950#
4951# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4952# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4953#
4954# This code is free software; you can redistribute it and/or modify it
4955# under the terms of the GNU General Public License version 2 only, as
4956# published by the Free Software Foundation.  Oracle designates this
4957# particular file as subject to the "Classpath" exception as provided
4958# by Oracle in the LICENSE file that accompanied this code.
4959#
4960# This code is distributed in the hope that it will be useful, but WITHOUT
4961# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4962# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4963# version 2 for more details (a copy is included in the LICENSE file that
4964# accompanied this code).
4965#
4966# You should have received a copy of the GNU General Public License version
4967# 2 along with this work; if not, write to the Free Software Foundation,
4968# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4969#
4970# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4971# or visit www.oracle.com if you need additional information or have any
4972# questions.
4973#
4974
4975########################################################################
4976# This file is responsible for detecting, verifying and setting up the
4977# toolchain, i.e. the compiler, linker and related utilities. It will setup
4978# proper paths to the binaries, but it will not setup any flags.
4979#
4980# The binaries used is determined by the toolchain type, which is the family of
4981# compilers and related tools that are used.
4982########################################################################
4983
4984
4985# All valid toolchains, regardless of platform (used by help.m4)
4986VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4987
4988# These toolchains are valid on different platforms
4989VALID_TOOLCHAINS_linux="gcc clang"
4990VALID_TOOLCHAINS_solaris="solstudio"
4991VALID_TOOLCHAINS_macosx="gcc clang"
4992VALID_TOOLCHAINS_aix="xlc"
4993VALID_TOOLCHAINS_windows="microsoft"
4994
4995# Toolchain descriptions
4996TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4997TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4998TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4999TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5000TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5001
5002# Minimum supported versions, empty means unspecified
5003TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5004TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5005TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5006TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5007TOOLCHAIN_MINIMUM_VERSION_xlc=""
5008
5009# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5010# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5011# $1 - optional variable prefix for compiler and version variables (BUILD_)
5012# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5013
5014
5015# Check if the configured compiler (C and C++) is of a specific version or
5016# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5017#
5018# Arguments:
5019#   VERSION:   The version string to check against the found version
5020#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5021#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5022#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5023
5024
5025
5026
5027# Setup a number of variables describing how native output files are
5028# named on this platform/toolchain.
5029
5030
5031# Determine which toolchain type to use, and make sure it is valid for this
5032# platform. Setup various information about the selected toolchain.
5033
5034
5035# Before we start detecting the toolchain executables, we might need some
5036# special setup, e.g. additional paths etc.
5037
5038
5039# Restore path, etc
5040
5041
5042# Check if a compiler is of the toolchain type we expect, and save the version
5043# information from it. If the compiler does not match the expected type,
5044# this function will abort using AC_MSG_ERROR. If it matches, the version will
5045# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5046# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5047#
5048# $1 = compiler to test (CC or CXX)
5049# $2 = human readable name of compiler (C or C++)
5050
5051
5052# Try to locate the given C or C++ compiler in the path, or otherwise.
5053#
5054# $1 = compiler to test (CC or CXX)
5055# $2 = human readable name of compiler (C or C++)
5056# $3 = list of compiler names to search for
5057
5058
5059# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5060# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5061# archiver (AR). Verify that the compilers are correct according to the
5062# toolchain type.
5063
5064
5065# Setup additional tools that is considered a part of the toolchain, but not the
5066# core part. Many of these are highly platform-specific and do not exist,
5067# and/or are not needed on all platforms.
5068
5069
5070# Setup the build tools (i.e, the compiler and linker used to build programs
5071# that should be run on the build platform, not the target platform, as a build
5072# helper). Since the non-cross-compile case uses the normal, target compilers
5073# for this, we can only do this after these have been setup.
5074
5075
5076# Do some additional checks on the detected tools.
5077
5078
5079# Setup the JTReg Regression Test Harness.
5080
5081
5082#
5083# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5084# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5085#
5086# This code is free software; you can redistribute it and/or modify it
5087# under the terms of the GNU General Public License version 2 only, as
5088# published by the Free Software Foundation.  Oracle designates this
5089# particular file as subject to the "Classpath" exception as provided
5090# by Oracle in the LICENSE file that accompanied this code.
5091#
5092# This code is distributed in the hope that it will be useful, but WITHOUT
5093# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5094# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5095# version 2 for more details (a copy is included in the LICENSE file that
5096# accompanied this code).
5097#
5098# You should have received a copy of the GNU General Public License version
5099# 2 along with this work; if not, write to the Free Software Foundation,
5100# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5101#
5102# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5103# or visit www.oracle.com if you need additional information or have any
5104# questions.
5105#
5106
5107################################################################################
5108# The order of these defines the priority by which we try to find them.
5109VALID_VS_VERSIONS="2013 2012 2010"
5110
5111VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5112VS_VERSION_INTERNAL_2010=100
5113VS_MSVCR_2010=msvcr100.dll
5114# We don't use msvcp on Visual Studio 2010
5115#VS_MSVCP_2010=msvcp100.dll
5116VS_ENVVAR_2010="VS100COMNTOOLS"
5117VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5118VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5119VS_VS_PLATFORM_NAME_2010="v100"
5120VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5121
5122VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5123VS_VERSION_INTERNAL_2012=110
5124VS_MSVCR_2012=msvcr110.dll
5125VS_MSVCP_2012=msvcp110.dll
5126VS_ENVVAR_2012="VS110COMNTOOLS"
5127VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5128VS_SDK_INSTALLDIR_2012=
5129VS_VS_PLATFORM_NAME_2012="v110"
5130VS_SDK_PLATFORM_NAME_2012=
5131
5132VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5133VS_VERSION_INTERNAL_2013=120
5134VS_MSVCR_2013=msvcr120.dll
5135VS_MSVCP_2013=msvcp120.dll
5136VS_ENVVAR_2013="VS120COMNTOOLS"
5137VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5138VS_SDK_INSTALLDIR_2013=
5139VS_VS_PLATFORM_NAME_2013="v120"
5140VS_SDK_PLATFORM_NAME_2013=
5141
5142################################################################################
5143
5144
5145
5146################################################################################
5147
5148
5149
5150################################################################################
5151# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5152# build environment and assigns it to VS_ENV_CMD
5153
5154
5155################################################################################
5156
5157
5158
5159################################################################################
5160# Check if the VS env variables were setup prior to running configure.
5161# If not, then find vcvarsall.bat and run it automatically, and integrate
5162# the set env variables into the spec file.
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177# This line needs to be here, verbatim, after all includes and the dummy hook
5178# definitions. It is replaced with custom functionality when building
5179# custom sources.
5180#CUSTOM_AUTOCONF_INCLUDE
5181
5182# Do not change or remove the following line, it is needed for consistency checks:
5183DATE_WHEN_GENERATED=1484228046
5184
5185###############################################################################
5186#
5187# Initialization / Boot-strapping
5188#
5189# The bootstrapping process needs to solve the "chicken or the egg" problem,
5190# thus it jumps back and forth, each time gaining something needed later on.
5191#
5192###############################################################################
5193
5194# If we are requested to print additional help, do that and then exit.
5195# This must be the very first call.
5196
5197  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5198
5199    # Print available toolchains
5200    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5201    $PRINTF "Which are valid to use depends on the build platform.\n"
5202    for toolchain in $VALID_TOOLCHAINS_all; do
5203      # Use indirect variable referencing
5204      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5205      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5206      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5207    done
5208    $PRINTF "\n"
5209
5210    # Print available jvm features
5211    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5212    $PRINTF "Which are valid to use depends on the target platform.\n  "
5213    $PRINTF "%s " $VALID_JVM_FEATURES
5214    $PRINTF "\n"
5215
5216    # And now exit directly
5217    exit 0
5218  fi
5219
5220
5221# Basic initialization that must happen first of all in the normal process.
5222
5223  # Save the original command line. This is passed to us by the wrapper configure script.
5224
5225  # Save the path variable before it gets changed
5226  ORIGINAL_PATH="$PATH"
5227
5228  DATE_WHEN_CONFIGURED=`LANG=C date`
5229
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5231$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5233$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5234
5235
5236  # Start with tools that do not need have cross compilation support
5237  # and can be expected to be found in the default PATH. These tools are
5238  # used by configure.
5239
5240  # First are all the simple required tools.
5241
5242
5243
5244  # Publish this variable in the help.
5245
5246
5247  if [ -z "${BASENAME+x}" ]; then
5248    # The variable is not set by user, try to locate tool using the code snippet
5249    for ac_prog in basename
5250do
5251  # Extract the first word of "$ac_prog", so it can be a program name with args.
5252set dummy $ac_prog; ac_word=$2
5253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5254$as_echo_n "checking for $ac_word... " >&6; }
5255if ${ac_cv_path_BASENAME+:} false; then :
5256  $as_echo_n "(cached) " >&6
5257else
5258  case $BASENAME in
5259  [\\/]* | ?:[\\/]*)
5260  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5261  ;;
5262  *)
5263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5264for as_dir in $PATH
5265do
5266  IFS=$as_save_IFS
5267  test -z "$as_dir" && as_dir=.
5268    for ac_exec_ext in '' $ac_executable_extensions; do
5269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5270    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5272    break 2
5273  fi
5274done
5275  done
5276IFS=$as_save_IFS
5277
5278  ;;
5279esac
5280fi
5281BASENAME=$ac_cv_path_BASENAME
5282if test -n "$BASENAME"; then
5283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5284$as_echo "$BASENAME" >&6; }
5285else
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5287$as_echo "no" >&6; }
5288fi
5289
5290
5291  test -n "$BASENAME" && break
5292done
5293
5294  else
5295    # The variable is set, but is it from the command line or the environment?
5296
5297    # Try to remove the string !BASENAME! from our list.
5298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5300      # If it failed, the variable was not from the command line. Ignore it,
5301      # but warn the user (except for BASH, which is always set by the calling BASH).
5302      if test "xBASENAME" != xBASH; then
5303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5304$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5305      fi
5306      # Try to locate tool using the code snippet
5307      for ac_prog in basename
5308do
5309  # Extract the first word of "$ac_prog", so it can be a program name with args.
5310set dummy $ac_prog; ac_word=$2
5311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5312$as_echo_n "checking for $ac_word... " >&6; }
5313if ${ac_cv_path_BASENAME+:} false; then :
5314  $as_echo_n "(cached) " >&6
5315else
5316  case $BASENAME in
5317  [\\/]* | ?:[\\/]*)
5318  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5319  ;;
5320  *)
5321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5322for as_dir in $PATH
5323do
5324  IFS=$as_save_IFS
5325  test -z "$as_dir" && as_dir=.
5326    for ac_exec_ext in '' $ac_executable_extensions; do
5327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5328    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5330    break 2
5331  fi
5332done
5333  done
5334IFS=$as_save_IFS
5335
5336  ;;
5337esac
5338fi
5339BASENAME=$ac_cv_path_BASENAME
5340if test -n "$BASENAME"; then
5341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5342$as_echo "$BASENAME" >&6; }
5343else
5344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
5347
5348
5349  test -n "$BASENAME" && break
5350done
5351
5352    else
5353      # If it succeeded, then it was overridden by the user. We will use it
5354      # for the tool.
5355
5356      # First remove it from the list of overridden variables, so we can test
5357      # for unknown variables in the end.
5358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5359
5360      # Check if we try to supply an empty value
5361      if test "x$BASENAME" = x; then
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5363$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5365$as_echo_n "checking for BASENAME... " >&6; }
5366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5367$as_echo "disabled" >&6; }
5368      else
5369        # Check if the provided tool contains a complete path.
5370        tool_specified="$BASENAME"
5371        tool_basename="${tool_specified##*/}"
5372        if test "x$tool_basename" = "x$tool_specified"; then
5373          # A command without a complete path is provided, search $PATH.
5374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5375$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5376          # Extract the first word of "$tool_basename", so it can be a program name with args.
5377set dummy $tool_basename; ac_word=$2
5378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5379$as_echo_n "checking for $ac_word... " >&6; }
5380if ${ac_cv_path_BASENAME+:} false; then :
5381  $as_echo_n "(cached) " >&6
5382else
5383  case $BASENAME in
5384  [\\/]* | ?:[\\/]*)
5385  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5386  ;;
5387  *)
5388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5389for as_dir in $PATH
5390do
5391  IFS=$as_save_IFS
5392  test -z "$as_dir" && as_dir=.
5393    for ac_exec_ext in '' $ac_executable_extensions; do
5394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5395    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5397    break 2
5398  fi
5399done
5400  done
5401IFS=$as_save_IFS
5402
5403  ;;
5404esac
5405fi
5406BASENAME=$ac_cv_path_BASENAME
5407if test -n "$BASENAME"; then
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5409$as_echo "$BASENAME" >&6; }
5410else
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5412$as_echo "no" >&6; }
5413fi
5414
5415
5416          if test "x$BASENAME" = x; then
5417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5418          fi
5419        else
5420          # Otherwise we believe it is a complete path. Use it as it is.
5421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5422$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5424$as_echo_n "checking for BASENAME... " >&6; }
5425          if test ! -x "$tool_specified"; then
5426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5427$as_echo "not found" >&6; }
5428            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5429          fi
5430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5431$as_echo "$tool_specified" >&6; }
5432        fi
5433      fi
5434    fi
5435
5436  fi
5437
5438
5439
5440  if test "x$BASENAME" = x; then
5441    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5442  fi
5443
5444
5445
5446
5447
5448  # Publish this variable in the help.
5449
5450
5451  if [ -z "${BASH+x}" ]; then
5452    # The variable is not set by user, try to locate tool using the code snippet
5453    for ac_prog in bash
5454do
5455  # Extract the first word of "$ac_prog", so it can be a program name with args.
5456set dummy $ac_prog; ac_word=$2
5457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458$as_echo_n "checking for $ac_word... " >&6; }
5459if ${ac_cv_path_BASH+:} false; then :
5460  $as_echo_n "(cached) " >&6
5461else
5462  case $BASH in
5463  [\\/]* | ?:[\\/]*)
5464  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5465  ;;
5466  *)
5467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5468for as_dir in $PATH
5469do
5470  IFS=$as_save_IFS
5471  test -z "$as_dir" && as_dir=.
5472    for ac_exec_ext in '' $ac_executable_extensions; do
5473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5474    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5476    break 2
5477  fi
5478done
5479  done
5480IFS=$as_save_IFS
5481
5482  ;;
5483esac
5484fi
5485BASH=$ac_cv_path_BASH
5486if test -n "$BASH"; then
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5488$as_echo "$BASH" >&6; }
5489else
5490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5491$as_echo "no" >&6; }
5492fi
5493
5494
5495  test -n "$BASH" && break
5496done
5497
5498  else
5499    # The variable is set, but is it from the command line or the environment?
5500
5501    # Try to remove the string !BASH! from our list.
5502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5504      # If it failed, the variable was not from the command line. Ignore it,
5505      # but warn the user (except for BASH, which is always set by the calling BASH).
5506      if test "xBASH" != xBASH; then
5507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5508$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5509      fi
5510      # Try to locate tool using the code snippet
5511      for ac_prog in bash
5512do
5513  # Extract the first word of "$ac_prog", so it can be a program name with args.
5514set dummy $ac_prog; ac_word=$2
5515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
5517if ${ac_cv_path_BASH+:} false; then :
5518  $as_echo_n "(cached) " >&6
5519else
5520  case $BASH in
5521  [\\/]* | ?:[\\/]*)
5522  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5523  ;;
5524  *)
5525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5526for as_dir in $PATH
5527do
5528  IFS=$as_save_IFS
5529  test -z "$as_dir" && as_dir=.
5530    for ac_exec_ext in '' $ac_executable_extensions; do
5531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5532    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5534    break 2
5535  fi
5536done
5537  done
5538IFS=$as_save_IFS
5539
5540  ;;
5541esac
5542fi
5543BASH=$ac_cv_path_BASH
5544if test -n "$BASH"; then
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5546$as_echo "$BASH" >&6; }
5547else
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549$as_echo "no" >&6; }
5550fi
5551
5552
5553  test -n "$BASH" && break
5554done
5555
5556    else
5557      # If it succeeded, then it was overridden by the user. We will use it
5558      # for the tool.
5559
5560      # First remove it from the list of overridden variables, so we can test
5561      # for unknown variables in the end.
5562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5563
5564      # Check if we try to supply an empty value
5565      if test "x$BASH" = x; then
5566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5567$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5569$as_echo_n "checking for BASH... " >&6; }
5570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5571$as_echo "disabled" >&6; }
5572      else
5573        # Check if the provided tool contains a complete path.
5574        tool_specified="$BASH"
5575        tool_basename="${tool_specified##*/}"
5576        if test "x$tool_basename" = "x$tool_specified"; then
5577          # A command without a complete path is provided, search $PATH.
5578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5579$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5580          # Extract the first word of "$tool_basename", so it can be a program name with args.
5581set dummy $tool_basename; ac_word=$2
5582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583$as_echo_n "checking for $ac_word... " >&6; }
5584if ${ac_cv_path_BASH+:} false; then :
5585  $as_echo_n "(cached) " >&6
5586else
5587  case $BASH in
5588  [\\/]* | ?:[\\/]*)
5589  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5590  ;;
5591  *)
5592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593for as_dir in $PATH
5594do
5595  IFS=$as_save_IFS
5596  test -z "$as_dir" && as_dir=.
5597    for ac_exec_ext in '' $ac_executable_extensions; do
5598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5599    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5601    break 2
5602  fi
5603done
5604  done
5605IFS=$as_save_IFS
5606
5607  ;;
5608esac
5609fi
5610BASH=$ac_cv_path_BASH
5611if test -n "$BASH"; then
5612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5613$as_echo "$BASH" >&6; }
5614else
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5616$as_echo "no" >&6; }
5617fi
5618
5619
5620          if test "x$BASH" = x; then
5621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5622          fi
5623        else
5624          # Otherwise we believe it is a complete path. Use it as it is.
5625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5626$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5628$as_echo_n "checking for BASH... " >&6; }
5629          if test ! -x "$tool_specified"; then
5630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5631$as_echo "not found" >&6; }
5632            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5633          fi
5634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5635$as_echo "$tool_specified" >&6; }
5636        fi
5637      fi
5638    fi
5639
5640  fi
5641
5642
5643
5644  if test "x$BASH" = x; then
5645    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5646  fi
5647
5648
5649
5650
5651
5652  # Publish this variable in the help.
5653
5654
5655  if [ -z "${CAT+x}" ]; then
5656    # The variable is not set by user, try to locate tool using the code snippet
5657    for ac_prog in cat
5658do
5659  # Extract the first word of "$ac_prog", so it can be a program name with args.
5660set dummy $ac_prog; ac_word=$2
5661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5662$as_echo_n "checking for $ac_word... " >&6; }
5663if ${ac_cv_path_CAT+:} false; then :
5664  $as_echo_n "(cached) " >&6
5665else
5666  case $CAT in
5667  [\\/]* | ?:[\\/]*)
5668  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5669  ;;
5670  *)
5671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5672for as_dir in $PATH
5673do
5674  IFS=$as_save_IFS
5675  test -z "$as_dir" && as_dir=.
5676    for ac_exec_ext in '' $ac_executable_extensions; do
5677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5678    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5680    break 2
5681  fi
5682done
5683  done
5684IFS=$as_save_IFS
5685
5686  ;;
5687esac
5688fi
5689CAT=$ac_cv_path_CAT
5690if test -n "$CAT"; then
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5692$as_echo "$CAT" >&6; }
5693else
5694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5695$as_echo "no" >&6; }
5696fi
5697
5698
5699  test -n "$CAT" && break
5700done
5701
5702  else
5703    # The variable is set, but is it from the command line or the environment?
5704
5705    # Try to remove the string !CAT! from our list.
5706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5708      # If it failed, the variable was not from the command line. Ignore it,
5709      # but warn the user (except for BASH, which is always set by the calling BASH).
5710      if test "xCAT" != xBASH; then
5711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5712$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5713      fi
5714      # Try to locate tool using the code snippet
5715      for ac_prog in cat
5716do
5717  # Extract the first word of "$ac_prog", so it can be a program name with args.
5718set dummy $ac_prog; ac_word=$2
5719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5720$as_echo_n "checking for $ac_word... " >&6; }
5721if ${ac_cv_path_CAT+:} false; then :
5722  $as_echo_n "(cached) " >&6
5723else
5724  case $CAT in
5725  [\\/]* | ?:[\\/]*)
5726  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5727  ;;
5728  *)
5729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5730for as_dir in $PATH
5731do
5732  IFS=$as_save_IFS
5733  test -z "$as_dir" && as_dir=.
5734    for ac_exec_ext in '' $ac_executable_extensions; do
5735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5736    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5738    break 2
5739  fi
5740done
5741  done
5742IFS=$as_save_IFS
5743
5744  ;;
5745esac
5746fi
5747CAT=$ac_cv_path_CAT
5748if test -n "$CAT"; then
5749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5750$as_echo "$CAT" >&6; }
5751else
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754fi
5755
5756
5757  test -n "$CAT" && break
5758done
5759
5760    else
5761      # If it succeeded, then it was overridden by the user. We will use it
5762      # for the tool.
5763
5764      # First remove it from the list of overridden variables, so we can test
5765      # for unknown variables in the end.
5766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5767
5768      # Check if we try to supply an empty value
5769      if test "x$CAT" = x; then
5770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5771$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5773$as_echo_n "checking for CAT... " >&6; }
5774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5775$as_echo "disabled" >&6; }
5776      else
5777        # Check if the provided tool contains a complete path.
5778        tool_specified="$CAT"
5779        tool_basename="${tool_specified##*/}"
5780        if test "x$tool_basename" = "x$tool_specified"; then
5781          # A command without a complete path is provided, search $PATH.
5782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5783$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5784          # Extract the first word of "$tool_basename", so it can be a program name with args.
5785set dummy $tool_basename; ac_word=$2
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5787$as_echo_n "checking for $ac_word... " >&6; }
5788if ${ac_cv_path_CAT+:} false; then :
5789  $as_echo_n "(cached) " >&6
5790else
5791  case $CAT in
5792  [\\/]* | ?:[\\/]*)
5793  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5794  ;;
5795  *)
5796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799  IFS=$as_save_IFS
5800  test -z "$as_dir" && as_dir=.
5801    for ac_exec_ext in '' $ac_executable_extensions; do
5802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5803    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5805    break 2
5806  fi
5807done
5808  done
5809IFS=$as_save_IFS
5810
5811  ;;
5812esac
5813fi
5814CAT=$ac_cv_path_CAT
5815if test -n "$CAT"; then
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5817$as_echo "$CAT" >&6; }
5818else
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
5821fi
5822
5823
5824          if test "x$CAT" = x; then
5825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5826          fi
5827        else
5828          # Otherwise we believe it is a complete path. Use it as it is.
5829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5830$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5832$as_echo_n "checking for CAT... " >&6; }
5833          if test ! -x "$tool_specified"; then
5834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5835$as_echo "not found" >&6; }
5836            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5837          fi
5838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5839$as_echo "$tool_specified" >&6; }
5840        fi
5841      fi
5842    fi
5843
5844  fi
5845
5846
5847
5848  if test "x$CAT" = x; then
5849    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5850  fi
5851
5852
5853
5854
5855
5856  # Publish this variable in the help.
5857
5858
5859  if [ -z "${CHMOD+x}" ]; then
5860    # The variable is not set by user, try to locate tool using the code snippet
5861    for ac_prog in chmod
5862do
5863  # Extract the first word of "$ac_prog", so it can be a program name with args.
5864set dummy $ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_path_CHMOD+:} false; then :
5868  $as_echo_n "(cached) " >&6
5869else
5870  case $CHMOD in
5871  [\\/]* | ?:[\\/]*)
5872  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5873  ;;
5874  *)
5875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5876for as_dir in $PATH
5877do
5878  IFS=$as_save_IFS
5879  test -z "$as_dir" && as_dir=.
5880    for ac_exec_ext in '' $ac_executable_extensions; do
5881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5882    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5884    break 2
5885  fi
5886done
5887  done
5888IFS=$as_save_IFS
5889
5890  ;;
5891esac
5892fi
5893CHMOD=$ac_cv_path_CHMOD
5894if test -n "$CHMOD"; then
5895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5896$as_echo "$CHMOD" >&6; }
5897else
5898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5899$as_echo "no" >&6; }
5900fi
5901
5902
5903  test -n "$CHMOD" && break
5904done
5905
5906  else
5907    # The variable is set, but is it from the command line or the environment?
5908
5909    # Try to remove the string !CHMOD! from our list.
5910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5912      # If it failed, the variable was not from the command line. Ignore it,
5913      # but warn the user (except for BASH, which is always set by the calling BASH).
5914      if test "xCHMOD" != xBASH; then
5915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5916$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5917      fi
5918      # Try to locate tool using the code snippet
5919      for ac_prog in chmod
5920do
5921  # Extract the first word of "$ac_prog", so it can be a program name with args.
5922set dummy $ac_prog; ac_word=$2
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5924$as_echo_n "checking for $ac_word... " >&6; }
5925if ${ac_cv_path_CHMOD+:} false; then :
5926  $as_echo_n "(cached) " >&6
5927else
5928  case $CHMOD in
5929  [\\/]* | ?:[\\/]*)
5930  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5931  ;;
5932  *)
5933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5934for as_dir in $PATH
5935do
5936  IFS=$as_save_IFS
5937  test -z "$as_dir" && as_dir=.
5938    for ac_exec_ext in '' $ac_executable_extensions; do
5939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5940    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5942    break 2
5943  fi
5944done
5945  done
5946IFS=$as_save_IFS
5947
5948  ;;
5949esac
5950fi
5951CHMOD=$ac_cv_path_CHMOD
5952if test -n "$CHMOD"; then
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5954$as_echo "$CHMOD" >&6; }
5955else
5956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957$as_echo "no" >&6; }
5958fi
5959
5960
5961  test -n "$CHMOD" && break
5962done
5963
5964    else
5965      # If it succeeded, then it was overridden by the user. We will use it
5966      # for the tool.
5967
5968      # First remove it from the list of overridden variables, so we can test
5969      # for unknown variables in the end.
5970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5971
5972      # Check if we try to supply an empty value
5973      if test "x$CHMOD" = x; then
5974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5975$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5977$as_echo_n "checking for CHMOD... " >&6; }
5978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5979$as_echo "disabled" >&6; }
5980      else
5981        # Check if the provided tool contains a complete path.
5982        tool_specified="$CHMOD"
5983        tool_basename="${tool_specified##*/}"
5984        if test "x$tool_basename" = "x$tool_specified"; then
5985          # A command without a complete path is provided, search $PATH.
5986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5987$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5988          # Extract the first word of "$tool_basename", so it can be a program name with args.
5989set dummy $tool_basename; ac_word=$2
5990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5991$as_echo_n "checking for $ac_word... " >&6; }
5992if ${ac_cv_path_CHMOD+:} false; then :
5993  $as_echo_n "(cached) " >&6
5994else
5995  case $CHMOD in
5996  [\\/]* | ?:[\\/]*)
5997  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5998  ;;
5999  *)
6000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6001for as_dir in $PATH
6002do
6003  IFS=$as_save_IFS
6004  test -z "$as_dir" && as_dir=.
6005    for ac_exec_ext in '' $ac_executable_extensions; do
6006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6007    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6009    break 2
6010  fi
6011done
6012  done
6013IFS=$as_save_IFS
6014
6015  ;;
6016esac
6017fi
6018CHMOD=$ac_cv_path_CHMOD
6019if test -n "$CHMOD"; then
6020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6021$as_echo "$CHMOD" >&6; }
6022else
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6024$as_echo "no" >&6; }
6025fi
6026
6027
6028          if test "x$CHMOD" = x; then
6029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6030          fi
6031        else
6032          # Otherwise we believe it is a complete path. Use it as it is.
6033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6034$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6036$as_echo_n "checking for CHMOD... " >&6; }
6037          if test ! -x "$tool_specified"; then
6038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6039$as_echo "not found" >&6; }
6040            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6041          fi
6042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6043$as_echo "$tool_specified" >&6; }
6044        fi
6045      fi
6046    fi
6047
6048  fi
6049
6050
6051
6052  if test "x$CHMOD" = x; then
6053    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6054  fi
6055
6056
6057
6058
6059
6060  # Publish this variable in the help.
6061
6062
6063  if [ -z "${CMP+x}" ]; then
6064    # The variable is not set by user, try to locate tool using the code snippet
6065    for ac_prog in cmp
6066do
6067  # Extract the first word of "$ac_prog", so it can be a program name with args.
6068set dummy $ac_prog; ac_word=$2
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6070$as_echo_n "checking for $ac_word... " >&6; }
6071if ${ac_cv_path_CMP+:} false; then :
6072  $as_echo_n "(cached) " >&6
6073else
6074  case $CMP in
6075  [\\/]* | ?:[\\/]*)
6076  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6077  ;;
6078  *)
6079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082  IFS=$as_save_IFS
6083  test -z "$as_dir" && as_dir=.
6084    for ac_exec_ext in '' $ac_executable_extensions; do
6085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6086    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6088    break 2
6089  fi
6090done
6091  done
6092IFS=$as_save_IFS
6093
6094  ;;
6095esac
6096fi
6097CMP=$ac_cv_path_CMP
6098if test -n "$CMP"; then
6099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6100$as_echo "$CMP" >&6; }
6101else
6102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107  test -n "$CMP" && break
6108done
6109
6110  else
6111    # The variable is set, but is it from the command line or the environment?
6112
6113    # Try to remove the string !CMP! from our list.
6114    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6115    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6116      # If it failed, the variable was not from the command line. Ignore it,
6117      # but warn the user (except for BASH, which is always set by the calling BASH).
6118      if test "xCMP" != xBASH; then
6119        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6120$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6121      fi
6122      # Try to locate tool using the code snippet
6123      for ac_prog in cmp
6124do
6125  # Extract the first word of "$ac_prog", so it can be a program name with args.
6126set dummy $ac_prog; ac_word=$2
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6128$as_echo_n "checking for $ac_word... " >&6; }
6129if ${ac_cv_path_CMP+:} false; then :
6130  $as_echo_n "(cached) " >&6
6131else
6132  case $CMP in
6133  [\\/]* | ?:[\\/]*)
6134  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6135  ;;
6136  *)
6137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6138for as_dir in $PATH
6139do
6140  IFS=$as_save_IFS
6141  test -z "$as_dir" && as_dir=.
6142    for ac_exec_ext in '' $ac_executable_extensions; do
6143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6144    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6146    break 2
6147  fi
6148done
6149  done
6150IFS=$as_save_IFS
6151
6152  ;;
6153esac
6154fi
6155CMP=$ac_cv_path_CMP
6156if test -n "$CMP"; then
6157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6158$as_echo "$CMP" >&6; }
6159else
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6161$as_echo "no" >&6; }
6162fi
6163
6164
6165  test -n "$CMP" && break
6166done
6167
6168    else
6169      # If it succeeded, then it was overridden by the user. We will use it
6170      # for the tool.
6171
6172      # First remove it from the list of overridden variables, so we can test
6173      # for unknown variables in the end.
6174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6175
6176      # Check if we try to supply an empty value
6177      if test "x$CMP" = x; then
6178        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6179$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6180        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6181$as_echo_n "checking for CMP... " >&6; }
6182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6183$as_echo "disabled" >&6; }
6184      else
6185        # Check if the provided tool contains a complete path.
6186        tool_specified="$CMP"
6187        tool_basename="${tool_specified##*/}"
6188        if test "x$tool_basename" = "x$tool_specified"; then
6189          # A command without a complete path is provided, search $PATH.
6190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6191$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6192          # Extract the first word of "$tool_basename", so it can be a program name with args.
6193set dummy $tool_basename; ac_word=$2
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6195$as_echo_n "checking for $ac_word... " >&6; }
6196if ${ac_cv_path_CMP+:} false; then :
6197  $as_echo_n "(cached) " >&6
6198else
6199  case $CMP in
6200  [\\/]* | ?:[\\/]*)
6201  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6202  ;;
6203  *)
6204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205for as_dir in $PATH
6206do
6207  IFS=$as_save_IFS
6208  test -z "$as_dir" && as_dir=.
6209    for ac_exec_ext in '' $ac_executable_extensions; do
6210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6211    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6213    break 2
6214  fi
6215done
6216  done
6217IFS=$as_save_IFS
6218
6219  ;;
6220esac
6221fi
6222CMP=$ac_cv_path_CMP
6223if test -n "$CMP"; then
6224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6225$as_echo "$CMP" >&6; }
6226else
6227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228$as_echo "no" >&6; }
6229fi
6230
6231
6232          if test "x$CMP" = x; then
6233            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6234          fi
6235        else
6236          # Otherwise we believe it is a complete path. Use it as it is.
6237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6238$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6239          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6240$as_echo_n "checking for CMP... " >&6; }
6241          if test ! -x "$tool_specified"; then
6242            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6243$as_echo "not found" >&6; }
6244            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6245          fi
6246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6247$as_echo "$tool_specified" >&6; }
6248        fi
6249      fi
6250    fi
6251
6252  fi
6253
6254
6255
6256  if test "x$CMP" = x; then
6257    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6258  fi
6259
6260
6261
6262
6263
6264  # Publish this variable in the help.
6265
6266
6267  if [ -z "${COMM+x}" ]; then
6268    # The variable is not set by user, try to locate tool using the code snippet
6269    for ac_prog in comm
6270do
6271  # Extract the first word of "$ac_prog", so it can be a program name with args.
6272set dummy $ac_prog; ac_word=$2
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6274$as_echo_n "checking for $ac_word... " >&6; }
6275if ${ac_cv_path_COMM+:} false; then :
6276  $as_echo_n "(cached) " >&6
6277else
6278  case $COMM in
6279  [\\/]* | ?:[\\/]*)
6280  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6281  ;;
6282  *)
6283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6284for as_dir in $PATH
6285do
6286  IFS=$as_save_IFS
6287  test -z "$as_dir" && as_dir=.
6288    for ac_exec_ext in '' $ac_executable_extensions; do
6289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6290    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6292    break 2
6293  fi
6294done
6295  done
6296IFS=$as_save_IFS
6297
6298  ;;
6299esac
6300fi
6301COMM=$ac_cv_path_COMM
6302if test -n "$COMM"; then
6303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6304$as_echo "$COMM" >&6; }
6305else
6306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307$as_echo "no" >&6; }
6308fi
6309
6310
6311  test -n "$COMM" && break
6312done
6313
6314  else
6315    # The variable is set, but is it from the command line or the environment?
6316
6317    # Try to remove the string !COMM! from our list.
6318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6320      # If it failed, the variable was not from the command line. Ignore it,
6321      # but warn the user (except for BASH, which is always set by the calling BASH).
6322      if test "xCOMM" != xBASH; then
6323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6324$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6325      fi
6326      # Try to locate tool using the code snippet
6327      for ac_prog in comm
6328do
6329  # Extract the first word of "$ac_prog", so it can be a program name with args.
6330set dummy $ac_prog; ac_word=$2
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6332$as_echo_n "checking for $ac_word... " >&6; }
6333if ${ac_cv_path_COMM+:} false; then :
6334  $as_echo_n "(cached) " >&6
6335else
6336  case $COMM in
6337  [\\/]* | ?:[\\/]*)
6338  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6339  ;;
6340  *)
6341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6342for as_dir in $PATH
6343do
6344  IFS=$as_save_IFS
6345  test -z "$as_dir" && as_dir=.
6346    for ac_exec_ext in '' $ac_executable_extensions; do
6347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6348    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6350    break 2
6351  fi
6352done
6353  done
6354IFS=$as_save_IFS
6355
6356  ;;
6357esac
6358fi
6359COMM=$ac_cv_path_COMM
6360if test -n "$COMM"; then
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6362$as_echo "$COMM" >&6; }
6363else
6364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6365$as_echo "no" >&6; }
6366fi
6367
6368
6369  test -n "$COMM" && break
6370done
6371
6372    else
6373      # If it succeeded, then it was overridden by the user. We will use it
6374      # for the tool.
6375
6376      # First remove it from the list of overridden variables, so we can test
6377      # for unknown variables in the end.
6378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6379
6380      # Check if we try to supply an empty value
6381      if test "x$COMM" = x; then
6382        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6383$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6385$as_echo_n "checking for COMM... " >&6; }
6386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6387$as_echo "disabled" >&6; }
6388      else
6389        # Check if the provided tool contains a complete path.
6390        tool_specified="$COMM"
6391        tool_basename="${tool_specified##*/}"
6392        if test "x$tool_basename" = "x$tool_specified"; then
6393          # A command without a complete path is provided, search $PATH.
6394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6395$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6396          # Extract the first word of "$tool_basename", so it can be a program name with args.
6397set dummy $tool_basename; ac_word=$2
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6399$as_echo_n "checking for $ac_word... " >&6; }
6400if ${ac_cv_path_COMM+:} false; then :
6401  $as_echo_n "(cached) " >&6
6402else
6403  case $COMM in
6404  [\\/]* | ?:[\\/]*)
6405  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6406  ;;
6407  *)
6408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6409for as_dir in $PATH
6410do
6411  IFS=$as_save_IFS
6412  test -z "$as_dir" && as_dir=.
6413    for ac_exec_ext in '' $ac_executable_extensions; do
6414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6415    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6417    break 2
6418  fi
6419done
6420  done
6421IFS=$as_save_IFS
6422
6423  ;;
6424esac
6425fi
6426COMM=$ac_cv_path_COMM
6427if test -n "$COMM"; then
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6429$as_echo "$COMM" >&6; }
6430else
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435
6436          if test "x$COMM" = x; then
6437            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6438          fi
6439        else
6440          # Otherwise we believe it is a complete path. Use it as it is.
6441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6442$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6443          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6444$as_echo_n "checking for COMM... " >&6; }
6445          if test ! -x "$tool_specified"; then
6446            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6447$as_echo "not found" >&6; }
6448            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6449          fi
6450          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6451$as_echo "$tool_specified" >&6; }
6452        fi
6453      fi
6454    fi
6455
6456  fi
6457
6458
6459
6460  if test "x$COMM" = x; then
6461    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6462  fi
6463
6464
6465
6466
6467
6468  # Publish this variable in the help.
6469
6470
6471  if [ -z "${CP+x}" ]; then
6472    # The variable is not set by user, try to locate tool using the code snippet
6473    for ac_prog in cp
6474do
6475  # Extract the first word of "$ac_prog", so it can be a program name with args.
6476set dummy $ac_prog; ac_word=$2
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6478$as_echo_n "checking for $ac_word... " >&6; }
6479if ${ac_cv_path_CP+:} false; then :
6480  $as_echo_n "(cached) " >&6
6481else
6482  case $CP in
6483  [\\/]* | ?:[\\/]*)
6484  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6485  ;;
6486  *)
6487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6488for as_dir in $PATH
6489do
6490  IFS=$as_save_IFS
6491  test -z "$as_dir" && as_dir=.
6492    for ac_exec_ext in '' $ac_executable_extensions; do
6493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6494    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6496    break 2
6497  fi
6498done
6499  done
6500IFS=$as_save_IFS
6501
6502  ;;
6503esac
6504fi
6505CP=$ac_cv_path_CP
6506if test -n "$CP"; then
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6508$as_echo "$CP" >&6; }
6509else
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }
6512fi
6513
6514
6515  test -n "$CP" && break
6516done
6517
6518  else
6519    # The variable is set, but is it from the command line or the environment?
6520
6521    # Try to remove the string !CP! from our list.
6522    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6523    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6524      # If it failed, the variable was not from the command line. Ignore it,
6525      # but warn the user (except for BASH, which is always set by the calling BASH).
6526      if test "xCP" != xBASH; then
6527        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6528$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6529      fi
6530      # Try to locate tool using the code snippet
6531      for ac_prog in cp
6532do
6533  # Extract the first word of "$ac_prog", so it can be a program name with args.
6534set dummy $ac_prog; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_CP+:} false; then :
6538  $as_echo_n "(cached) " >&6
6539else
6540  case $CP in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in $PATH
6547do
6548  IFS=$as_save_IFS
6549  test -z "$as_dir" && as_dir=.
6550    for ac_exec_ext in '' $ac_executable_extensions; do
6551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6552    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554    break 2
6555  fi
6556done
6557  done
6558IFS=$as_save_IFS
6559
6560  ;;
6561esac
6562fi
6563CP=$ac_cv_path_CP
6564if test -n "$CP"; then
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6566$as_echo "$CP" >&6; }
6567else
6568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
6573  test -n "$CP" && break
6574done
6575
6576    else
6577      # If it succeeded, then it was overridden by the user. We will use it
6578      # for the tool.
6579
6580      # First remove it from the list of overridden variables, so we can test
6581      # for unknown variables in the end.
6582      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6583
6584      # Check if we try to supply an empty value
6585      if test "x$CP" = x; then
6586        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6587$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6589$as_echo_n "checking for CP... " >&6; }
6590        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6591$as_echo "disabled" >&6; }
6592      else
6593        # Check if the provided tool contains a complete path.
6594        tool_specified="$CP"
6595        tool_basename="${tool_specified##*/}"
6596        if test "x$tool_basename" = "x$tool_specified"; then
6597          # A command without a complete path is provided, search $PATH.
6598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6599$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6600          # Extract the first word of "$tool_basename", so it can be a program name with args.
6601set dummy $tool_basename; ac_word=$2
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6603$as_echo_n "checking for $ac_word... " >&6; }
6604if ${ac_cv_path_CP+:} false; then :
6605  $as_echo_n "(cached) " >&6
6606else
6607  case $CP in
6608  [\\/]* | ?:[\\/]*)
6609  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6610  ;;
6611  *)
6612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6613for as_dir in $PATH
6614do
6615  IFS=$as_save_IFS
6616  test -z "$as_dir" && as_dir=.
6617    for ac_exec_ext in '' $ac_executable_extensions; do
6618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6619    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6621    break 2
6622  fi
6623done
6624  done
6625IFS=$as_save_IFS
6626
6627  ;;
6628esac
6629fi
6630CP=$ac_cv_path_CP
6631if test -n "$CP"; then
6632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6633$as_echo "$CP" >&6; }
6634else
6635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6636$as_echo "no" >&6; }
6637fi
6638
6639
6640          if test "x$CP" = x; then
6641            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6642          fi
6643        else
6644          # Otherwise we believe it is a complete path. Use it as it is.
6645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6646$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6647          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6648$as_echo_n "checking for CP... " >&6; }
6649          if test ! -x "$tool_specified"; then
6650            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6651$as_echo "not found" >&6; }
6652            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6653          fi
6654          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6655$as_echo "$tool_specified" >&6; }
6656        fi
6657      fi
6658    fi
6659
6660  fi
6661
6662
6663
6664  if test "x$CP" = x; then
6665    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6666  fi
6667
6668
6669
6670
6671
6672  # Publish this variable in the help.
6673
6674
6675  if [ -z "${CUT+x}" ]; then
6676    # The variable is not set by user, try to locate tool using the code snippet
6677    for ac_prog in cut
6678do
6679  # Extract the first word of "$ac_prog", so it can be a program name with args.
6680set dummy $ac_prog; ac_word=$2
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6682$as_echo_n "checking for $ac_word... " >&6; }
6683if ${ac_cv_path_CUT+:} false; then :
6684  $as_echo_n "(cached) " >&6
6685else
6686  case $CUT in
6687  [\\/]* | ?:[\\/]*)
6688  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6689  ;;
6690  *)
6691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6692for as_dir in $PATH
6693do
6694  IFS=$as_save_IFS
6695  test -z "$as_dir" && as_dir=.
6696    for ac_exec_ext in '' $ac_executable_extensions; do
6697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6698    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6700    break 2
6701  fi
6702done
6703  done
6704IFS=$as_save_IFS
6705
6706  ;;
6707esac
6708fi
6709CUT=$ac_cv_path_CUT
6710if test -n "$CUT"; then
6711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6712$as_echo "$CUT" >&6; }
6713else
6714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715$as_echo "no" >&6; }
6716fi
6717
6718
6719  test -n "$CUT" && break
6720done
6721
6722  else
6723    # The variable is set, but is it from the command line or the environment?
6724
6725    # Try to remove the string !CUT! from our list.
6726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6728      # If it failed, the variable was not from the command line. Ignore it,
6729      # but warn the user (except for BASH, which is always set by the calling BASH).
6730      if test "xCUT" != xBASH; then
6731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6732$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6733      fi
6734      # Try to locate tool using the code snippet
6735      for ac_prog in cut
6736do
6737  # Extract the first word of "$ac_prog", so it can be a program name with args.
6738set dummy $ac_prog; ac_word=$2
6739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6740$as_echo_n "checking for $ac_word... " >&6; }
6741if ${ac_cv_path_CUT+:} false; then :
6742  $as_echo_n "(cached) " >&6
6743else
6744  case $CUT in
6745  [\\/]* | ?:[\\/]*)
6746  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6747  ;;
6748  *)
6749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6750for as_dir in $PATH
6751do
6752  IFS=$as_save_IFS
6753  test -z "$as_dir" && as_dir=.
6754    for ac_exec_ext in '' $ac_executable_extensions; do
6755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6756    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6758    break 2
6759  fi
6760done
6761  done
6762IFS=$as_save_IFS
6763
6764  ;;
6765esac
6766fi
6767CUT=$ac_cv_path_CUT
6768if test -n "$CUT"; then
6769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6770$as_echo "$CUT" >&6; }
6771else
6772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6773$as_echo "no" >&6; }
6774fi
6775
6776
6777  test -n "$CUT" && break
6778done
6779
6780    else
6781      # If it succeeded, then it was overridden by the user. We will use it
6782      # for the tool.
6783
6784      # First remove it from the list of overridden variables, so we can test
6785      # for unknown variables in the end.
6786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6787
6788      # Check if we try to supply an empty value
6789      if test "x$CUT" = x; then
6790        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6791$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6792        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6793$as_echo_n "checking for CUT... " >&6; }
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6795$as_echo "disabled" >&6; }
6796      else
6797        # Check if the provided tool contains a complete path.
6798        tool_specified="$CUT"
6799        tool_basename="${tool_specified##*/}"
6800        if test "x$tool_basename" = "x$tool_specified"; then
6801          # A command without a complete path is provided, search $PATH.
6802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6803$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6804          # Extract the first word of "$tool_basename", so it can be a program name with args.
6805set dummy $tool_basename; ac_word=$2
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6807$as_echo_n "checking for $ac_word... " >&6; }
6808if ${ac_cv_path_CUT+:} false; then :
6809  $as_echo_n "(cached) " >&6
6810else
6811  case $CUT in
6812  [\\/]* | ?:[\\/]*)
6813  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6814  ;;
6815  *)
6816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6817for as_dir in $PATH
6818do
6819  IFS=$as_save_IFS
6820  test -z "$as_dir" && as_dir=.
6821    for ac_exec_ext in '' $ac_executable_extensions; do
6822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6823    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6825    break 2
6826  fi
6827done
6828  done
6829IFS=$as_save_IFS
6830
6831  ;;
6832esac
6833fi
6834CUT=$ac_cv_path_CUT
6835if test -n "$CUT"; then
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6837$as_echo "$CUT" >&6; }
6838else
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6840$as_echo "no" >&6; }
6841fi
6842
6843
6844          if test "x$CUT" = x; then
6845            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6846          fi
6847        else
6848          # Otherwise we believe it is a complete path. Use it as it is.
6849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6850$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6851          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6852$as_echo_n "checking for CUT... " >&6; }
6853          if test ! -x "$tool_specified"; then
6854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6855$as_echo "not found" >&6; }
6856            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6857          fi
6858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6859$as_echo "$tool_specified" >&6; }
6860        fi
6861      fi
6862    fi
6863
6864  fi
6865
6866
6867
6868  if test "x$CUT" = x; then
6869    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6870  fi
6871
6872
6873
6874
6875
6876  # Publish this variable in the help.
6877
6878
6879  if [ -z "${DATE+x}" ]; then
6880    # The variable is not set by user, try to locate tool using the code snippet
6881    for ac_prog in date
6882do
6883  # Extract the first word of "$ac_prog", so it can be a program name with args.
6884set dummy $ac_prog; ac_word=$2
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6886$as_echo_n "checking for $ac_word... " >&6; }
6887if ${ac_cv_path_DATE+:} false; then :
6888  $as_echo_n "(cached) " >&6
6889else
6890  case $DATE in
6891  [\\/]* | ?:[\\/]*)
6892  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6893  ;;
6894  *)
6895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6896for as_dir in $PATH
6897do
6898  IFS=$as_save_IFS
6899  test -z "$as_dir" && as_dir=.
6900    for ac_exec_ext in '' $ac_executable_extensions; do
6901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6902    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6904    break 2
6905  fi
6906done
6907  done
6908IFS=$as_save_IFS
6909
6910  ;;
6911esac
6912fi
6913DATE=$ac_cv_path_DATE
6914if test -n "$DATE"; then
6915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6916$as_echo "$DATE" >&6; }
6917else
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6919$as_echo "no" >&6; }
6920fi
6921
6922
6923  test -n "$DATE" && break
6924done
6925
6926  else
6927    # The variable is set, but is it from the command line or the environment?
6928
6929    # Try to remove the string !DATE! from our list.
6930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6932      # If it failed, the variable was not from the command line. Ignore it,
6933      # but warn the user (except for BASH, which is always set by the calling BASH).
6934      if test "xDATE" != xBASH; then
6935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6936$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6937      fi
6938      # Try to locate tool using the code snippet
6939      for ac_prog in date
6940do
6941  # Extract the first word of "$ac_prog", so it can be a program name with args.
6942set dummy $ac_prog; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_DATE+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $DATE in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971DATE=$ac_cv_path_DATE
6972if test -n "$DATE"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6974$as_echo "$DATE" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981  test -n "$DATE" && break
6982done
6983
6984    else
6985      # If it succeeded, then it was overridden by the user. We will use it
6986      # for the tool.
6987
6988      # First remove it from the list of overridden variables, so we can test
6989      # for unknown variables in the end.
6990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6991
6992      # Check if we try to supply an empty value
6993      if test "x$DATE" = x; then
6994        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6995$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6997$as_echo_n "checking for DATE... " >&6; }
6998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6999$as_echo "disabled" >&6; }
7000      else
7001        # Check if the provided tool contains a complete path.
7002        tool_specified="$DATE"
7003        tool_basename="${tool_specified##*/}"
7004        if test "x$tool_basename" = "x$tool_specified"; then
7005          # A command without a complete path is provided, search $PATH.
7006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7007$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7008          # Extract the first word of "$tool_basename", so it can be a program name with args.
7009set dummy $tool_basename; ac_word=$2
7010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7011$as_echo_n "checking for $ac_word... " >&6; }
7012if ${ac_cv_path_DATE+:} false; then :
7013  $as_echo_n "(cached) " >&6
7014else
7015  case $DATE in
7016  [\\/]* | ?:[\\/]*)
7017  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7018  ;;
7019  *)
7020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7021for as_dir in $PATH
7022do
7023  IFS=$as_save_IFS
7024  test -z "$as_dir" && as_dir=.
7025    for ac_exec_ext in '' $ac_executable_extensions; do
7026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7027    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7029    break 2
7030  fi
7031done
7032  done
7033IFS=$as_save_IFS
7034
7035  ;;
7036esac
7037fi
7038DATE=$ac_cv_path_DATE
7039if test -n "$DATE"; then
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7041$as_echo "$DATE" >&6; }
7042else
7043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7044$as_echo "no" >&6; }
7045fi
7046
7047
7048          if test "x$DATE" = x; then
7049            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7050          fi
7051        else
7052          # Otherwise we believe it is a complete path. Use it as it is.
7053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7054$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7055          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7056$as_echo_n "checking for DATE... " >&6; }
7057          if test ! -x "$tool_specified"; then
7058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7059$as_echo "not found" >&6; }
7060            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7061          fi
7062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7063$as_echo "$tool_specified" >&6; }
7064        fi
7065      fi
7066    fi
7067
7068  fi
7069
7070
7071
7072  if test "x$DATE" = x; then
7073    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7074  fi
7075
7076
7077
7078
7079
7080  # Publish this variable in the help.
7081
7082
7083  if [ -z "${DIFF+x}" ]; then
7084    # The variable is not set by user, try to locate tool using the code snippet
7085    for ac_prog in gdiff diff
7086do
7087  # Extract the first word of "$ac_prog", so it can be a program name with args.
7088set dummy $ac_prog; ac_word=$2
7089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7090$as_echo_n "checking for $ac_word... " >&6; }
7091if ${ac_cv_path_DIFF+:} false; then :
7092  $as_echo_n "(cached) " >&6
7093else
7094  case $DIFF in
7095  [\\/]* | ?:[\\/]*)
7096  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7097  ;;
7098  *)
7099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7100for as_dir in $PATH
7101do
7102  IFS=$as_save_IFS
7103  test -z "$as_dir" && as_dir=.
7104    for ac_exec_ext in '' $ac_executable_extensions; do
7105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7106    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7108    break 2
7109  fi
7110done
7111  done
7112IFS=$as_save_IFS
7113
7114  ;;
7115esac
7116fi
7117DIFF=$ac_cv_path_DIFF
7118if test -n "$DIFF"; then
7119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7120$as_echo "$DIFF" >&6; }
7121else
7122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7123$as_echo "no" >&6; }
7124fi
7125
7126
7127  test -n "$DIFF" && break
7128done
7129
7130  else
7131    # The variable is set, but is it from the command line or the environment?
7132
7133    # Try to remove the string !DIFF! from our list.
7134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7136      # If it failed, the variable was not from the command line. Ignore it,
7137      # but warn the user (except for BASH, which is always set by the calling BASH).
7138      if test "xDIFF" != xBASH; then
7139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7140$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7141      fi
7142      # Try to locate tool using the code snippet
7143      for ac_prog in gdiff diff
7144do
7145  # Extract the first word of "$ac_prog", so it can be a program name with args.
7146set dummy $ac_prog; ac_word=$2
7147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7148$as_echo_n "checking for $ac_word... " >&6; }
7149if ${ac_cv_path_DIFF+:} false; then :
7150  $as_echo_n "(cached) " >&6
7151else
7152  case $DIFF in
7153  [\\/]* | ?:[\\/]*)
7154  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7155  ;;
7156  *)
7157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7158for as_dir in $PATH
7159do
7160  IFS=$as_save_IFS
7161  test -z "$as_dir" && as_dir=.
7162    for ac_exec_ext in '' $ac_executable_extensions; do
7163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7164    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7166    break 2
7167  fi
7168done
7169  done
7170IFS=$as_save_IFS
7171
7172  ;;
7173esac
7174fi
7175DIFF=$ac_cv_path_DIFF
7176if test -n "$DIFF"; then
7177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7178$as_echo "$DIFF" >&6; }
7179else
7180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181$as_echo "no" >&6; }
7182fi
7183
7184
7185  test -n "$DIFF" && break
7186done
7187
7188    else
7189      # If it succeeded, then it was overridden by the user. We will use it
7190      # for the tool.
7191
7192      # First remove it from the list of overridden variables, so we can test
7193      # for unknown variables in the end.
7194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7195
7196      # Check if we try to supply an empty value
7197      if test "x$DIFF" = x; then
7198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7199$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7201$as_echo_n "checking for DIFF... " >&6; }
7202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7203$as_echo "disabled" >&6; }
7204      else
7205        # Check if the provided tool contains a complete path.
7206        tool_specified="$DIFF"
7207        tool_basename="${tool_specified##*/}"
7208        if test "x$tool_basename" = "x$tool_specified"; then
7209          # A command without a complete path is provided, search $PATH.
7210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7211$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7212          # Extract the first word of "$tool_basename", so it can be a program name with args.
7213set dummy $tool_basename; ac_word=$2
7214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7215$as_echo_n "checking for $ac_word... " >&6; }
7216if ${ac_cv_path_DIFF+:} false; then :
7217  $as_echo_n "(cached) " >&6
7218else
7219  case $DIFF in
7220  [\\/]* | ?:[\\/]*)
7221  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7222  ;;
7223  *)
7224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7225for as_dir in $PATH
7226do
7227  IFS=$as_save_IFS
7228  test -z "$as_dir" && as_dir=.
7229    for ac_exec_ext in '' $ac_executable_extensions; do
7230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7231    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7233    break 2
7234  fi
7235done
7236  done
7237IFS=$as_save_IFS
7238
7239  ;;
7240esac
7241fi
7242DIFF=$ac_cv_path_DIFF
7243if test -n "$DIFF"; then
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7245$as_echo "$DIFF" >&6; }
7246else
7247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7248$as_echo "no" >&6; }
7249fi
7250
7251
7252          if test "x$DIFF" = x; then
7253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7254          fi
7255        else
7256          # Otherwise we believe it is a complete path. Use it as it is.
7257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7258$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7260$as_echo_n "checking for DIFF... " >&6; }
7261          if test ! -x "$tool_specified"; then
7262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7263$as_echo "not found" >&6; }
7264            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7265          fi
7266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7267$as_echo "$tool_specified" >&6; }
7268        fi
7269      fi
7270    fi
7271
7272  fi
7273
7274
7275
7276  if test "x$DIFF" = x; then
7277    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7278  fi
7279
7280
7281
7282
7283
7284  # Publish this variable in the help.
7285
7286
7287  if [ -z "${DIRNAME+x}" ]; then
7288    # The variable is not set by user, try to locate tool using the code snippet
7289    for ac_prog in dirname
7290do
7291  # Extract the first word of "$ac_prog", so it can be a program name with args.
7292set dummy $ac_prog; ac_word=$2
7293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7294$as_echo_n "checking for $ac_word... " >&6; }
7295if ${ac_cv_path_DIRNAME+:} false; then :
7296  $as_echo_n "(cached) " >&6
7297else
7298  case $DIRNAME in
7299  [\\/]* | ?:[\\/]*)
7300  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7301  ;;
7302  *)
7303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306  IFS=$as_save_IFS
7307  test -z "$as_dir" && as_dir=.
7308    for ac_exec_ext in '' $ac_executable_extensions; do
7309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7310    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7312    break 2
7313  fi
7314done
7315  done
7316IFS=$as_save_IFS
7317
7318  ;;
7319esac
7320fi
7321DIRNAME=$ac_cv_path_DIRNAME
7322if test -n "$DIRNAME"; then
7323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7324$as_echo "$DIRNAME" >&6; }
7325else
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327$as_echo "no" >&6; }
7328fi
7329
7330
7331  test -n "$DIRNAME" && break
7332done
7333
7334  else
7335    # The variable is set, but is it from the command line or the environment?
7336
7337    # Try to remove the string !DIRNAME! from our list.
7338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7340      # If it failed, the variable was not from the command line. Ignore it,
7341      # but warn the user (except for BASH, which is always set by the calling BASH).
7342      if test "xDIRNAME" != xBASH; then
7343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7344$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7345      fi
7346      # Try to locate tool using the code snippet
7347      for ac_prog in dirname
7348do
7349  # Extract the first word of "$ac_prog", so it can be a program name with args.
7350set dummy $ac_prog; ac_word=$2
7351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7352$as_echo_n "checking for $ac_word... " >&6; }
7353if ${ac_cv_path_DIRNAME+:} false; then :
7354  $as_echo_n "(cached) " >&6
7355else
7356  case $DIRNAME in
7357  [\\/]* | ?:[\\/]*)
7358  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7359  ;;
7360  *)
7361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7362for as_dir in $PATH
7363do
7364  IFS=$as_save_IFS
7365  test -z "$as_dir" && as_dir=.
7366    for ac_exec_ext in '' $ac_executable_extensions; do
7367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7368    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7370    break 2
7371  fi
7372done
7373  done
7374IFS=$as_save_IFS
7375
7376  ;;
7377esac
7378fi
7379DIRNAME=$ac_cv_path_DIRNAME
7380if test -n "$DIRNAME"; then
7381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7382$as_echo "$DIRNAME" >&6; }
7383else
7384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7385$as_echo "no" >&6; }
7386fi
7387
7388
7389  test -n "$DIRNAME" && break
7390done
7391
7392    else
7393      # If it succeeded, then it was overridden by the user. We will use it
7394      # for the tool.
7395
7396      # First remove it from the list of overridden variables, so we can test
7397      # for unknown variables in the end.
7398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7399
7400      # Check if we try to supply an empty value
7401      if test "x$DIRNAME" = x; then
7402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7403$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7405$as_echo_n "checking for DIRNAME... " >&6; }
7406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7407$as_echo "disabled" >&6; }
7408      else
7409        # Check if the provided tool contains a complete path.
7410        tool_specified="$DIRNAME"
7411        tool_basename="${tool_specified##*/}"
7412        if test "x$tool_basename" = "x$tool_specified"; then
7413          # A command without a complete path is provided, search $PATH.
7414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7415$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7416          # Extract the first word of "$tool_basename", so it can be a program name with args.
7417set dummy $tool_basename; ac_word=$2
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7419$as_echo_n "checking for $ac_word... " >&6; }
7420if ${ac_cv_path_DIRNAME+:} false; then :
7421  $as_echo_n "(cached) " >&6
7422else
7423  case $DIRNAME in
7424  [\\/]* | ?:[\\/]*)
7425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7426  ;;
7427  *)
7428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7429for as_dir in $PATH
7430do
7431  IFS=$as_save_IFS
7432  test -z "$as_dir" && as_dir=.
7433    for ac_exec_ext in '' $ac_executable_extensions; do
7434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7437    break 2
7438  fi
7439done
7440  done
7441IFS=$as_save_IFS
7442
7443  ;;
7444esac
7445fi
7446DIRNAME=$ac_cv_path_DIRNAME
7447if test -n "$DIRNAME"; then
7448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7449$as_echo "$DIRNAME" >&6; }
7450else
7451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7452$as_echo "no" >&6; }
7453fi
7454
7455
7456          if test "x$DIRNAME" = x; then
7457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7458          fi
7459        else
7460          # Otherwise we believe it is a complete path. Use it as it is.
7461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7462$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7464$as_echo_n "checking for DIRNAME... " >&6; }
7465          if test ! -x "$tool_specified"; then
7466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7467$as_echo "not found" >&6; }
7468            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7469          fi
7470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7471$as_echo "$tool_specified" >&6; }
7472        fi
7473      fi
7474    fi
7475
7476  fi
7477
7478
7479
7480  if test "x$DIRNAME" = x; then
7481    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7482  fi
7483
7484
7485
7486
7487
7488  # Publish this variable in the help.
7489
7490
7491  if [ -z "${ECHO+x}" ]; then
7492    # The variable is not set by user, try to locate tool using the code snippet
7493    for ac_prog in echo
7494do
7495  # Extract the first word of "$ac_prog", so it can be a program name with args.
7496set dummy $ac_prog; ac_word=$2
7497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7498$as_echo_n "checking for $ac_word... " >&6; }
7499if ${ac_cv_path_ECHO+:} false; then :
7500  $as_echo_n "(cached) " >&6
7501else
7502  case $ECHO in
7503  [\\/]* | ?:[\\/]*)
7504  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7505  ;;
7506  *)
7507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7508for as_dir in $PATH
7509do
7510  IFS=$as_save_IFS
7511  test -z "$as_dir" && as_dir=.
7512    for ac_exec_ext in '' $ac_executable_extensions; do
7513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7514    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7516    break 2
7517  fi
7518done
7519  done
7520IFS=$as_save_IFS
7521
7522  ;;
7523esac
7524fi
7525ECHO=$ac_cv_path_ECHO
7526if test -n "$ECHO"; then
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7528$as_echo "$ECHO" >&6; }
7529else
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531$as_echo "no" >&6; }
7532fi
7533
7534
7535  test -n "$ECHO" && break
7536done
7537
7538  else
7539    # The variable is set, but is it from the command line or the environment?
7540
7541    # Try to remove the string !ECHO! from our list.
7542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7544      # If it failed, the variable was not from the command line. Ignore it,
7545      # but warn the user (except for BASH, which is always set by the calling BASH).
7546      if test "xECHO" != xBASH; then
7547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7548$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7549      fi
7550      # Try to locate tool using the code snippet
7551      for ac_prog in echo
7552do
7553  # Extract the first word of "$ac_prog", so it can be a program name with args.
7554set dummy $ac_prog; ac_word=$2
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7556$as_echo_n "checking for $ac_word... " >&6; }
7557if ${ac_cv_path_ECHO+:} false; then :
7558  $as_echo_n "(cached) " >&6
7559else
7560  case $ECHO in
7561  [\\/]* | ?:[\\/]*)
7562  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7563  ;;
7564  *)
7565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7566for as_dir in $PATH
7567do
7568  IFS=$as_save_IFS
7569  test -z "$as_dir" && as_dir=.
7570    for ac_exec_ext in '' $ac_executable_extensions; do
7571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7572    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7574    break 2
7575  fi
7576done
7577  done
7578IFS=$as_save_IFS
7579
7580  ;;
7581esac
7582fi
7583ECHO=$ac_cv_path_ECHO
7584if test -n "$ECHO"; then
7585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7586$as_echo "$ECHO" >&6; }
7587else
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589$as_echo "no" >&6; }
7590fi
7591
7592
7593  test -n "$ECHO" && break
7594done
7595
7596    else
7597      # If it succeeded, then it was overridden by the user. We will use it
7598      # for the tool.
7599
7600      # First remove it from the list of overridden variables, so we can test
7601      # for unknown variables in the end.
7602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7603
7604      # Check if we try to supply an empty value
7605      if test "x$ECHO" = x; then
7606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7607$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7609$as_echo_n "checking for ECHO... " >&6; }
7610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7611$as_echo "disabled" >&6; }
7612      else
7613        # Check if the provided tool contains a complete path.
7614        tool_specified="$ECHO"
7615        tool_basename="${tool_specified##*/}"
7616        if test "x$tool_basename" = "x$tool_specified"; then
7617          # A command without a complete path is provided, search $PATH.
7618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7619$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7620          # Extract the first word of "$tool_basename", so it can be a program name with args.
7621set dummy $tool_basename; ac_word=$2
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623$as_echo_n "checking for $ac_word... " >&6; }
7624if ${ac_cv_path_ECHO+:} false; then :
7625  $as_echo_n "(cached) " >&6
7626else
7627  case $ECHO in
7628  [\\/]* | ?:[\\/]*)
7629  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7630  ;;
7631  *)
7632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7633for as_dir in $PATH
7634do
7635  IFS=$as_save_IFS
7636  test -z "$as_dir" && as_dir=.
7637    for ac_exec_ext in '' $ac_executable_extensions; do
7638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7639    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7641    break 2
7642  fi
7643done
7644  done
7645IFS=$as_save_IFS
7646
7647  ;;
7648esac
7649fi
7650ECHO=$ac_cv_path_ECHO
7651if test -n "$ECHO"; then
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7653$as_echo "$ECHO" >&6; }
7654else
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656$as_echo "no" >&6; }
7657fi
7658
7659
7660          if test "x$ECHO" = x; then
7661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7662          fi
7663        else
7664          # Otherwise we believe it is a complete path. Use it as it is.
7665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7666$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7668$as_echo_n "checking for ECHO... " >&6; }
7669          if test ! -x "$tool_specified"; then
7670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7671$as_echo "not found" >&6; }
7672            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7673          fi
7674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7675$as_echo "$tool_specified" >&6; }
7676        fi
7677      fi
7678    fi
7679
7680  fi
7681
7682
7683
7684  if test "x$ECHO" = x; then
7685    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7686  fi
7687
7688
7689
7690
7691
7692  # Publish this variable in the help.
7693
7694
7695  if [ -z "${EXPR+x}" ]; then
7696    # The variable is not set by user, try to locate tool using the code snippet
7697    for ac_prog in expr
7698do
7699  # Extract the first word of "$ac_prog", so it can be a program name with args.
7700set dummy $ac_prog; ac_word=$2
7701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7702$as_echo_n "checking for $ac_word... " >&6; }
7703if ${ac_cv_path_EXPR+:} false; then :
7704  $as_echo_n "(cached) " >&6
7705else
7706  case $EXPR in
7707  [\\/]* | ?:[\\/]*)
7708  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7709  ;;
7710  *)
7711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7712for as_dir in $PATH
7713do
7714  IFS=$as_save_IFS
7715  test -z "$as_dir" && as_dir=.
7716    for ac_exec_ext in '' $ac_executable_extensions; do
7717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7718    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7720    break 2
7721  fi
7722done
7723  done
7724IFS=$as_save_IFS
7725
7726  ;;
7727esac
7728fi
7729EXPR=$ac_cv_path_EXPR
7730if test -n "$EXPR"; then
7731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7732$as_echo "$EXPR" >&6; }
7733else
7734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7735$as_echo "no" >&6; }
7736fi
7737
7738
7739  test -n "$EXPR" && break
7740done
7741
7742  else
7743    # The variable is set, but is it from the command line or the environment?
7744
7745    # Try to remove the string !EXPR! from our list.
7746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7748      # If it failed, the variable was not from the command line. Ignore it,
7749      # but warn the user (except for BASH, which is always set by the calling BASH).
7750      if test "xEXPR" != xBASH; then
7751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7752$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7753      fi
7754      # Try to locate tool using the code snippet
7755      for ac_prog in expr
7756do
7757  # Extract the first word of "$ac_prog", so it can be a program name with args.
7758set dummy $ac_prog; ac_word=$2
7759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7760$as_echo_n "checking for $ac_word... " >&6; }
7761if ${ac_cv_path_EXPR+:} false; then :
7762  $as_echo_n "(cached) " >&6
7763else
7764  case $EXPR in
7765  [\\/]* | ?:[\\/]*)
7766  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7767  ;;
7768  *)
7769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7770for as_dir in $PATH
7771do
7772  IFS=$as_save_IFS
7773  test -z "$as_dir" && as_dir=.
7774    for ac_exec_ext in '' $ac_executable_extensions; do
7775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7776    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7778    break 2
7779  fi
7780done
7781  done
7782IFS=$as_save_IFS
7783
7784  ;;
7785esac
7786fi
7787EXPR=$ac_cv_path_EXPR
7788if test -n "$EXPR"; then
7789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7790$as_echo "$EXPR" >&6; }
7791else
7792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7793$as_echo "no" >&6; }
7794fi
7795
7796
7797  test -n "$EXPR" && break
7798done
7799
7800    else
7801      # If it succeeded, then it was overridden by the user. We will use it
7802      # for the tool.
7803
7804      # First remove it from the list of overridden variables, so we can test
7805      # for unknown variables in the end.
7806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7807
7808      # Check if we try to supply an empty value
7809      if test "x$EXPR" = x; then
7810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7811$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7813$as_echo_n "checking for EXPR... " >&6; }
7814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7815$as_echo "disabled" >&6; }
7816      else
7817        # Check if the provided tool contains a complete path.
7818        tool_specified="$EXPR"
7819        tool_basename="${tool_specified##*/}"
7820        if test "x$tool_basename" = "x$tool_specified"; then
7821          # A command without a complete path is provided, search $PATH.
7822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7823$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7824          # Extract the first word of "$tool_basename", so it can be a program name with args.
7825set dummy $tool_basename; ac_word=$2
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827$as_echo_n "checking for $ac_word... " >&6; }
7828if ${ac_cv_path_EXPR+:} false; then :
7829  $as_echo_n "(cached) " >&6
7830else
7831  case $EXPR in
7832  [\\/]* | ?:[\\/]*)
7833  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7834  ;;
7835  *)
7836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7837for as_dir in $PATH
7838do
7839  IFS=$as_save_IFS
7840  test -z "$as_dir" && as_dir=.
7841    for ac_exec_ext in '' $ac_executable_extensions; do
7842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7843    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7845    break 2
7846  fi
7847done
7848  done
7849IFS=$as_save_IFS
7850
7851  ;;
7852esac
7853fi
7854EXPR=$ac_cv_path_EXPR
7855if test -n "$EXPR"; then
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7857$as_echo "$EXPR" >&6; }
7858else
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
7861fi
7862
7863
7864          if test "x$EXPR" = x; then
7865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7866          fi
7867        else
7868          # Otherwise we believe it is a complete path. Use it as it is.
7869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7870$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7872$as_echo_n "checking for EXPR... " >&6; }
7873          if test ! -x "$tool_specified"; then
7874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7875$as_echo "not found" >&6; }
7876            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7877          fi
7878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7879$as_echo "$tool_specified" >&6; }
7880        fi
7881      fi
7882    fi
7883
7884  fi
7885
7886
7887
7888  if test "x$EXPR" = x; then
7889    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7890  fi
7891
7892
7893
7894
7895
7896  # Publish this variable in the help.
7897
7898
7899  if [ -z "${FILE+x}" ]; then
7900    # The variable is not set by user, try to locate tool using the code snippet
7901    for ac_prog in file
7902do
7903  # Extract the first word of "$ac_prog", so it can be a program name with args.
7904set dummy $ac_prog; ac_word=$2
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906$as_echo_n "checking for $ac_word... " >&6; }
7907if ${ac_cv_path_FILE+:} false; then :
7908  $as_echo_n "(cached) " >&6
7909else
7910  case $FILE in
7911  [\\/]* | ?:[\\/]*)
7912  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7913  ;;
7914  *)
7915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7916for as_dir in $PATH
7917do
7918  IFS=$as_save_IFS
7919  test -z "$as_dir" && as_dir=.
7920    for ac_exec_ext in '' $ac_executable_extensions; do
7921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7922    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7924    break 2
7925  fi
7926done
7927  done
7928IFS=$as_save_IFS
7929
7930  ;;
7931esac
7932fi
7933FILE=$ac_cv_path_FILE
7934if test -n "$FILE"; then
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7936$as_echo "$FILE" >&6; }
7937else
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7939$as_echo "no" >&6; }
7940fi
7941
7942
7943  test -n "$FILE" && break
7944done
7945
7946  else
7947    # The variable is set, but is it from the command line or the environment?
7948
7949    # Try to remove the string !FILE! from our list.
7950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7952      # If it failed, the variable was not from the command line. Ignore it,
7953      # but warn the user (except for BASH, which is always set by the calling BASH).
7954      if test "xFILE" != xBASH; then
7955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7956$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7957      fi
7958      # Try to locate tool using the code snippet
7959      for ac_prog in file
7960do
7961  # Extract the first word of "$ac_prog", so it can be a program name with args.
7962set dummy $ac_prog; ac_word=$2
7963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7964$as_echo_n "checking for $ac_word... " >&6; }
7965if ${ac_cv_path_FILE+:} false; then :
7966  $as_echo_n "(cached) " >&6
7967else
7968  case $FILE in
7969  [\\/]* | ?:[\\/]*)
7970  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7971  ;;
7972  *)
7973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7974for as_dir in $PATH
7975do
7976  IFS=$as_save_IFS
7977  test -z "$as_dir" && as_dir=.
7978    for ac_exec_ext in '' $ac_executable_extensions; do
7979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7980    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7982    break 2
7983  fi
7984done
7985  done
7986IFS=$as_save_IFS
7987
7988  ;;
7989esac
7990fi
7991FILE=$ac_cv_path_FILE
7992if test -n "$FILE"; then
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7994$as_echo "$FILE" >&6; }
7995else
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }
7998fi
7999
8000
8001  test -n "$FILE" && break
8002done
8003
8004    else
8005      # If it succeeded, then it was overridden by the user. We will use it
8006      # for the tool.
8007
8008      # First remove it from the list of overridden variables, so we can test
8009      # for unknown variables in the end.
8010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8011
8012      # Check if we try to supply an empty value
8013      if test "x$FILE" = x; then
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8015$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8017$as_echo_n "checking for FILE... " >&6; }
8018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8019$as_echo "disabled" >&6; }
8020      else
8021        # Check if the provided tool contains a complete path.
8022        tool_specified="$FILE"
8023        tool_basename="${tool_specified##*/}"
8024        if test "x$tool_basename" = "x$tool_specified"; then
8025          # A command without a complete path is provided, search $PATH.
8026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8027$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8028          # Extract the first word of "$tool_basename", so it can be a program name with args.
8029set dummy $tool_basename; ac_word=$2
8030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8031$as_echo_n "checking for $ac_word... " >&6; }
8032if ${ac_cv_path_FILE+:} false; then :
8033  $as_echo_n "(cached) " >&6
8034else
8035  case $FILE in
8036  [\\/]* | ?:[\\/]*)
8037  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8038  ;;
8039  *)
8040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8041for as_dir in $PATH
8042do
8043  IFS=$as_save_IFS
8044  test -z "$as_dir" && as_dir=.
8045    for ac_exec_ext in '' $ac_executable_extensions; do
8046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8047    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8049    break 2
8050  fi
8051done
8052  done
8053IFS=$as_save_IFS
8054
8055  ;;
8056esac
8057fi
8058FILE=$ac_cv_path_FILE
8059if test -n "$FILE"; then
8060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8061$as_echo "$FILE" >&6; }
8062else
8063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064$as_echo "no" >&6; }
8065fi
8066
8067
8068          if test "x$FILE" = x; then
8069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8070          fi
8071        else
8072          # Otherwise we believe it is a complete path. Use it as it is.
8073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8074$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8076$as_echo_n "checking for FILE... " >&6; }
8077          if test ! -x "$tool_specified"; then
8078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8079$as_echo "not found" >&6; }
8080            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8081          fi
8082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8083$as_echo "$tool_specified" >&6; }
8084        fi
8085      fi
8086    fi
8087
8088  fi
8089
8090
8091
8092  if test "x$FILE" = x; then
8093    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8094  fi
8095
8096
8097
8098
8099
8100  # Publish this variable in the help.
8101
8102
8103  if [ -z "${FIND+x}" ]; then
8104    # The variable is not set by user, try to locate tool using the code snippet
8105    for ac_prog in find
8106do
8107  # Extract the first word of "$ac_prog", so it can be a program name with args.
8108set dummy $ac_prog; ac_word=$2
8109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8110$as_echo_n "checking for $ac_word... " >&6; }
8111if ${ac_cv_path_FIND+:} false; then :
8112  $as_echo_n "(cached) " >&6
8113else
8114  case $FIND in
8115  [\\/]* | ?:[\\/]*)
8116  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8117  ;;
8118  *)
8119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8126    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134  ;;
8135esac
8136fi
8137FIND=$ac_cv_path_FIND
8138if test -n "$FIND"; then
8139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8140$as_echo "$FIND" >&6; }
8141else
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143$as_echo "no" >&6; }
8144fi
8145
8146
8147  test -n "$FIND" && break
8148done
8149
8150  else
8151    # The variable is set, but is it from the command line or the environment?
8152
8153    # Try to remove the string !FIND! from our list.
8154    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8155    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8156      # If it failed, the variable was not from the command line. Ignore it,
8157      # but warn the user (except for BASH, which is always set by the calling BASH).
8158      if test "xFIND" != xBASH; then
8159        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8160$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8161      fi
8162      # Try to locate tool using the code snippet
8163      for ac_prog in find
8164do
8165  # Extract the first word of "$ac_prog", so it can be a program name with args.
8166set dummy $ac_prog; ac_word=$2
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8168$as_echo_n "checking for $ac_word... " >&6; }
8169if ${ac_cv_path_FIND+:} false; then :
8170  $as_echo_n "(cached) " >&6
8171else
8172  case $FIND in
8173  [\\/]* | ?:[\\/]*)
8174  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8175  ;;
8176  *)
8177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8178for as_dir in $PATH
8179do
8180  IFS=$as_save_IFS
8181  test -z "$as_dir" && as_dir=.
8182    for ac_exec_ext in '' $ac_executable_extensions; do
8183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8184    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8186    break 2
8187  fi
8188done
8189  done
8190IFS=$as_save_IFS
8191
8192  ;;
8193esac
8194fi
8195FIND=$ac_cv_path_FIND
8196if test -n "$FIND"; then
8197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8198$as_echo "$FIND" >&6; }
8199else
8200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8201$as_echo "no" >&6; }
8202fi
8203
8204
8205  test -n "$FIND" && break
8206done
8207
8208    else
8209      # If it succeeded, then it was overridden by the user. We will use it
8210      # for the tool.
8211
8212      # First remove it from the list of overridden variables, so we can test
8213      # for unknown variables in the end.
8214      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8215
8216      # Check if we try to supply an empty value
8217      if test "x$FIND" = x; then
8218        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8219$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8221$as_echo_n "checking for FIND... " >&6; }
8222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8223$as_echo "disabled" >&6; }
8224      else
8225        # Check if the provided tool contains a complete path.
8226        tool_specified="$FIND"
8227        tool_basename="${tool_specified##*/}"
8228        if test "x$tool_basename" = "x$tool_specified"; then
8229          # A command without a complete path is provided, search $PATH.
8230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8231$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8232          # Extract the first word of "$tool_basename", so it can be a program name with args.
8233set dummy $tool_basename; ac_word=$2
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235$as_echo_n "checking for $ac_word... " >&6; }
8236if ${ac_cv_path_FIND+:} false; then :
8237  $as_echo_n "(cached) " >&6
8238else
8239  case $FIND in
8240  [\\/]* | ?:[\\/]*)
8241  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8242  ;;
8243  *)
8244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245for as_dir in $PATH
8246do
8247  IFS=$as_save_IFS
8248  test -z "$as_dir" && as_dir=.
8249    for ac_exec_ext in '' $ac_executable_extensions; do
8250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253    break 2
8254  fi
8255done
8256  done
8257IFS=$as_save_IFS
8258
8259  ;;
8260esac
8261fi
8262FIND=$ac_cv_path_FIND
8263if test -n "$FIND"; then
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8265$as_echo "$FIND" >&6; }
8266else
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
8269fi
8270
8271
8272          if test "x$FIND" = x; then
8273            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8274          fi
8275        else
8276          # Otherwise we believe it is a complete path. Use it as it is.
8277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8278$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8279          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8280$as_echo_n "checking for FIND... " >&6; }
8281          if test ! -x "$tool_specified"; then
8282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8283$as_echo "not found" >&6; }
8284            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8285          fi
8286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8287$as_echo "$tool_specified" >&6; }
8288        fi
8289      fi
8290    fi
8291
8292  fi
8293
8294
8295
8296  if test "x$FIND" = x; then
8297    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8298  fi
8299
8300
8301
8302
8303
8304  # Publish this variable in the help.
8305
8306
8307  if [ -z "${HEAD+x}" ]; then
8308    # The variable is not set by user, try to locate tool using the code snippet
8309    for ac_prog in head
8310do
8311  # Extract the first word of "$ac_prog", so it can be a program name with args.
8312set dummy $ac_prog; ac_word=$2
8313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8314$as_echo_n "checking for $ac_word... " >&6; }
8315if ${ac_cv_path_HEAD+:} false; then :
8316  $as_echo_n "(cached) " >&6
8317else
8318  case $HEAD in
8319  [\\/]* | ?:[\\/]*)
8320  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8321  ;;
8322  *)
8323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8324for as_dir in $PATH
8325do
8326  IFS=$as_save_IFS
8327  test -z "$as_dir" && as_dir=.
8328    for ac_exec_ext in '' $ac_executable_extensions; do
8329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8330    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8332    break 2
8333  fi
8334done
8335  done
8336IFS=$as_save_IFS
8337
8338  ;;
8339esac
8340fi
8341HEAD=$ac_cv_path_HEAD
8342if test -n "$HEAD"; then
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8344$as_echo "$HEAD" >&6; }
8345else
8346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8347$as_echo "no" >&6; }
8348fi
8349
8350
8351  test -n "$HEAD" && break
8352done
8353
8354  else
8355    # The variable is set, but is it from the command line or the environment?
8356
8357    # Try to remove the string !HEAD! from our list.
8358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8360      # If it failed, the variable was not from the command line. Ignore it,
8361      # but warn the user (except for BASH, which is always set by the calling BASH).
8362      if test "xHEAD" != xBASH; then
8363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8364$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8365      fi
8366      # Try to locate tool using the code snippet
8367      for ac_prog in head
8368do
8369  # Extract the first word of "$ac_prog", so it can be a program name with args.
8370set dummy $ac_prog; ac_word=$2
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
8373if ${ac_cv_path_HEAD+:} false; then :
8374  $as_echo_n "(cached) " >&6
8375else
8376  case $HEAD in
8377  [\\/]* | ?:[\\/]*)
8378  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8379  ;;
8380  *)
8381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384  IFS=$as_save_IFS
8385  test -z "$as_dir" && as_dir=.
8386    for ac_exec_ext in '' $ac_executable_extensions; do
8387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390    break 2
8391  fi
8392done
8393  done
8394IFS=$as_save_IFS
8395
8396  ;;
8397esac
8398fi
8399HEAD=$ac_cv_path_HEAD
8400if test -n "$HEAD"; then
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8402$as_echo "$HEAD" >&6; }
8403else
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
8406fi
8407
8408
8409  test -n "$HEAD" && break
8410done
8411
8412    else
8413      # If it succeeded, then it was overridden by the user. We will use it
8414      # for the tool.
8415
8416      # First remove it from the list of overridden variables, so we can test
8417      # for unknown variables in the end.
8418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8419
8420      # Check if we try to supply an empty value
8421      if test "x$HEAD" = x; then
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8423$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8425$as_echo_n "checking for HEAD... " >&6; }
8426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8427$as_echo "disabled" >&6; }
8428      else
8429        # Check if the provided tool contains a complete path.
8430        tool_specified="$HEAD"
8431        tool_basename="${tool_specified##*/}"
8432        if test "x$tool_basename" = "x$tool_specified"; then
8433          # A command without a complete path is provided, search $PATH.
8434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8435$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8436          # Extract the first word of "$tool_basename", so it can be a program name with args.
8437set dummy $tool_basename; ac_word=$2
8438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8439$as_echo_n "checking for $ac_word... " >&6; }
8440if ${ac_cv_path_HEAD+:} false; then :
8441  $as_echo_n "(cached) " >&6
8442else
8443  case $HEAD in
8444  [\\/]* | ?:[\\/]*)
8445  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8446  ;;
8447  *)
8448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8449for as_dir in $PATH
8450do
8451  IFS=$as_save_IFS
8452  test -z "$as_dir" && as_dir=.
8453    for ac_exec_ext in '' $ac_executable_extensions; do
8454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8455    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8457    break 2
8458  fi
8459done
8460  done
8461IFS=$as_save_IFS
8462
8463  ;;
8464esac
8465fi
8466HEAD=$ac_cv_path_HEAD
8467if test -n "$HEAD"; then
8468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8469$as_echo "$HEAD" >&6; }
8470else
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8472$as_echo "no" >&6; }
8473fi
8474
8475
8476          if test "x$HEAD" = x; then
8477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8478          fi
8479        else
8480          # Otherwise we believe it is a complete path. Use it as it is.
8481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8482$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8484$as_echo_n "checking for HEAD... " >&6; }
8485          if test ! -x "$tool_specified"; then
8486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8487$as_echo "not found" >&6; }
8488            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8489          fi
8490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8491$as_echo "$tool_specified" >&6; }
8492        fi
8493      fi
8494    fi
8495
8496  fi
8497
8498
8499
8500  if test "x$HEAD" = x; then
8501    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8502  fi
8503
8504
8505
8506
8507
8508  # Publish this variable in the help.
8509
8510
8511  if [ -z "${GUNZIP+x}" ]; then
8512    # The variable is not set by user, try to locate tool using the code snippet
8513    for ac_prog in gunzip
8514do
8515  # Extract the first word of "$ac_prog", so it can be a program name with args.
8516set dummy $ac_prog; ac_word=$2
8517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8518$as_echo_n "checking for $ac_word... " >&6; }
8519if ${ac_cv_path_GUNZIP+:} false; then :
8520  $as_echo_n "(cached) " >&6
8521else
8522  case $GUNZIP in
8523  [\\/]* | ?:[\\/]*)
8524  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8525  ;;
8526  *)
8527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8528for as_dir in $PATH
8529do
8530  IFS=$as_save_IFS
8531  test -z "$as_dir" && as_dir=.
8532    for ac_exec_ext in '' $ac_executable_extensions; do
8533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8534    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8536    break 2
8537  fi
8538done
8539  done
8540IFS=$as_save_IFS
8541
8542  ;;
8543esac
8544fi
8545GUNZIP=$ac_cv_path_GUNZIP
8546if test -n "$GUNZIP"; then
8547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8548$as_echo "$GUNZIP" >&6; }
8549else
8550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8551$as_echo "no" >&6; }
8552fi
8553
8554
8555  test -n "$GUNZIP" && break
8556done
8557
8558  else
8559    # The variable is set, but is it from the command line or the environment?
8560
8561    # Try to remove the string !GUNZIP! from our list.
8562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8564      # If it failed, the variable was not from the command line. Ignore it,
8565      # but warn the user (except for BASH, which is always set by the calling BASH).
8566      if test "xGUNZIP" != xBASH; then
8567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8568$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8569      fi
8570      # Try to locate tool using the code snippet
8571      for ac_prog in gunzip
8572do
8573  # Extract the first word of "$ac_prog", so it can be a program name with args.
8574set dummy $ac_prog; ac_word=$2
8575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8576$as_echo_n "checking for $ac_word... " >&6; }
8577if ${ac_cv_path_GUNZIP+:} false; then :
8578  $as_echo_n "(cached) " >&6
8579else
8580  case $GUNZIP in
8581  [\\/]* | ?:[\\/]*)
8582  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8583  ;;
8584  *)
8585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8586for as_dir in $PATH
8587do
8588  IFS=$as_save_IFS
8589  test -z "$as_dir" && as_dir=.
8590    for ac_exec_ext in '' $ac_executable_extensions; do
8591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8592    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8594    break 2
8595  fi
8596done
8597  done
8598IFS=$as_save_IFS
8599
8600  ;;
8601esac
8602fi
8603GUNZIP=$ac_cv_path_GUNZIP
8604if test -n "$GUNZIP"; then
8605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8606$as_echo "$GUNZIP" >&6; }
8607else
8608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609$as_echo "no" >&6; }
8610fi
8611
8612
8613  test -n "$GUNZIP" && break
8614done
8615
8616    else
8617      # If it succeeded, then it was overridden by the user. We will use it
8618      # for the tool.
8619
8620      # First remove it from the list of overridden variables, so we can test
8621      # for unknown variables in the end.
8622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8623
8624      # Check if we try to supply an empty value
8625      if test "x$GUNZIP" = x; then
8626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8627$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8629$as_echo_n "checking for GUNZIP... " >&6; }
8630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8631$as_echo "disabled" >&6; }
8632      else
8633        # Check if the provided tool contains a complete path.
8634        tool_specified="$GUNZIP"
8635        tool_basename="${tool_specified##*/}"
8636        if test "x$tool_basename" = "x$tool_specified"; then
8637          # A command without a complete path is provided, search $PATH.
8638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8639$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8640          # Extract the first word of "$tool_basename", so it can be a program name with args.
8641set dummy $tool_basename; ac_word=$2
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8643$as_echo_n "checking for $ac_word... " >&6; }
8644if ${ac_cv_path_GUNZIP+:} false; then :
8645  $as_echo_n "(cached) " >&6
8646else
8647  case $GUNZIP in
8648  [\\/]* | ?:[\\/]*)
8649  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8650  ;;
8651  *)
8652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8653for as_dir in $PATH
8654do
8655  IFS=$as_save_IFS
8656  test -z "$as_dir" && as_dir=.
8657    for ac_exec_ext in '' $ac_executable_extensions; do
8658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8659    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8661    break 2
8662  fi
8663done
8664  done
8665IFS=$as_save_IFS
8666
8667  ;;
8668esac
8669fi
8670GUNZIP=$ac_cv_path_GUNZIP
8671if test -n "$GUNZIP"; then
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8673$as_echo "$GUNZIP" >&6; }
8674else
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8676$as_echo "no" >&6; }
8677fi
8678
8679
8680          if test "x$GUNZIP" = x; then
8681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8682          fi
8683        else
8684          # Otherwise we believe it is a complete path. Use it as it is.
8685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8686$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8688$as_echo_n "checking for GUNZIP... " >&6; }
8689          if test ! -x "$tool_specified"; then
8690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8691$as_echo "not found" >&6; }
8692            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8693          fi
8694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8695$as_echo "$tool_specified" >&6; }
8696        fi
8697      fi
8698    fi
8699
8700  fi
8701
8702
8703
8704  if test "x$GUNZIP" = x; then
8705    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8706  fi
8707
8708
8709
8710
8711
8712  # Publish this variable in the help.
8713
8714
8715  if [ -z "${GZIP+x}" ]; then
8716    # The variable is not set by user, try to locate tool using the code snippet
8717    for ac_prog in pigz gzip
8718do
8719  # Extract the first word of "$ac_prog", so it can be a program name with args.
8720set dummy $ac_prog; ac_word=$2
8721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8722$as_echo_n "checking for $ac_word... " >&6; }
8723if ${ac_cv_path_GZIP+:} false; then :
8724  $as_echo_n "(cached) " >&6
8725else
8726  case $GZIP in
8727  [\\/]* | ?:[\\/]*)
8728  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8729  ;;
8730  *)
8731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8732for as_dir in $PATH
8733do
8734  IFS=$as_save_IFS
8735  test -z "$as_dir" && as_dir=.
8736    for ac_exec_ext in '' $ac_executable_extensions; do
8737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8738    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8740    break 2
8741  fi
8742done
8743  done
8744IFS=$as_save_IFS
8745
8746  ;;
8747esac
8748fi
8749GZIP=$ac_cv_path_GZIP
8750if test -n "$GZIP"; then
8751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8752$as_echo "$GZIP" >&6; }
8753else
8754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8755$as_echo "no" >&6; }
8756fi
8757
8758
8759  test -n "$GZIP" && break
8760done
8761
8762  else
8763    # The variable is set, but is it from the command line or the environment?
8764
8765    # Try to remove the string !GZIP! from our list.
8766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8768      # If it failed, the variable was not from the command line. Ignore it,
8769      # but warn the user (except for BASH, which is always set by the calling BASH).
8770      if test "xGZIP" != xBASH; then
8771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8772$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8773      fi
8774      # Try to locate tool using the code snippet
8775      for ac_prog in pigz gzip
8776do
8777  # Extract the first word of "$ac_prog", so it can be a program name with args.
8778set dummy $ac_prog; ac_word=$2
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8780$as_echo_n "checking for $ac_word... " >&6; }
8781if ${ac_cv_path_GZIP+:} false; then :
8782  $as_echo_n "(cached) " >&6
8783else
8784  case $GZIP in
8785  [\\/]* | ?:[\\/]*)
8786  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8787  ;;
8788  *)
8789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8790for as_dir in $PATH
8791do
8792  IFS=$as_save_IFS
8793  test -z "$as_dir" && as_dir=.
8794    for ac_exec_ext in '' $ac_executable_extensions; do
8795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8796    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8798    break 2
8799  fi
8800done
8801  done
8802IFS=$as_save_IFS
8803
8804  ;;
8805esac
8806fi
8807GZIP=$ac_cv_path_GZIP
8808if test -n "$GZIP"; then
8809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8810$as_echo "$GZIP" >&6; }
8811else
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8813$as_echo "no" >&6; }
8814fi
8815
8816
8817  test -n "$GZIP" && break
8818done
8819
8820    else
8821      # If it succeeded, then it was overridden by the user. We will use it
8822      # for the tool.
8823
8824      # First remove it from the list of overridden variables, so we can test
8825      # for unknown variables in the end.
8826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8827
8828      # Check if we try to supply an empty value
8829      if test "x$GZIP" = x; then
8830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8831$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8833$as_echo_n "checking for GZIP... " >&6; }
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8835$as_echo "disabled" >&6; }
8836      else
8837        # Check if the provided tool contains a complete path.
8838        tool_specified="$GZIP"
8839        tool_basename="${tool_specified##*/}"
8840        if test "x$tool_basename" = "x$tool_specified"; then
8841          # A command without a complete path is provided, search $PATH.
8842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8843$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8844          # Extract the first word of "$tool_basename", so it can be a program name with args.
8845set dummy $tool_basename; ac_word=$2
8846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8847$as_echo_n "checking for $ac_word... " >&6; }
8848if ${ac_cv_path_GZIP+:} false; then :
8849  $as_echo_n "(cached) " >&6
8850else
8851  case $GZIP in
8852  [\\/]* | ?:[\\/]*)
8853  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8854  ;;
8855  *)
8856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8857for as_dir in $PATH
8858do
8859  IFS=$as_save_IFS
8860  test -z "$as_dir" && as_dir=.
8861    for ac_exec_ext in '' $ac_executable_extensions; do
8862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8863    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8865    break 2
8866  fi
8867done
8868  done
8869IFS=$as_save_IFS
8870
8871  ;;
8872esac
8873fi
8874GZIP=$ac_cv_path_GZIP
8875if test -n "$GZIP"; then
8876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8877$as_echo "$GZIP" >&6; }
8878else
8879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8880$as_echo "no" >&6; }
8881fi
8882
8883
8884          if test "x$GZIP" = x; then
8885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8886          fi
8887        else
8888          # Otherwise we believe it is a complete path. Use it as it is.
8889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8890$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8892$as_echo_n "checking for GZIP... " >&6; }
8893          if test ! -x "$tool_specified"; then
8894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8895$as_echo "not found" >&6; }
8896            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8897          fi
8898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8899$as_echo "$tool_specified" >&6; }
8900        fi
8901      fi
8902    fi
8903
8904  fi
8905
8906
8907
8908  if test "x$GZIP" = x; then
8909    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8910  fi
8911
8912
8913
8914
8915
8916  # Publish this variable in the help.
8917
8918
8919  if [ -z "${LN+x}" ]; then
8920    # The variable is not set by user, try to locate tool using the code snippet
8921    for ac_prog in ln
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if ${ac_cv_path_LN+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $LN in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953LN=$ac_cv_path_LN
8954if test -n "$LN"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8956$as_echo "$LN" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$LN" && break
8964done
8965
8966  else
8967    # The variable is set, but is it from the command line or the environment?
8968
8969    # Try to remove the string !LN! from our list.
8970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8972      # If it failed, the variable was not from the command line. Ignore it,
8973      # but warn the user (except for BASH, which is always set by the calling BASH).
8974      if test "xLN" != xBASH; then
8975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8976$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8977      fi
8978      # Try to locate tool using the code snippet
8979      for ac_prog in ln
8980do
8981  # Extract the first word of "$ac_prog", so it can be a program name with args.
8982set dummy $ac_prog; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_LN+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $LN in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011LN=$ac_cv_path_LN
9012if test -n "$LN"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9014$as_echo "$LN" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021  test -n "$LN" && break
9022done
9023
9024    else
9025      # If it succeeded, then it was overridden by the user. We will use it
9026      # for the tool.
9027
9028      # First remove it from the list of overridden variables, so we can test
9029      # for unknown variables in the end.
9030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9031
9032      # Check if we try to supply an empty value
9033      if test "x$LN" = x; then
9034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9035$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9037$as_echo_n "checking for LN... " >&6; }
9038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9039$as_echo "disabled" >&6; }
9040      else
9041        # Check if the provided tool contains a complete path.
9042        tool_specified="$LN"
9043        tool_basename="${tool_specified##*/}"
9044        if test "x$tool_basename" = "x$tool_specified"; then
9045          # A command without a complete path is provided, search $PATH.
9046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9047$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9048          # Extract the first word of "$tool_basename", so it can be a program name with args.
9049set dummy $tool_basename; ac_word=$2
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9051$as_echo_n "checking for $ac_word... " >&6; }
9052if ${ac_cv_path_LN+:} false; then :
9053  $as_echo_n "(cached) " >&6
9054else
9055  case $LN in
9056  [\\/]* | ?:[\\/]*)
9057  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9058  ;;
9059  *)
9060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9061for as_dir in $PATH
9062do
9063  IFS=$as_save_IFS
9064  test -z "$as_dir" && as_dir=.
9065    for ac_exec_ext in '' $ac_executable_extensions; do
9066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9067    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9069    break 2
9070  fi
9071done
9072  done
9073IFS=$as_save_IFS
9074
9075  ;;
9076esac
9077fi
9078LN=$ac_cv_path_LN
9079if test -n "$LN"; then
9080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9081$as_echo "$LN" >&6; }
9082else
9083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084$as_echo "no" >&6; }
9085fi
9086
9087
9088          if test "x$LN" = x; then
9089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9090          fi
9091        else
9092          # Otherwise we believe it is a complete path. Use it as it is.
9093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9094$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9096$as_echo_n "checking for LN... " >&6; }
9097          if test ! -x "$tool_specified"; then
9098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9099$as_echo "not found" >&6; }
9100            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9101          fi
9102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9103$as_echo "$tool_specified" >&6; }
9104        fi
9105      fi
9106    fi
9107
9108  fi
9109
9110
9111
9112  if test "x$LN" = x; then
9113    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9114  fi
9115
9116
9117
9118
9119
9120  # Publish this variable in the help.
9121
9122
9123  if [ -z "${LS+x}" ]; then
9124    # The variable is not set by user, try to locate tool using the code snippet
9125    for ac_prog in ls
9126do
9127  # Extract the first word of "$ac_prog", so it can be a program name with args.
9128set dummy $ac_prog; ac_word=$2
9129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130$as_echo_n "checking for $ac_word... " >&6; }
9131if ${ac_cv_path_LS+:} false; then :
9132  $as_echo_n "(cached) " >&6
9133else
9134  case $LS in
9135  [\\/]* | ?:[\\/]*)
9136  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9137  ;;
9138  *)
9139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140for as_dir in $PATH
9141do
9142  IFS=$as_save_IFS
9143  test -z "$as_dir" && as_dir=.
9144    for ac_exec_ext in '' $ac_executable_extensions; do
9145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9146    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9148    break 2
9149  fi
9150done
9151  done
9152IFS=$as_save_IFS
9153
9154  ;;
9155esac
9156fi
9157LS=$ac_cv_path_LS
9158if test -n "$LS"; then
9159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9160$as_echo "$LS" >&6; }
9161else
9162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
9164fi
9165
9166
9167  test -n "$LS" && break
9168done
9169
9170  else
9171    # The variable is set, but is it from the command line or the environment?
9172
9173    # Try to remove the string !LS! from our list.
9174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9176      # If it failed, the variable was not from the command line. Ignore it,
9177      # but warn the user (except for BASH, which is always set by the calling BASH).
9178      if test "xLS" != xBASH; then
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9180$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9181      fi
9182      # Try to locate tool using the code snippet
9183      for ac_prog in ls
9184do
9185  # Extract the first word of "$ac_prog", so it can be a program name with args.
9186set dummy $ac_prog; ac_word=$2
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9188$as_echo_n "checking for $ac_word... " >&6; }
9189if ${ac_cv_path_LS+:} false; then :
9190  $as_echo_n "(cached) " >&6
9191else
9192  case $LS in
9193  [\\/]* | ?:[\\/]*)
9194  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9195  ;;
9196  *)
9197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9198for as_dir in $PATH
9199do
9200  IFS=$as_save_IFS
9201  test -z "$as_dir" && as_dir=.
9202    for ac_exec_ext in '' $ac_executable_extensions; do
9203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9204    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9206    break 2
9207  fi
9208done
9209  done
9210IFS=$as_save_IFS
9211
9212  ;;
9213esac
9214fi
9215LS=$ac_cv_path_LS
9216if test -n "$LS"; then
9217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9218$as_echo "$LS" >&6; }
9219else
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9221$as_echo "no" >&6; }
9222fi
9223
9224
9225  test -n "$LS" && break
9226done
9227
9228    else
9229      # If it succeeded, then it was overridden by the user. We will use it
9230      # for the tool.
9231
9232      # First remove it from the list of overridden variables, so we can test
9233      # for unknown variables in the end.
9234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9235
9236      # Check if we try to supply an empty value
9237      if test "x$LS" = x; then
9238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9239$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9241$as_echo_n "checking for LS... " >&6; }
9242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9243$as_echo "disabled" >&6; }
9244      else
9245        # Check if the provided tool contains a complete path.
9246        tool_specified="$LS"
9247        tool_basename="${tool_specified##*/}"
9248        if test "x$tool_basename" = "x$tool_specified"; then
9249          # A command without a complete path is provided, search $PATH.
9250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9251$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9252          # Extract the first word of "$tool_basename", so it can be a program name with args.
9253set dummy $tool_basename; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_LS+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $LS in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282LS=$ac_cv_path_LS
9283if test -n "$LS"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9285$as_echo "$LS" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292          if test "x$LS" = x; then
9293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9294          fi
9295        else
9296          # Otherwise we believe it is a complete path. Use it as it is.
9297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9298$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9300$as_echo_n "checking for LS... " >&6; }
9301          if test ! -x "$tool_specified"; then
9302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9303$as_echo "not found" >&6; }
9304            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9305          fi
9306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9307$as_echo "$tool_specified" >&6; }
9308        fi
9309      fi
9310    fi
9311
9312  fi
9313
9314
9315
9316  if test "x$LS" = x; then
9317    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9318  fi
9319
9320
9321
9322
9323
9324  # Publish this variable in the help.
9325
9326
9327  if [ -z "${MKDIR+x}" ]; then
9328    # The variable is not set by user, try to locate tool using the code snippet
9329    for ac_prog in mkdir
9330do
9331  # Extract the first word of "$ac_prog", so it can be a program name with args.
9332set dummy $ac_prog; ac_word=$2
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334$as_echo_n "checking for $ac_word... " >&6; }
9335if ${ac_cv_path_MKDIR+:} false; then :
9336  $as_echo_n "(cached) " >&6
9337else
9338  case $MKDIR in
9339  [\\/]* | ?:[\\/]*)
9340  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9341  ;;
9342  *)
9343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344for as_dir in $PATH
9345do
9346  IFS=$as_save_IFS
9347  test -z "$as_dir" && as_dir=.
9348    for ac_exec_ext in '' $ac_executable_extensions; do
9349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352    break 2
9353  fi
9354done
9355  done
9356IFS=$as_save_IFS
9357
9358  ;;
9359esac
9360fi
9361MKDIR=$ac_cv_path_MKDIR
9362if test -n "$MKDIR"; then
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9364$as_echo "$MKDIR" >&6; }
9365else
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
9368fi
9369
9370
9371  test -n "$MKDIR" && break
9372done
9373
9374  else
9375    # The variable is set, but is it from the command line or the environment?
9376
9377    # Try to remove the string !MKDIR! from our list.
9378    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9379    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9380      # If it failed, the variable was not from the command line. Ignore it,
9381      # but warn the user (except for BASH, which is always set by the calling BASH).
9382      if test "xMKDIR" != xBASH; then
9383        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9384$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9385      fi
9386      # Try to locate tool using the code snippet
9387      for ac_prog in mkdir
9388do
9389  # Extract the first word of "$ac_prog", so it can be a program name with args.
9390set dummy $ac_prog; ac_word=$2
9391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392$as_echo_n "checking for $ac_word... " >&6; }
9393if ${ac_cv_path_MKDIR+:} false; then :
9394  $as_echo_n "(cached) " >&6
9395else
9396  case $MKDIR in
9397  [\\/]* | ?:[\\/]*)
9398  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9399  ;;
9400  *)
9401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402for as_dir in $PATH
9403do
9404  IFS=$as_save_IFS
9405  test -z "$as_dir" && as_dir=.
9406    for ac_exec_ext in '' $ac_executable_extensions; do
9407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410    break 2
9411  fi
9412done
9413  done
9414IFS=$as_save_IFS
9415
9416  ;;
9417esac
9418fi
9419MKDIR=$ac_cv_path_MKDIR
9420if test -n "$MKDIR"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9422$as_echo "$MKDIR" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
9426fi
9427
9428
9429  test -n "$MKDIR" && break
9430done
9431
9432    else
9433      # If it succeeded, then it was overridden by the user. We will use it
9434      # for the tool.
9435
9436      # First remove it from the list of overridden variables, so we can test
9437      # for unknown variables in the end.
9438      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9439
9440      # Check if we try to supply an empty value
9441      if test "x$MKDIR" = x; then
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9443$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9445$as_echo_n "checking for MKDIR... " >&6; }
9446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9447$as_echo "disabled" >&6; }
9448      else
9449        # Check if the provided tool contains a complete path.
9450        tool_specified="$MKDIR"
9451        tool_basename="${tool_specified##*/}"
9452        if test "x$tool_basename" = "x$tool_specified"; then
9453          # A command without a complete path is provided, search $PATH.
9454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9455$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9456          # Extract the first word of "$tool_basename", so it can be a program name with args.
9457set dummy $tool_basename; ac_word=$2
9458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9459$as_echo_n "checking for $ac_word... " >&6; }
9460if ${ac_cv_path_MKDIR+:} false; then :
9461  $as_echo_n "(cached) " >&6
9462else
9463  case $MKDIR in
9464  [\\/]* | ?:[\\/]*)
9465  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9466  ;;
9467  *)
9468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9469for as_dir in $PATH
9470do
9471  IFS=$as_save_IFS
9472  test -z "$as_dir" && as_dir=.
9473    for ac_exec_ext in '' $ac_executable_extensions; do
9474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9475    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9477    break 2
9478  fi
9479done
9480  done
9481IFS=$as_save_IFS
9482
9483  ;;
9484esac
9485fi
9486MKDIR=$ac_cv_path_MKDIR
9487if test -n "$MKDIR"; then
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9489$as_echo "$MKDIR" >&6; }
9490else
9491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9492$as_echo "no" >&6; }
9493fi
9494
9495
9496          if test "x$MKDIR" = x; then
9497            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9498          fi
9499        else
9500          # Otherwise we believe it is a complete path. Use it as it is.
9501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9502$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9503          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9504$as_echo_n "checking for MKDIR... " >&6; }
9505          if test ! -x "$tool_specified"; then
9506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9507$as_echo "not found" >&6; }
9508            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9509          fi
9510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9511$as_echo "$tool_specified" >&6; }
9512        fi
9513      fi
9514    fi
9515
9516  fi
9517
9518
9519
9520  if test "x$MKDIR" = x; then
9521    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9522  fi
9523
9524
9525
9526
9527
9528  # Publish this variable in the help.
9529
9530
9531  if [ -z "${MKTEMP+x}" ]; then
9532    # The variable is not set by user, try to locate tool using the code snippet
9533    for ac_prog in mktemp
9534do
9535  # Extract the first word of "$ac_prog", so it can be a program name with args.
9536set dummy $ac_prog; ac_word=$2
9537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9538$as_echo_n "checking for $ac_word... " >&6; }
9539if ${ac_cv_path_MKTEMP+:} false; then :
9540  $as_echo_n "(cached) " >&6
9541else
9542  case $MKTEMP in
9543  [\\/]* | ?:[\\/]*)
9544  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9545  ;;
9546  *)
9547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9548for as_dir in $PATH
9549do
9550  IFS=$as_save_IFS
9551  test -z "$as_dir" && as_dir=.
9552    for ac_exec_ext in '' $ac_executable_extensions; do
9553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9554    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9556    break 2
9557  fi
9558done
9559  done
9560IFS=$as_save_IFS
9561
9562  ;;
9563esac
9564fi
9565MKTEMP=$ac_cv_path_MKTEMP
9566if test -n "$MKTEMP"; then
9567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9568$as_echo "$MKTEMP" >&6; }
9569else
9570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9571$as_echo "no" >&6; }
9572fi
9573
9574
9575  test -n "$MKTEMP" && break
9576done
9577
9578  else
9579    # The variable is set, but is it from the command line or the environment?
9580
9581    # Try to remove the string !MKTEMP! from our list.
9582    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9583    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9584      # If it failed, the variable was not from the command line. Ignore it,
9585      # but warn the user (except for BASH, which is always set by the calling BASH).
9586      if test "xMKTEMP" != xBASH; then
9587        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9588$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9589      fi
9590      # Try to locate tool using the code snippet
9591      for ac_prog in mktemp
9592do
9593  # Extract the first word of "$ac_prog", so it can be a program name with args.
9594set dummy $ac_prog; ac_word=$2
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9596$as_echo_n "checking for $ac_word... " >&6; }
9597if ${ac_cv_path_MKTEMP+:} false; then :
9598  $as_echo_n "(cached) " >&6
9599else
9600  case $MKTEMP in
9601  [\\/]* | ?:[\\/]*)
9602  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9603  ;;
9604  *)
9605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9606for as_dir in $PATH
9607do
9608  IFS=$as_save_IFS
9609  test -z "$as_dir" && as_dir=.
9610    for ac_exec_ext in '' $ac_executable_extensions; do
9611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9612    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9614    break 2
9615  fi
9616done
9617  done
9618IFS=$as_save_IFS
9619
9620  ;;
9621esac
9622fi
9623MKTEMP=$ac_cv_path_MKTEMP
9624if test -n "$MKTEMP"; then
9625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9626$as_echo "$MKTEMP" >&6; }
9627else
9628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9629$as_echo "no" >&6; }
9630fi
9631
9632
9633  test -n "$MKTEMP" && break
9634done
9635
9636    else
9637      # If it succeeded, then it was overridden by the user. We will use it
9638      # for the tool.
9639
9640      # First remove it from the list of overridden variables, so we can test
9641      # for unknown variables in the end.
9642      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9643
9644      # Check if we try to supply an empty value
9645      if test "x$MKTEMP" = x; then
9646        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9647$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9649$as_echo_n "checking for MKTEMP... " >&6; }
9650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9651$as_echo "disabled" >&6; }
9652      else
9653        # Check if the provided tool contains a complete path.
9654        tool_specified="$MKTEMP"
9655        tool_basename="${tool_specified##*/}"
9656        if test "x$tool_basename" = "x$tool_specified"; then
9657          # A command without a complete path is provided, search $PATH.
9658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9659$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9660          # Extract the first word of "$tool_basename", so it can be a program name with args.
9661set dummy $tool_basename; ac_word=$2
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9663$as_echo_n "checking for $ac_word... " >&6; }
9664if ${ac_cv_path_MKTEMP+:} false; then :
9665  $as_echo_n "(cached) " >&6
9666else
9667  case $MKTEMP in
9668  [\\/]* | ?:[\\/]*)
9669  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9670  ;;
9671  *)
9672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9673for as_dir in $PATH
9674do
9675  IFS=$as_save_IFS
9676  test -z "$as_dir" && as_dir=.
9677    for ac_exec_ext in '' $ac_executable_extensions; do
9678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9679    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9681    break 2
9682  fi
9683done
9684  done
9685IFS=$as_save_IFS
9686
9687  ;;
9688esac
9689fi
9690MKTEMP=$ac_cv_path_MKTEMP
9691if test -n "$MKTEMP"; then
9692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9693$as_echo "$MKTEMP" >&6; }
9694else
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696$as_echo "no" >&6; }
9697fi
9698
9699
9700          if test "x$MKTEMP" = x; then
9701            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9702          fi
9703        else
9704          # Otherwise we believe it is a complete path. Use it as it is.
9705          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9706$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9707          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9708$as_echo_n "checking for MKTEMP... " >&6; }
9709          if test ! -x "$tool_specified"; then
9710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9711$as_echo "not found" >&6; }
9712            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9713          fi
9714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9715$as_echo "$tool_specified" >&6; }
9716        fi
9717      fi
9718    fi
9719
9720  fi
9721
9722
9723
9724  if test "x$MKTEMP" = x; then
9725    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9726  fi
9727
9728
9729
9730
9731
9732  # Publish this variable in the help.
9733
9734
9735  if [ -z "${MV+x}" ]; then
9736    # The variable is not set by user, try to locate tool using the code snippet
9737    for ac_prog in mv
9738do
9739  # Extract the first word of "$ac_prog", so it can be a program name with args.
9740set dummy $ac_prog; ac_word=$2
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9742$as_echo_n "checking for $ac_word... " >&6; }
9743if ${ac_cv_path_MV+:} false; then :
9744  $as_echo_n "(cached) " >&6
9745else
9746  case $MV in
9747  [\\/]* | ?:[\\/]*)
9748  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9749  ;;
9750  *)
9751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9752for as_dir in $PATH
9753do
9754  IFS=$as_save_IFS
9755  test -z "$as_dir" && as_dir=.
9756    for ac_exec_ext in '' $ac_executable_extensions; do
9757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9758    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9760    break 2
9761  fi
9762done
9763  done
9764IFS=$as_save_IFS
9765
9766  ;;
9767esac
9768fi
9769MV=$ac_cv_path_MV
9770if test -n "$MV"; then
9771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9772$as_echo "$MV" >&6; }
9773else
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775$as_echo "no" >&6; }
9776fi
9777
9778
9779  test -n "$MV" && break
9780done
9781
9782  else
9783    # The variable is set, but is it from the command line or the environment?
9784
9785    # Try to remove the string !MV! from our list.
9786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9788      # If it failed, the variable was not from the command line. Ignore it,
9789      # but warn the user (except for BASH, which is always set by the calling BASH).
9790      if test "xMV" != xBASH; then
9791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9792$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9793      fi
9794      # Try to locate tool using the code snippet
9795      for ac_prog in mv
9796do
9797  # Extract the first word of "$ac_prog", so it can be a program name with args.
9798set dummy $ac_prog; ac_word=$2
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800$as_echo_n "checking for $ac_word... " >&6; }
9801if ${ac_cv_path_MV+:} false; then :
9802  $as_echo_n "(cached) " >&6
9803else
9804  case $MV in
9805  [\\/]* | ?:[\\/]*)
9806  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9807  ;;
9808  *)
9809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810for as_dir in $PATH
9811do
9812  IFS=$as_save_IFS
9813  test -z "$as_dir" && as_dir=.
9814    for ac_exec_ext in '' $ac_executable_extensions; do
9815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9816    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818    break 2
9819  fi
9820done
9821  done
9822IFS=$as_save_IFS
9823
9824  ;;
9825esac
9826fi
9827MV=$ac_cv_path_MV
9828if test -n "$MV"; then
9829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9830$as_echo "$MV" >&6; }
9831else
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834fi
9835
9836
9837  test -n "$MV" && break
9838done
9839
9840    else
9841      # If it succeeded, then it was overridden by the user. We will use it
9842      # for the tool.
9843
9844      # First remove it from the list of overridden variables, so we can test
9845      # for unknown variables in the end.
9846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9847
9848      # Check if we try to supply an empty value
9849      if test "x$MV" = x; then
9850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9851$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9853$as_echo_n "checking for MV... " >&6; }
9854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9855$as_echo "disabled" >&6; }
9856      else
9857        # Check if the provided tool contains a complete path.
9858        tool_specified="$MV"
9859        tool_basename="${tool_specified##*/}"
9860        if test "x$tool_basename" = "x$tool_specified"; then
9861          # A command without a complete path is provided, search $PATH.
9862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9863$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9864          # Extract the first word of "$tool_basename", so it can be a program name with args.
9865set dummy $tool_basename; ac_word=$2
9866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9867$as_echo_n "checking for $ac_word... " >&6; }
9868if ${ac_cv_path_MV+:} false; then :
9869  $as_echo_n "(cached) " >&6
9870else
9871  case $MV in
9872  [\\/]* | ?:[\\/]*)
9873  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9874  ;;
9875  *)
9876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9877for as_dir in $PATH
9878do
9879  IFS=$as_save_IFS
9880  test -z "$as_dir" && as_dir=.
9881    for ac_exec_ext in '' $ac_executable_extensions; do
9882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9883    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9885    break 2
9886  fi
9887done
9888  done
9889IFS=$as_save_IFS
9890
9891  ;;
9892esac
9893fi
9894MV=$ac_cv_path_MV
9895if test -n "$MV"; then
9896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9897$as_echo "$MV" >&6; }
9898else
9899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
9901fi
9902
9903
9904          if test "x$MV" = x; then
9905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9906          fi
9907        else
9908          # Otherwise we believe it is a complete path. Use it as it is.
9909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9910$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9912$as_echo_n "checking for MV... " >&6; }
9913          if test ! -x "$tool_specified"; then
9914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9915$as_echo "not found" >&6; }
9916            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9917          fi
9918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9919$as_echo "$tool_specified" >&6; }
9920        fi
9921      fi
9922    fi
9923
9924  fi
9925
9926
9927
9928  if test "x$MV" = x; then
9929    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9930  fi
9931
9932
9933
9934
9935
9936  # Publish this variable in the help.
9937
9938
9939  if [ -z "${NAWK+x}" ]; then
9940    # The variable is not set by user, try to locate tool using the code snippet
9941    for ac_prog in nawk gawk awk
9942do
9943  # Extract the first word of "$ac_prog", so it can be a program name with args.
9944set dummy $ac_prog; ac_word=$2
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9946$as_echo_n "checking for $ac_word... " >&6; }
9947if ${ac_cv_path_NAWK+:} false; then :
9948  $as_echo_n "(cached) " >&6
9949else
9950  case $NAWK in
9951  [\\/]* | ?:[\\/]*)
9952  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9953  ;;
9954  *)
9955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956for as_dir in $PATH
9957do
9958  IFS=$as_save_IFS
9959  test -z "$as_dir" && as_dir=.
9960    for ac_exec_ext in '' $ac_executable_extensions; do
9961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9962    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9964    break 2
9965  fi
9966done
9967  done
9968IFS=$as_save_IFS
9969
9970  ;;
9971esac
9972fi
9973NAWK=$ac_cv_path_NAWK
9974if test -n "$NAWK"; then
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9976$as_echo "$NAWK" >&6; }
9977else
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
9980fi
9981
9982
9983  test -n "$NAWK" && break
9984done
9985
9986  else
9987    # The variable is set, but is it from the command line or the environment?
9988
9989    # Try to remove the string !NAWK! from our list.
9990    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9991    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9992      # If it failed, the variable was not from the command line. Ignore it,
9993      # but warn the user (except for BASH, which is always set by the calling BASH).
9994      if test "xNAWK" != xBASH; then
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9996$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9997      fi
9998      # Try to locate tool using the code snippet
9999      for ac_prog in nawk gawk awk
10000do
10001  # Extract the first word of "$ac_prog", so it can be a program name with args.
10002set dummy $ac_prog; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if ${ac_cv_path_NAWK+:} false; then :
10006  $as_echo_n "(cached) " >&6
10007else
10008  case $NAWK in
10009  [\\/]* | ?:[\\/]*)
10010  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10011  ;;
10012  *)
10013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016  IFS=$as_save_IFS
10017  test -z "$as_dir" && as_dir=.
10018    for ac_exec_ext in '' $ac_executable_extensions; do
10019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10020    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022    break 2
10023  fi
10024done
10025  done
10026IFS=$as_save_IFS
10027
10028  ;;
10029esac
10030fi
10031NAWK=$ac_cv_path_NAWK
10032if test -n "$NAWK"; then
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10034$as_echo "$NAWK" >&6; }
10035else
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038fi
10039
10040
10041  test -n "$NAWK" && break
10042done
10043
10044    else
10045      # If it succeeded, then it was overridden by the user. We will use it
10046      # for the tool.
10047
10048      # First remove it from the list of overridden variables, so we can test
10049      # for unknown variables in the end.
10050      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10051
10052      # Check if we try to supply an empty value
10053      if test "x$NAWK" = x; then
10054        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10055$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10057$as_echo_n "checking for NAWK... " >&6; }
10058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10059$as_echo "disabled" >&6; }
10060      else
10061        # Check if the provided tool contains a complete path.
10062        tool_specified="$NAWK"
10063        tool_basename="${tool_specified##*/}"
10064        if test "x$tool_basename" = "x$tool_specified"; then
10065          # A command without a complete path is provided, search $PATH.
10066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10067$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10068          # Extract the first word of "$tool_basename", so it can be a program name with args.
10069set dummy $tool_basename; ac_word=$2
10070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10071$as_echo_n "checking for $ac_word... " >&6; }
10072if ${ac_cv_path_NAWK+:} false; then :
10073  $as_echo_n "(cached) " >&6
10074else
10075  case $NAWK in
10076  [\\/]* | ?:[\\/]*)
10077  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10078  ;;
10079  *)
10080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10081for as_dir in $PATH
10082do
10083  IFS=$as_save_IFS
10084  test -z "$as_dir" && as_dir=.
10085    for ac_exec_ext in '' $ac_executable_extensions; do
10086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10087    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10089    break 2
10090  fi
10091done
10092  done
10093IFS=$as_save_IFS
10094
10095  ;;
10096esac
10097fi
10098NAWK=$ac_cv_path_NAWK
10099if test -n "$NAWK"; then
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10101$as_echo "$NAWK" >&6; }
10102else
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
10105fi
10106
10107
10108          if test "x$NAWK" = x; then
10109            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10110          fi
10111        else
10112          # Otherwise we believe it is a complete path. Use it as it is.
10113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10114$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10115          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10116$as_echo_n "checking for NAWK... " >&6; }
10117          if test ! -x "$tool_specified"; then
10118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10119$as_echo "not found" >&6; }
10120            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10121          fi
10122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10123$as_echo "$tool_specified" >&6; }
10124        fi
10125      fi
10126    fi
10127
10128  fi
10129
10130
10131
10132  if test "x$NAWK" = x; then
10133    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10134  fi
10135
10136
10137
10138
10139
10140  # Publish this variable in the help.
10141
10142
10143  if [ -z "${PRINTF+x}" ]; then
10144    # The variable is not set by user, try to locate tool using the code snippet
10145    for ac_prog in printf
10146do
10147  # Extract the first word of "$ac_prog", so it can be a program name with args.
10148set dummy $ac_prog; ac_word=$2
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10150$as_echo_n "checking for $ac_word... " >&6; }
10151if ${ac_cv_path_PRINTF+:} false; then :
10152  $as_echo_n "(cached) " >&6
10153else
10154  case $PRINTF in
10155  [\\/]* | ?:[\\/]*)
10156  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10157  ;;
10158  *)
10159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10160for as_dir in $PATH
10161do
10162  IFS=$as_save_IFS
10163  test -z "$as_dir" && as_dir=.
10164    for ac_exec_ext in '' $ac_executable_extensions; do
10165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10166    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10168    break 2
10169  fi
10170done
10171  done
10172IFS=$as_save_IFS
10173
10174  ;;
10175esac
10176fi
10177PRINTF=$ac_cv_path_PRINTF
10178if test -n "$PRINTF"; then
10179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10180$as_echo "$PRINTF" >&6; }
10181else
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183$as_echo "no" >&6; }
10184fi
10185
10186
10187  test -n "$PRINTF" && break
10188done
10189
10190  else
10191    # The variable is set, but is it from the command line or the environment?
10192
10193    # Try to remove the string !PRINTF! from our list.
10194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10196      # If it failed, the variable was not from the command line. Ignore it,
10197      # but warn the user (except for BASH, which is always set by the calling BASH).
10198      if test "xPRINTF" != xBASH; then
10199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10200$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10201      fi
10202      # Try to locate tool using the code snippet
10203      for ac_prog in printf
10204do
10205  # Extract the first word of "$ac_prog", so it can be a program name with args.
10206set dummy $ac_prog; ac_word=$2
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10208$as_echo_n "checking for $ac_word... " >&6; }
10209if ${ac_cv_path_PRINTF+:} false; then :
10210  $as_echo_n "(cached) " >&6
10211else
10212  case $PRINTF in
10213  [\\/]* | ?:[\\/]*)
10214  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10215  ;;
10216  *)
10217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10218for as_dir in $PATH
10219do
10220  IFS=$as_save_IFS
10221  test -z "$as_dir" && as_dir=.
10222    for ac_exec_ext in '' $ac_executable_extensions; do
10223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10224    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10226    break 2
10227  fi
10228done
10229  done
10230IFS=$as_save_IFS
10231
10232  ;;
10233esac
10234fi
10235PRINTF=$ac_cv_path_PRINTF
10236if test -n "$PRINTF"; then
10237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10238$as_echo "$PRINTF" >&6; }
10239else
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
10242fi
10243
10244
10245  test -n "$PRINTF" && break
10246done
10247
10248    else
10249      # If it succeeded, then it was overridden by the user. We will use it
10250      # for the tool.
10251
10252      # First remove it from the list of overridden variables, so we can test
10253      # for unknown variables in the end.
10254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10255
10256      # Check if we try to supply an empty value
10257      if test "x$PRINTF" = x; then
10258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10259$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10261$as_echo_n "checking for PRINTF... " >&6; }
10262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10263$as_echo "disabled" >&6; }
10264      else
10265        # Check if the provided tool contains a complete path.
10266        tool_specified="$PRINTF"
10267        tool_basename="${tool_specified##*/}"
10268        if test "x$tool_basename" = "x$tool_specified"; then
10269          # A command without a complete path is provided, search $PATH.
10270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10271$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10272          # Extract the first word of "$tool_basename", so it can be a program name with args.
10273set dummy $tool_basename; ac_word=$2
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10275$as_echo_n "checking for $ac_word... " >&6; }
10276if ${ac_cv_path_PRINTF+:} false; then :
10277  $as_echo_n "(cached) " >&6
10278else
10279  case $PRINTF in
10280  [\\/]* | ?:[\\/]*)
10281  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10282  ;;
10283  *)
10284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10285for as_dir in $PATH
10286do
10287  IFS=$as_save_IFS
10288  test -z "$as_dir" && as_dir=.
10289    for ac_exec_ext in '' $ac_executable_extensions; do
10290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10291    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10293    break 2
10294  fi
10295done
10296  done
10297IFS=$as_save_IFS
10298
10299  ;;
10300esac
10301fi
10302PRINTF=$ac_cv_path_PRINTF
10303if test -n "$PRINTF"; then
10304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10305$as_echo "$PRINTF" >&6; }
10306else
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308$as_echo "no" >&6; }
10309fi
10310
10311
10312          if test "x$PRINTF" = x; then
10313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10314          fi
10315        else
10316          # Otherwise we believe it is a complete path. Use it as it is.
10317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10318$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10320$as_echo_n "checking for PRINTF... " >&6; }
10321          if test ! -x "$tool_specified"; then
10322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10323$as_echo "not found" >&6; }
10324            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10325          fi
10326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10327$as_echo "$tool_specified" >&6; }
10328        fi
10329      fi
10330    fi
10331
10332  fi
10333
10334
10335
10336  if test "x$PRINTF" = x; then
10337    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10338  fi
10339
10340
10341
10342
10343
10344  # Publish this variable in the help.
10345
10346
10347  if [ -z "${RM+x}" ]; then
10348    # The variable is not set by user, try to locate tool using the code snippet
10349    for ac_prog in rm
10350do
10351  # Extract the first word of "$ac_prog", so it can be a program name with args.
10352set dummy $ac_prog; ac_word=$2
10353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10354$as_echo_n "checking for $ac_word... " >&6; }
10355if ${ac_cv_path_RM+:} false; then :
10356  $as_echo_n "(cached) " >&6
10357else
10358  case $RM in
10359  [\\/]* | ?:[\\/]*)
10360  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10361  ;;
10362  *)
10363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10364for as_dir in $PATH
10365do
10366  IFS=$as_save_IFS
10367  test -z "$as_dir" && as_dir=.
10368    for ac_exec_ext in '' $ac_executable_extensions; do
10369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10370    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10372    break 2
10373  fi
10374done
10375  done
10376IFS=$as_save_IFS
10377
10378  ;;
10379esac
10380fi
10381RM=$ac_cv_path_RM
10382if test -n "$RM"; then
10383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10384$as_echo "$RM" >&6; }
10385else
10386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387$as_echo "no" >&6; }
10388fi
10389
10390
10391  test -n "$RM" && break
10392done
10393
10394  else
10395    # The variable is set, but is it from the command line or the environment?
10396
10397    # Try to remove the string !RM! from our list.
10398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10400      # If it failed, the variable was not from the command line. Ignore it,
10401      # but warn the user (except for BASH, which is always set by the calling BASH).
10402      if test "xRM" != xBASH; then
10403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10404$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10405      fi
10406      # Try to locate tool using the code snippet
10407      for ac_prog in rm
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_RM+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $RM in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439RM=$ac_cv_path_RM
10440if test -n "$RM"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10442$as_echo "$RM" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$RM" && break
10450done
10451
10452    else
10453      # If it succeeded, then it was overridden by the user. We will use it
10454      # for the tool.
10455
10456      # First remove it from the list of overridden variables, so we can test
10457      # for unknown variables in the end.
10458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10459
10460      # Check if we try to supply an empty value
10461      if test "x$RM" = x; then
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10463$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10465$as_echo_n "checking for RM... " >&6; }
10466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10467$as_echo "disabled" >&6; }
10468      else
10469        # Check if the provided tool contains a complete path.
10470        tool_specified="$RM"
10471        tool_basename="${tool_specified##*/}"
10472        if test "x$tool_basename" = "x$tool_specified"; then
10473          # A command without a complete path is provided, search $PATH.
10474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10475$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10476          # Extract the first word of "$tool_basename", so it can be a program name with args.
10477set dummy $tool_basename; ac_word=$2
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10479$as_echo_n "checking for $ac_word... " >&6; }
10480if ${ac_cv_path_RM+:} false; then :
10481  $as_echo_n "(cached) " >&6
10482else
10483  case $RM in
10484  [\\/]* | ?:[\\/]*)
10485  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10486  ;;
10487  *)
10488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10489for as_dir in $PATH
10490do
10491  IFS=$as_save_IFS
10492  test -z "$as_dir" && as_dir=.
10493    for ac_exec_ext in '' $ac_executable_extensions; do
10494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10495    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10497    break 2
10498  fi
10499done
10500  done
10501IFS=$as_save_IFS
10502
10503  ;;
10504esac
10505fi
10506RM=$ac_cv_path_RM
10507if test -n "$RM"; then
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10509$as_echo "$RM" >&6; }
10510else
10511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512$as_echo "no" >&6; }
10513fi
10514
10515
10516          if test "x$RM" = x; then
10517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10518          fi
10519        else
10520          # Otherwise we believe it is a complete path. Use it as it is.
10521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10522$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10524$as_echo_n "checking for RM... " >&6; }
10525          if test ! -x "$tool_specified"; then
10526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10527$as_echo "not found" >&6; }
10528            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10529          fi
10530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10531$as_echo "$tool_specified" >&6; }
10532        fi
10533      fi
10534    fi
10535
10536  fi
10537
10538
10539
10540  if test "x$RM" = x; then
10541    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10542  fi
10543
10544
10545
10546
10547
10548  # Publish this variable in the help.
10549
10550
10551  if [ -z "${RMDIR+x}" ]; then
10552    # The variable is not set by user, try to locate tool using the code snippet
10553    for ac_prog in rmdir
10554do
10555  # Extract the first word of "$ac_prog", so it can be a program name with args.
10556set dummy $ac_prog; ac_word=$2
10557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10558$as_echo_n "checking for $ac_word... " >&6; }
10559if ${ac_cv_path_RMDIR+:} false; then :
10560  $as_echo_n "(cached) " >&6
10561else
10562  case $RMDIR in
10563  [\\/]* | ?:[\\/]*)
10564  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10565  ;;
10566  *)
10567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10568for as_dir in $PATH
10569do
10570  IFS=$as_save_IFS
10571  test -z "$as_dir" && as_dir=.
10572    for ac_exec_ext in '' $ac_executable_extensions; do
10573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10574    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10576    break 2
10577  fi
10578done
10579  done
10580IFS=$as_save_IFS
10581
10582  ;;
10583esac
10584fi
10585RMDIR=$ac_cv_path_RMDIR
10586if test -n "$RMDIR"; then
10587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10588$as_echo "$RMDIR" >&6; }
10589else
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10591$as_echo "no" >&6; }
10592fi
10593
10594
10595  test -n "$RMDIR" && break
10596done
10597
10598  else
10599    # The variable is set, but is it from the command line or the environment?
10600
10601    # Try to remove the string !RMDIR! from our list.
10602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10604      # If it failed, the variable was not from the command line. Ignore it,
10605      # but warn the user (except for BASH, which is always set by the calling BASH).
10606      if test "xRMDIR" != xBASH; then
10607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10608$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10609      fi
10610      # Try to locate tool using the code snippet
10611      for ac_prog in rmdir
10612do
10613  # Extract the first word of "$ac_prog", so it can be a program name with args.
10614set dummy $ac_prog; ac_word=$2
10615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10616$as_echo_n "checking for $ac_word... " >&6; }
10617if ${ac_cv_path_RMDIR+:} false; then :
10618  $as_echo_n "(cached) " >&6
10619else
10620  case $RMDIR in
10621  [\\/]* | ?:[\\/]*)
10622  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10623  ;;
10624  *)
10625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10626for as_dir in $PATH
10627do
10628  IFS=$as_save_IFS
10629  test -z "$as_dir" && as_dir=.
10630    for ac_exec_ext in '' $ac_executable_extensions; do
10631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10632    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10634    break 2
10635  fi
10636done
10637  done
10638IFS=$as_save_IFS
10639
10640  ;;
10641esac
10642fi
10643RMDIR=$ac_cv_path_RMDIR
10644if test -n "$RMDIR"; then
10645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10646$as_echo "$RMDIR" >&6; }
10647else
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
10650fi
10651
10652
10653  test -n "$RMDIR" && break
10654done
10655
10656    else
10657      # If it succeeded, then it was overridden by the user. We will use it
10658      # for the tool.
10659
10660      # First remove it from the list of overridden variables, so we can test
10661      # for unknown variables in the end.
10662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10663
10664      # Check if we try to supply an empty value
10665      if test "x$RMDIR" = x; then
10666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10667$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10669$as_echo_n "checking for RMDIR... " >&6; }
10670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10671$as_echo "disabled" >&6; }
10672      else
10673        # Check if the provided tool contains a complete path.
10674        tool_specified="$RMDIR"
10675        tool_basename="${tool_specified##*/}"
10676        if test "x$tool_basename" = "x$tool_specified"; then
10677          # A command without a complete path is provided, search $PATH.
10678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10679$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10680          # Extract the first word of "$tool_basename", so it can be a program name with args.
10681set dummy $tool_basename; ac_word=$2
10682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10683$as_echo_n "checking for $ac_word... " >&6; }
10684if ${ac_cv_path_RMDIR+:} false; then :
10685  $as_echo_n "(cached) " >&6
10686else
10687  case $RMDIR in
10688  [\\/]* | ?:[\\/]*)
10689  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10690  ;;
10691  *)
10692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10693for as_dir in $PATH
10694do
10695  IFS=$as_save_IFS
10696  test -z "$as_dir" && as_dir=.
10697    for ac_exec_ext in '' $ac_executable_extensions; do
10698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10699    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10701    break 2
10702  fi
10703done
10704  done
10705IFS=$as_save_IFS
10706
10707  ;;
10708esac
10709fi
10710RMDIR=$ac_cv_path_RMDIR
10711if test -n "$RMDIR"; then
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10713$as_echo "$RMDIR" >&6; }
10714else
10715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716$as_echo "no" >&6; }
10717fi
10718
10719
10720          if test "x$RMDIR" = x; then
10721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10722          fi
10723        else
10724          # Otherwise we believe it is a complete path. Use it as it is.
10725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10726$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10728$as_echo_n "checking for RMDIR... " >&6; }
10729          if test ! -x "$tool_specified"; then
10730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10731$as_echo "not found" >&6; }
10732            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10733          fi
10734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10735$as_echo "$tool_specified" >&6; }
10736        fi
10737      fi
10738    fi
10739
10740  fi
10741
10742
10743
10744  if test "x$RMDIR" = x; then
10745    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10746  fi
10747
10748
10749
10750
10751
10752  # Publish this variable in the help.
10753
10754
10755  if [ -z "${SH+x}" ]; then
10756    # The variable is not set by user, try to locate tool using the code snippet
10757    for ac_prog in sh
10758do
10759  # Extract the first word of "$ac_prog", so it can be a program name with args.
10760set dummy $ac_prog; ac_word=$2
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10762$as_echo_n "checking for $ac_word... " >&6; }
10763if ${ac_cv_path_SH+:} false; then :
10764  $as_echo_n "(cached) " >&6
10765else
10766  case $SH in
10767  [\\/]* | ?:[\\/]*)
10768  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10769  ;;
10770  *)
10771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10772for as_dir in $PATH
10773do
10774  IFS=$as_save_IFS
10775  test -z "$as_dir" && as_dir=.
10776    for ac_exec_ext in '' $ac_executable_extensions; do
10777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10778    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10780    break 2
10781  fi
10782done
10783  done
10784IFS=$as_save_IFS
10785
10786  ;;
10787esac
10788fi
10789SH=$ac_cv_path_SH
10790if test -n "$SH"; then
10791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10792$as_echo "$SH" >&6; }
10793else
10794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
10796fi
10797
10798
10799  test -n "$SH" && break
10800done
10801
10802  else
10803    # The variable is set, but is it from the command line or the environment?
10804
10805    # Try to remove the string !SH! from our list.
10806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10808      # If it failed, the variable was not from the command line. Ignore it,
10809      # but warn the user (except for BASH, which is always set by the calling BASH).
10810      if test "xSH" != xBASH; then
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10812$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10813      fi
10814      # Try to locate tool using the code snippet
10815      for ac_prog in sh
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_SH+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $SH in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847SH=$ac_cv_path_SH
10848if test -n "$SH"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10850$as_echo "$SH" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$SH" && break
10858done
10859
10860    else
10861      # If it succeeded, then it was overridden by the user. We will use it
10862      # for the tool.
10863
10864      # First remove it from the list of overridden variables, so we can test
10865      # for unknown variables in the end.
10866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10867
10868      # Check if we try to supply an empty value
10869      if test "x$SH" = x; then
10870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10871$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10873$as_echo_n "checking for SH... " >&6; }
10874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10875$as_echo "disabled" >&6; }
10876      else
10877        # Check if the provided tool contains a complete path.
10878        tool_specified="$SH"
10879        tool_basename="${tool_specified##*/}"
10880        if test "x$tool_basename" = "x$tool_specified"; then
10881          # A command without a complete path is provided, search $PATH.
10882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10883$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10884          # Extract the first word of "$tool_basename", so it can be a program name with args.
10885set dummy $tool_basename; ac_word=$2
10886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10887$as_echo_n "checking for $ac_word... " >&6; }
10888if ${ac_cv_path_SH+:} false; then :
10889  $as_echo_n "(cached) " >&6
10890else
10891  case $SH in
10892  [\\/]* | ?:[\\/]*)
10893  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10894  ;;
10895  *)
10896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10897for as_dir in $PATH
10898do
10899  IFS=$as_save_IFS
10900  test -z "$as_dir" && as_dir=.
10901    for ac_exec_ext in '' $ac_executable_extensions; do
10902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10903    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10905    break 2
10906  fi
10907done
10908  done
10909IFS=$as_save_IFS
10910
10911  ;;
10912esac
10913fi
10914SH=$ac_cv_path_SH
10915if test -n "$SH"; then
10916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10917$as_echo "$SH" >&6; }
10918else
10919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10920$as_echo "no" >&6; }
10921fi
10922
10923
10924          if test "x$SH" = x; then
10925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10926          fi
10927        else
10928          # Otherwise we believe it is a complete path. Use it as it is.
10929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10930$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10932$as_echo_n "checking for SH... " >&6; }
10933          if test ! -x "$tool_specified"; then
10934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10935$as_echo "not found" >&6; }
10936            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10937          fi
10938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10939$as_echo "$tool_specified" >&6; }
10940        fi
10941      fi
10942    fi
10943
10944  fi
10945
10946
10947
10948  if test "x$SH" = x; then
10949    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10950  fi
10951
10952
10953
10954
10955
10956  # Publish this variable in the help.
10957
10958
10959  if [ -z "${SORT+x}" ]; then
10960    # The variable is not set by user, try to locate tool using the code snippet
10961    for ac_prog in sort
10962do
10963  # Extract the first word of "$ac_prog", so it can be a program name with args.
10964set dummy $ac_prog; ac_word=$2
10965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10966$as_echo_n "checking for $ac_word... " >&6; }
10967if ${ac_cv_path_SORT+:} false; then :
10968  $as_echo_n "(cached) " >&6
10969else
10970  case $SORT in
10971  [\\/]* | ?:[\\/]*)
10972  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10973  ;;
10974  *)
10975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10976for as_dir in $PATH
10977do
10978  IFS=$as_save_IFS
10979  test -z "$as_dir" && as_dir=.
10980    for ac_exec_ext in '' $ac_executable_extensions; do
10981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10982    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10984    break 2
10985  fi
10986done
10987  done
10988IFS=$as_save_IFS
10989
10990  ;;
10991esac
10992fi
10993SORT=$ac_cv_path_SORT
10994if test -n "$SORT"; then
10995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10996$as_echo "$SORT" >&6; }
10997else
10998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10999$as_echo "no" >&6; }
11000fi
11001
11002
11003  test -n "$SORT" && break
11004done
11005
11006  else
11007    # The variable is set, but is it from the command line or the environment?
11008
11009    # Try to remove the string !SORT! from our list.
11010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11012      # If it failed, the variable was not from the command line. Ignore it,
11013      # but warn the user (except for BASH, which is always set by the calling BASH).
11014      if test "xSORT" != xBASH; then
11015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11016$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11017      fi
11018      # Try to locate tool using the code snippet
11019      for ac_prog in sort
11020do
11021  # Extract the first word of "$ac_prog", so it can be a program name with args.
11022set dummy $ac_prog; ac_word=$2
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11024$as_echo_n "checking for $ac_word... " >&6; }
11025if ${ac_cv_path_SORT+:} false; then :
11026  $as_echo_n "(cached) " >&6
11027else
11028  case $SORT in
11029  [\\/]* | ?:[\\/]*)
11030  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11031  ;;
11032  *)
11033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11034for as_dir in $PATH
11035do
11036  IFS=$as_save_IFS
11037  test -z "$as_dir" && as_dir=.
11038    for ac_exec_ext in '' $ac_executable_extensions; do
11039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11040    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11042    break 2
11043  fi
11044done
11045  done
11046IFS=$as_save_IFS
11047
11048  ;;
11049esac
11050fi
11051SORT=$ac_cv_path_SORT
11052if test -n "$SORT"; then
11053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11054$as_echo "$SORT" >&6; }
11055else
11056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11057$as_echo "no" >&6; }
11058fi
11059
11060
11061  test -n "$SORT" && break
11062done
11063
11064    else
11065      # If it succeeded, then it was overridden by the user. We will use it
11066      # for the tool.
11067
11068      # First remove it from the list of overridden variables, so we can test
11069      # for unknown variables in the end.
11070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11071
11072      # Check if we try to supply an empty value
11073      if test "x$SORT" = x; then
11074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11075$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11077$as_echo_n "checking for SORT... " >&6; }
11078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11079$as_echo "disabled" >&6; }
11080      else
11081        # Check if the provided tool contains a complete path.
11082        tool_specified="$SORT"
11083        tool_basename="${tool_specified##*/}"
11084        if test "x$tool_basename" = "x$tool_specified"; then
11085          # A command without a complete path is provided, search $PATH.
11086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11087$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11088          # Extract the first word of "$tool_basename", so it can be a program name with args.
11089set dummy $tool_basename; ac_word=$2
11090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11091$as_echo_n "checking for $ac_word... " >&6; }
11092if ${ac_cv_path_SORT+:} false; then :
11093  $as_echo_n "(cached) " >&6
11094else
11095  case $SORT in
11096  [\\/]* | ?:[\\/]*)
11097  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11098  ;;
11099  *)
11100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11101for as_dir in $PATH
11102do
11103  IFS=$as_save_IFS
11104  test -z "$as_dir" && as_dir=.
11105    for ac_exec_ext in '' $ac_executable_extensions; do
11106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11107    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11109    break 2
11110  fi
11111done
11112  done
11113IFS=$as_save_IFS
11114
11115  ;;
11116esac
11117fi
11118SORT=$ac_cv_path_SORT
11119if test -n "$SORT"; then
11120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11121$as_echo "$SORT" >&6; }
11122else
11123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
11125fi
11126
11127
11128          if test "x$SORT" = x; then
11129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11130          fi
11131        else
11132          # Otherwise we believe it is a complete path. Use it as it is.
11133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11134$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11136$as_echo_n "checking for SORT... " >&6; }
11137          if test ! -x "$tool_specified"; then
11138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11139$as_echo "not found" >&6; }
11140            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11141          fi
11142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11143$as_echo "$tool_specified" >&6; }
11144        fi
11145      fi
11146    fi
11147
11148  fi
11149
11150
11151
11152  if test "x$SORT" = x; then
11153    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11154  fi
11155
11156
11157
11158
11159
11160  # Publish this variable in the help.
11161
11162
11163  if [ -z "${TAIL+x}" ]; then
11164    # The variable is not set by user, try to locate tool using the code snippet
11165    for ac_prog in tail
11166do
11167  # Extract the first word of "$ac_prog", so it can be a program name with args.
11168set dummy $ac_prog; ac_word=$2
11169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11170$as_echo_n "checking for $ac_word... " >&6; }
11171if ${ac_cv_path_TAIL+:} false; then :
11172  $as_echo_n "(cached) " >&6
11173else
11174  case $TAIL in
11175  [\\/]* | ?:[\\/]*)
11176  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11177  ;;
11178  *)
11179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11180for as_dir in $PATH
11181do
11182  IFS=$as_save_IFS
11183  test -z "$as_dir" && as_dir=.
11184    for ac_exec_ext in '' $ac_executable_extensions; do
11185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11186    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11188    break 2
11189  fi
11190done
11191  done
11192IFS=$as_save_IFS
11193
11194  ;;
11195esac
11196fi
11197TAIL=$ac_cv_path_TAIL
11198if test -n "$TAIL"; then
11199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11200$as_echo "$TAIL" >&6; }
11201else
11202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11203$as_echo "no" >&6; }
11204fi
11205
11206
11207  test -n "$TAIL" && break
11208done
11209
11210  else
11211    # The variable is set, but is it from the command line or the environment?
11212
11213    # Try to remove the string !TAIL! from our list.
11214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11216      # If it failed, the variable was not from the command line. Ignore it,
11217      # but warn the user (except for BASH, which is always set by the calling BASH).
11218      if test "xTAIL" != xBASH; then
11219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11220$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11221      fi
11222      # Try to locate tool using the code snippet
11223      for ac_prog in tail
11224do
11225  # Extract the first word of "$ac_prog", so it can be a program name with args.
11226set dummy $ac_prog; ac_word=$2
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11228$as_echo_n "checking for $ac_word... " >&6; }
11229if ${ac_cv_path_TAIL+:} false; then :
11230  $as_echo_n "(cached) " >&6
11231else
11232  case $TAIL in
11233  [\\/]* | ?:[\\/]*)
11234  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11235  ;;
11236  *)
11237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11238for as_dir in $PATH
11239do
11240  IFS=$as_save_IFS
11241  test -z "$as_dir" && as_dir=.
11242    for ac_exec_ext in '' $ac_executable_extensions; do
11243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11244    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11246    break 2
11247  fi
11248done
11249  done
11250IFS=$as_save_IFS
11251
11252  ;;
11253esac
11254fi
11255TAIL=$ac_cv_path_TAIL
11256if test -n "$TAIL"; then
11257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11258$as_echo "$TAIL" >&6; }
11259else
11260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11261$as_echo "no" >&6; }
11262fi
11263
11264
11265  test -n "$TAIL" && break
11266done
11267
11268    else
11269      # If it succeeded, then it was overridden by the user. We will use it
11270      # for the tool.
11271
11272      # First remove it from the list of overridden variables, so we can test
11273      # for unknown variables in the end.
11274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11275
11276      # Check if we try to supply an empty value
11277      if test "x$TAIL" = x; then
11278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11279$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11281$as_echo_n "checking for TAIL... " >&6; }
11282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11283$as_echo "disabled" >&6; }
11284      else
11285        # Check if the provided tool contains a complete path.
11286        tool_specified="$TAIL"
11287        tool_basename="${tool_specified##*/}"
11288        if test "x$tool_basename" = "x$tool_specified"; then
11289          # A command without a complete path is provided, search $PATH.
11290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11291$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11292          # Extract the first word of "$tool_basename", so it can be a program name with args.
11293set dummy $tool_basename; ac_word=$2
11294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11295$as_echo_n "checking for $ac_word... " >&6; }
11296if ${ac_cv_path_TAIL+:} false; then :
11297  $as_echo_n "(cached) " >&6
11298else
11299  case $TAIL in
11300  [\\/]* | ?:[\\/]*)
11301  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11302  ;;
11303  *)
11304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11305for as_dir in $PATH
11306do
11307  IFS=$as_save_IFS
11308  test -z "$as_dir" && as_dir=.
11309    for ac_exec_ext in '' $ac_executable_extensions; do
11310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11311    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11313    break 2
11314  fi
11315done
11316  done
11317IFS=$as_save_IFS
11318
11319  ;;
11320esac
11321fi
11322TAIL=$ac_cv_path_TAIL
11323if test -n "$TAIL"; then
11324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11325$as_echo "$TAIL" >&6; }
11326else
11327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11328$as_echo "no" >&6; }
11329fi
11330
11331
11332          if test "x$TAIL" = x; then
11333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11334          fi
11335        else
11336          # Otherwise we believe it is a complete path. Use it as it is.
11337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11338$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11340$as_echo_n "checking for TAIL... " >&6; }
11341          if test ! -x "$tool_specified"; then
11342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11343$as_echo "not found" >&6; }
11344            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11345          fi
11346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11347$as_echo "$tool_specified" >&6; }
11348        fi
11349      fi
11350    fi
11351
11352  fi
11353
11354
11355
11356  if test "x$TAIL" = x; then
11357    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11358  fi
11359
11360
11361
11362
11363
11364  # Publish this variable in the help.
11365
11366
11367  if [ -z "${TAR+x}" ]; then
11368    # The variable is not set by user, try to locate tool using the code snippet
11369    for ac_prog in gtar tar
11370do
11371  # Extract the first word of "$ac_prog", so it can be a program name with args.
11372set dummy $ac_prog; ac_word=$2
11373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11374$as_echo_n "checking for $ac_word... " >&6; }
11375if ${ac_cv_path_TAR+:} false; then :
11376  $as_echo_n "(cached) " >&6
11377else
11378  case $TAR in
11379  [\\/]* | ?:[\\/]*)
11380  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11381  ;;
11382  *)
11383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11384for as_dir in $PATH
11385do
11386  IFS=$as_save_IFS
11387  test -z "$as_dir" && as_dir=.
11388    for ac_exec_ext in '' $ac_executable_extensions; do
11389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11390    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11392    break 2
11393  fi
11394done
11395  done
11396IFS=$as_save_IFS
11397
11398  ;;
11399esac
11400fi
11401TAR=$ac_cv_path_TAR
11402if test -n "$TAR"; then
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11404$as_echo "$TAR" >&6; }
11405else
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
11408fi
11409
11410
11411  test -n "$TAR" && break
11412done
11413
11414  else
11415    # The variable is set, but is it from the command line or the environment?
11416
11417    # Try to remove the string !TAR! from our list.
11418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11420      # If it failed, the variable was not from the command line. Ignore it,
11421      # but warn the user (except for BASH, which is always set by the calling BASH).
11422      if test "xTAR" != xBASH; then
11423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11424$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11425      fi
11426      # Try to locate tool using the code snippet
11427      for ac_prog in gtar tar
11428do
11429  # Extract the first word of "$ac_prog", so it can be a program name with args.
11430set dummy $ac_prog; ac_word=$2
11431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11432$as_echo_n "checking for $ac_word... " >&6; }
11433if ${ac_cv_path_TAR+:} false; then :
11434  $as_echo_n "(cached) " >&6
11435else
11436  case $TAR in
11437  [\\/]* | ?:[\\/]*)
11438  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11439  ;;
11440  *)
11441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11442for as_dir in $PATH
11443do
11444  IFS=$as_save_IFS
11445  test -z "$as_dir" && as_dir=.
11446    for ac_exec_ext in '' $ac_executable_extensions; do
11447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11448    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11450    break 2
11451  fi
11452done
11453  done
11454IFS=$as_save_IFS
11455
11456  ;;
11457esac
11458fi
11459TAR=$ac_cv_path_TAR
11460if test -n "$TAR"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11462$as_echo "$TAR" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$TAR" && break
11470done
11471
11472    else
11473      # If it succeeded, then it was overridden by the user. We will use it
11474      # for the tool.
11475
11476      # First remove it from the list of overridden variables, so we can test
11477      # for unknown variables in the end.
11478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11479
11480      # Check if we try to supply an empty value
11481      if test "x$TAR" = x; then
11482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11483$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11485$as_echo_n "checking for TAR... " >&6; }
11486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11487$as_echo "disabled" >&6; }
11488      else
11489        # Check if the provided tool contains a complete path.
11490        tool_specified="$TAR"
11491        tool_basename="${tool_specified##*/}"
11492        if test "x$tool_basename" = "x$tool_specified"; then
11493          # A command without a complete path is provided, search $PATH.
11494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11495$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11496          # Extract the first word of "$tool_basename", so it can be a program name with args.
11497set dummy $tool_basename; ac_word=$2
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11499$as_echo_n "checking for $ac_word... " >&6; }
11500if ${ac_cv_path_TAR+:} false; then :
11501  $as_echo_n "(cached) " >&6
11502else
11503  case $TAR in
11504  [\\/]* | ?:[\\/]*)
11505  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11506  ;;
11507  *)
11508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11509for as_dir in $PATH
11510do
11511  IFS=$as_save_IFS
11512  test -z "$as_dir" && as_dir=.
11513    for ac_exec_ext in '' $ac_executable_extensions; do
11514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11515    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11517    break 2
11518  fi
11519done
11520  done
11521IFS=$as_save_IFS
11522
11523  ;;
11524esac
11525fi
11526TAR=$ac_cv_path_TAR
11527if test -n "$TAR"; then
11528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11529$as_echo "$TAR" >&6; }
11530else
11531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
11533fi
11534
11535
11536          if test "x$TAR" = x; then
11537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11538          fi
11539        else
11540          # Otherwise we believe it is a complete path. Use it as it is.
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11542$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11544$as_echo_n "checking for TAR... " >&6; }
11545          if test ! -x "$tool_specified"; then
11546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11547$as_echo "not found" >&6; }
11548            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11549          fi
11550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11551$as_echo "$tool_specified" >&6; }
11552        fi
11553      fi
11554    fi
11555
11556  fi
11557
11558
11559
11560  if test "x$TAR" = x; then
11561    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11562  fi
11563
11564
11565
11566
11567
11568  # Publish this variable in the help.
11569
11570
11571  if [ -z "${TEE+x}" ]; then
11572    # The variable is not set by user, try to locate tool using the code snippet
11573    for ac_prog in tee
11574do
11575  # Extract the first word of "$ac_prog", so it can be a program name with args.
11576set dummy $ac_prog; ac_word=$2
11577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11578$as_echo_n "checking for $ac_word... " >&6; }
11579if ${ac_cv_path_TEE+:} false; then :
11580  $as_echo_n "(cached) " >&6
11581else
11582  case $TEE in
11583  [\\/]* | ?:[\\/]*)
11584  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11585  ;;
11586  *)
11587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11588for as_dir in $PATH
11589do
11590  IFS=$as_save_IFS
11591  test -z "$as_dir" && as_dir=.
11592    for ac_exec_ext in '' $ac_executable_extensions; do
11593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11594    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11596    break 2
11597  fi
11598done
11599  done
11600IFS=$as_save_IFS
11601
11602  ;;
11603esac
11604fi
11605TEE=$ac_cv_path_TEE
11606if test -n "$TEE"; then
11607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11608$as_echo "$TEE" >&6; }
11609else
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
11612fi
11613
11614
11615  test -n "$TEE" && break
11616done
11617
11618  else
11619    # The variable is set, but is it from the command line or the environment?
11620
11621    # Try to remove the string !TEE! from our list.
11622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11624      # If it failed, the variable was not from the command line. Ignore it,
11625      # but warn the user (except for BASH, which is always set by the calling BASH).
11626      if test "xTEE" != xBASH; then
11627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11628$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11629      fi
11630      # Try to locate tool using the code snippet
11631      for ac_prog in tee
11632do
11633  # Extract the first word of "$ac_prog", so it can be a program name with args.
11634set dummy $ac_prog; ac_word=$2
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11636$as_echo_n "checking for $ac_word... " >&6; }
11637if ${ac_cv_path_TEE+:} false; then :
11638  $as_echo_n "(cached) " >&6
11639else
11640  case $TEE in
11641  [\\/]* | ?:[\\/]*)
11642  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11643  ;;
11644  *)
11645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11646for as_dir in $PATH
11647do
11648  IFS=$as_save_IFS
11649  test -z "$as_dir" && as_dir=.
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11652    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11654    break 2
11655  fi
11656done
11657  done
11658IFS=$as_save_IFS
11659
11660  ;;
11661esac
11662fi
11663TEE=$ac_cv_path_TEE
11664if test -n "$TEE"; then
11665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11666$as_echo "$TEE" >&6; }
11667else
11668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11669$as_echo "no" >&6; }
11670fi
11671
11672
11673  test -n "$TEE" && break
11674done
11675
11676    else
11677      # If it succeeded, then it was overridden by the user. We will use it
11678      # for the tool.
11679
11680      # First remove it from the list of overridden variables, so we can test
11681      # for unknown variables in the end.
11682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11683
11684      # Check if we try to supply an empty value
11685      if test "x$TEE" = x; then
11686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11687$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11689$as_echo_n "checking for TEE... " >&6; }
11690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11691$as_echo "disabled" >&6; }
11692      else
11693        # Check if the provided tool contains a complete path.
11694        tool_specified="$TEE"
11695        tool_basename="${tool_specified##*/}"
11696        if test "x$tool_basename" = "x$tool_specified"; then
11697          # A command without a complete path is provided, search $PATH.
11698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11699$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11700          # Extract the first word of "$tool_basename", so it can be a program name with args.
11701set dummy $tool_basename; ac_word=$2
11702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11703$as_echo_n "checking for $ac_word... " >&6; }
11704if ${ac_cv_path_TEE+:} false; then :
11705  $as_echo_n "(cached) " >&6
11706else
11707  case $TEE in
11708  [\\/]* | ?:[\\/]*)
11709  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11710  ;;
11711  *)
11712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11713for as_dir in $PATH
11714do
11715  IFS=$as_save_IFS
11716  test -z "$as_dir" && as_dir=.
11717    for ac_exec_ext in '' $ac_executable_extensions; do
11718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11719    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11721    break 2
11722  fi
11723done
11724  done
11725IFS=$as_save_IFS
11726
11727  ;;
11728esac
11729fi
11730TEE=$ac_cv_path_TEE
11731if test -n "$TEE"; then
11732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11733$as_echo "$TEE" >&6; }
11734else
11735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
11737fi
11738
11739
11740          if test "x$TEE" = x; then
11741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11742          fi
11743        else
11744          # Otherwise we believe it is a complete path. Use it as it is.
11745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11746$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11748$as_echo_n "checking for TEE... " >&6; }
11749          if test ! -x "$tool_specified"; then
11750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11751$as_echo "not found" >&6; }
11752            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11753          fi
11754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11755$as_echo "$tool_specified" >&6; }
11756        fi
11757      fi
11758    fi
11759
11760  fi
11761
11762
11763
11764  if test "x$TEE" = x; then
11765    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11766  fi
11767
11768
11769
11770
11771
11772  # Publish this variable in the help.
11773
11774
11775  if [ -z "${TOUCH+x}" ]; then
11776    # The variable is not set by user, try to locate tool using the code snippet
11777    for ac_prog in touch
11778do
11779  # Extract the first word of "$ac_prog", so it can be a program name with args.
11780set dummy $ac_prog; ac_word=$2
11781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11782$as_echo_n "checking for $ac_word... " >&6; }
11783if ${ac_cv_path_TOUCH+:} false; then :
11784  $as_echo_n "(cached) " >&6
11785else
11786  case $TOUCH in
11787  [\\/]* | ?:[\\/]*)
11788  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11789  ;;
11790  *)
11791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11792for as_dir in $PATH
11793do
11794  IFS=$as_save_IFS
11795  test -z "$as_dir" && as_dir=.
11796    for ac_exec_ext in '' $ac_executable_extensions; do
11797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11798    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11800    break 2
11801  fi
11802done
11803  done
11804IFS=$as_save_IFS
11805
11806  ;;
11807esac
11808fi
11809TOUCH=$ac_cv_path_TOUCH
11810if test -n "$TOUCH"; then
11811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11812$as_echo "$TOUCH" >&6; }
11813else
11814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815$as_echo "no" >&6; }
11816fi
11817
11818
11819  test -n "$TOUCH" && break
11820done
11821
11822  else
11823    # The variable is set, but is it from the command line or the environment?
11824
11825    # Try to remove the string !TOUCH! from our list.
11826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11828      # If it failed, the variable was not from the command line. Ignore it,
11829      # but warn the user (except for BASH, which is always set by the calling BASH).
11830      if test "xTOUCH" != xBASH; then
11831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11832$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11833      fi
11834      # Try to locate tool using the code snippet
11835      for ac_prog in touch
11836do
11837  # Extract the first word of "$ac_prog", so it can be a program name with args.
11838set dummy $ac_prog; ac_word=$2
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11840$as_echo_n "checking for $ac_word... " >&6; }
11841if ${ac_cv_path_TOUCH+:} false; then :
11842  $as_echo_n "(cached) " >&6
11843else
11844  case $TOUCH in
11845  [\\/]* | ?:[\\/]*)
11846  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11847  ;;
11848  *)
11849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11850for as_dir in $PATH
11851do
11852  IFS=$as_save_IFS
11853  test -z "$as_dir" && as_dir=.
11854    for ac_exec_ext in '' $ac_executable_extensions; do
11855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11856    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11858    break 2
11859  fi
11860done
11861  done
11862IFS=$as_save_IFS
11863
11864  ;;
11865esac
11866fi
11867TOUCH=$ac_cv_path_TOUCH
11868if test -n "$TOUCH"; then
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11870$as_echo "$TOUCH" >&6; }
11871else
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874fi
11875
11876
11877  test -n "$TOUCH" && break
11878done
11879
11880    else
11881      # If it succeeded, then it was overridden by the user. We will use it
11882      # for the tool.
11883
11884      # First remove it from the list of overridden variables, so we can test
11885      # for unknown variables in the end.
11886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11887
11888      # Check if we try to supply an empty value
11889      if test "x$TOUCH" = x; then
11890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11891$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11893$as_echo_n "checking for TOUCH... " >&6; }
11894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11895$as_echo "disabled" >&6; }
11896      else
11897        # Check if the provided tool contains a complete path.
11898        tool_specified="$TOUCH"
11899        tool_basename="${tool_specified##*/}"
11900        if test "x$tool_basename" = "x$tool_specified"; then
11901          # A command without a complete path is provided, search $PATH.
11902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11903$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11904          # Extract the first word of "$tool_basename", so it can be a program name with args.
11905set dummy $tool_basename; ac_word=$2
11906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11907$as_echo_n "checking for $ac_word... " >&6; }
11908if ${ac_cv_path_TOUCH+:} false; then :
11909  $as_echo_n "(cached) " >&6
11910else
11911  case $TOUCH in
11912  [\\/]* | ?:[\\/]*)
11913  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11914  ;;
11915  *)
11916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11917for as_dir in $PATH
11918do
11919  IFS=$as_save_IFS
11920  test -z "$as_dir" && as_dir=.
11921    for ac_exec_ext in '' $ac_executable_extensions; do
11922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11923    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11925    break 2
11926  fi
11927done
11928  done
11929IFS=$as_save_IFS
11930
11931  ;;
11932esac
11933fi
11934TOUCH=$ac_cv_path_TOUCH
11935if test -n "$TOUCH"; then
11936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11937$as_echo "$TOUCH" >&6; }
11938else
11939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11940$as_echo "no" >&6; }
11941fi
11942
11943
11944          if test "x$TOUCH" = x; then
11945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11946          fi
11947        else
11948          # Otherwise we believe it is a complete path. Use it as it is.
11949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11950$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11952$as_echo_n "checking for TOUCH... " >&6; }
11953          if test ! -x "$tool_specified"; then
11954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11955$as_echo "not found" >&6; }
11956            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11957          fi
11958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11959$as_echo "$tool_specified" >&6; }
11960        fi
11961      fi
11962    fi
11963
11964  fi
11965
11966
11967
11968  if test "x$TOUCH" = x; then
11969    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11970  fi
11971
11972
11973
11974
11975
11976  # Publish this variable in the help.
11977
11978
11979  if [ -z "${TR+x}" ]; then
11980    # The variable is not set by user, try to locate tool using the code snippet
11981    for ac_prog in tr
11982do
11983  # Extract the first word of "$ac_prog", so it can be a program name with args.
11984set dummy $ac_prog; ac_word=$2
11985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11986$as_echo_n "checking for $ac_word... " >&6; }
11987if ${ac_cv_path_TR+:} false; then :
11988  $as_echo_n "(cached) " >&6
11989else
11990  case $TR in
11991  [\\/]* | ?:[\\/]*)
11992  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11993  ;;
11994  *)
11995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11996for as_dir in $PATH
11997do
11998  IFS=$as_save_IFS
11999  test -z "$as_dir" && as_dir=.
12000    for ac_exec_ext in '' $ac_executable_extensions; do
12001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12002    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12004    break 2
12005  fi
12006done
12007  done
12008IFS=$as_save_IFS
12009
12010  ;;
12011esac
12012fi
12013TR=$ac_cv_path_TR
12014if test -n "$TR"; then
12015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12016$as_echo "$TR" >&6; }
12017else
12018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12019$as_echo "no" >&6; }
12020fi
12021
12022
12023  test -n "$TR" && break
12024done
12025
12026  else
12027    # The variable is set, but is it from the command line or the environment?
12028
12029    # Try to remove the string !TR! from our list.
12030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12032      # If it failed, the variable was not from the command line. Ignore it,
12033      # but warn the user (except for BASH, which is always set by the calling BASH).
12034      if test "xTR" != xBASH; then
12035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12036$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12037      fi
12038      # Try to locate tool using the code snippet
12039      for ac_prog in tr
12040do
12041  # Extract the first word of "$ac_prog", so it can be a program name with args.
12042set dummy $ac_prog; ac_word=$2
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12044$as_echo_n "checking for $ac_word... " >&6; }
12045if ${ac_cv_path_TR+:} false; then :
12046  $as_echo_n "(cached) " >&6
12047else
12048  case $TR in
12049  [\\/]* | ?:[\\/]*)
12050  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12051  ;;
12052  *)
12053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12054for as_dir in $PATH
12055do
12056  IFS=$as_save_IFS
12057  test -z "$as_dir" && as_dir=.
12058    for ac_exec_ext in '' $ac_executable_extensions; do
12059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12060    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12062    break 2
12063  fi
12064done
12065  done
12066IFS=$as_save_IFS
12067
12068  ;;
12069esac
12070fi
12071TR=$ac_cv_path_TR
12072if test -n "$TR"; then
12073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12074$as_echo "$TR" >&6; }
12075else
12076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12077$as_echo "no" >&6; }
12078fi
12079
12080
12081  test -n "$TR" && break
12082done
12083
12084    else
12085      # If it succeeded, then it was overridden by the user. We will use it
12086      # for the tool.
12087
12088      # First remove it from the list of overridden variables, so we can test
12089      # for unknown variables in the end.
12090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12091
12092      # Check if we try to supply an empty value
12093      if test "x$TR" = x; then
12094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12095$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12097$as_echo_n "checking for TR... " >&6; }
12098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12099$as_echo "disabled" >&6; }
12100      else
12101        # Check if the provided tool contains a complete path.
12102        tool_specified="$TR"
12103        tool_basename="${tool_specified##*/}"
12104        if test "x$tool_basename" = "x$tool_specified"; then
12105          # A command without a complete path is provided, search $PATH.
12106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12107$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12108          # Extract the first word of "$tool_basename", so it can be a program name with args.
12109set dummy $tool_basename; ac_word=$2
12110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12111$as_echo_n "checking for $ac_word... " >&6; }
12112if ${ac_cv_path_TR+:} false; then :
12113  $as_echo_n "(cached) " >&6
12114else
12115  case $TR in
12116  [\\/]* | ?:[\\/]*)
12117  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12118  ;;
12119  *)
12120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12121for as_dir in $PATH
12122do
12123  IFS=$as_save_IFS
12124  test -z "$as_dir" && as_dir=.
12125    for ac_exec_ext in '' $ac_executable_extensions; do
12126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12127    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12129    break 2
12130  fi
12131done
12132  done
12133IFS=$as_save_IFS
12134
12135  ;;
12136esac
12137fi
12138TR=$ac_cv_path_TR
12139if test -n "$TR"; then
12140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12141$as_echo "$TR" >&6; }
12142else
12143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12144$as_echo "no" >&6; }
12145fi
12146
12147
12148          if test "x$TR" = x; then
12149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12150          fi
12151        else
12152          # Otherwise we believe it is a complete path. Use it as it is.
12153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12154$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12156$as_echo_n "checking for TR... " >&6; }
12157          if test ! -x "$tool_specified"; then
12158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12159$as_echo "not found" >&6; }
12160            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12161          fi
12162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12163$as_echo "$tool_specified" >&6; }
12164        fi
12165      fi
12166    fi
12167
12168  fi
12169
12170
12171
12172  if test "x$TR" = x; then
12173    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12174  fi
12175
12176
12177
12178
12179
12180  # Publish this variable in the help.
12181
12182
12183  if [ -z "${UNAME+x}" ]; then
12184    # The variable is not set by user, try to locate tool using the code snippet
12185    for ac_prog in uname
12186do
12187  # Extract the first word of "$ac_prog", so it can be a program name with args.
12188set dummy $ac_prog; ac_word=$2
12189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12190$as_echo_n "checking for $ac_word... " >&6; }
12191if ${ac_cv_path_UNAME+:} false; then :
12192  $as_echo_n "(cached) " >&6
12193else
12194  case $UNAME in
12195  [\\/]* | ?:[\\/]*)
12196  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12197  ;;
12198  *)
12199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12200for as_dir in $PATH
12201do
12202  IFS=$as_save_IFS
12203  test -z "$as_dir" && as_dir=.
12204    for ac_exec_ext in '' $ac_executable_extensions; do
12205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12206    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12208    break 2
12209  fi
12210done
12211  done
12212IFS=$as_save_IFS
12213
12214  ;;
12215esac
12216fi
12217UNAME=$ac_cv_path_UNAME
12218if test -n "$UNAME"; then
12219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12220$as_echo "$UNAME" >&6; }
12221else
12222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12223$as_echo "no" >&6; }
12224fi
12225
12226
12227  test -n "$UNAME" && break
12228done
12229
12230  else
12231    # The variable is set, but is it from the command line or the environment?
12232
12233    # Try to remove the string !UNAME! from our list.
12234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12236      # If it failed, the variable was not from the command line. Ignore it,
12237      # but warn the user (except for BASH, which is always set by the calling BASH).
12238      if test "xUNAME" != xBASH; then
12239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12240$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12241      fi
12242      # Try to locate tool using the code snippet
12243      for ac_prog in uname
12244do
12245  # Extract the first word of "$ac_prog", so it can be a program name with args.
12246set dummy $ac_prog; ac_word=$2
12247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12248$as_echo_n "checking for $ac_word... " >&6; }
12249if ${ac_cv_path_UNAME+:} false; then :
12250  $as_echo_n "(cached) " >&6
12251else
12252  case $UNAME in
12253  [\\/]* | ?:[\\/]*)
12254  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12255  ;;
12256  *)
12257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12258for as_dir in $PATH
12259do
12260  IFS=$as_save_IFS
12261  test -z "$as_dir" && as_dir=.
12262    for ac_exec_ext in '' $ac_executable_extensions; do
12263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12264    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12266    break 2
12267  fi
12268done
12269  done
12270IFS=$as_save_IFS
12271
12272  ;;
12273esac
12274fi
12275UNAME=$ac_cv_path_UNAME
12276if test -n "$UNAME"; then
12277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12278$as_echo "$UNAME" >&6; }
12279else
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12281$as_echo "no" >&6; }
12282fi
12283
12284
12285  test -n "$UNAME" && break
12286done
12287
12288    else
12289      # If it succeeded, then it was overridden by the user. We will use it
12290      # for the tool.
12291
12292      # First remove it from the list of overridden variables, so we can test
12293      # for unknown variables in the end.
12294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12295
12296      # Check if we try to supply an empty value
12297      if test "x$UNAME" = x; then
12298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12299$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12301$as_echo_n "checking for UNAME... " >&6; }
12302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12303$as_echo "disabled" >&6; }
12304      else
12305        # Check if the provided tool contains a complete path.
12306        tool_specified="$UNAME"
12307        tool_basename="${tool_specified##*/}"
12308        if test "x$tool_basename" = "x$tool_specified"; then
12309          # A command without a complete path is provided, search $PATH.
12310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12311$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12312          # Extract the first word of "$tool_basename", so it can be a program name with args.
12313set dummy $tool_basename; ac_word=$2
12314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12315$as_echo_n "checking for $ac_word... " >&6; }
12316if ${ac_cv_path_UNAME+:} false; then :
12317  $as_echo_n "(cached) " >&6
12318else
12319  case $UNAME in
12320  [\\/]* | ?:[\\/]*)
12321  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12322  ;;
12323  *)
12324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12325for as_dir in $PATH
12326do
12327  IFS=$as_save_IFS
12328  test -z "$as_dir" && as_dir=.
12329    for ac_exec_ext in '' $ac_executable_extensions; do
12330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12331    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12333    break 2
12334  fi
12335done
12336  done
12337IFS=$as_save_IFS
12338
12339  ;;
12340esac
12341fi
12342UNAME=$ac_cv_path_UNAME
12343if test -n "$UNAME"; then
12344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12345$as_echo "$UNAME" >&6; }
12346else
12347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12348$as_echo "no" >&6; }
12349fi
12350
12351
12352          if test "x$UNAME" = x; then
12353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12354          fi
12355        else
12356          # Otherwise we believe it is a complete path. Use it as it is.
12357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12358$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12360$as_echo_n "checking for UNAME... " >&6; }
12361          if test ! -x "$tool_specified"; then
12362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12363$as_echo "not found" >&6; }
12364            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12365          fi
12366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12367$as_echo "$tool_specified" >&6; }
12368        fi
12369      fi
12370    fi
12371
12372  fi
12373
12374
12375
12376  if test "x$UNAME" = x; then
12377    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12378  fi
12379
12380
12381
12382
12383
12384  # Publish this variable in the help.
12385
12386
12387  if [ -z "${UNIQ+x}" ]; then
12388    # The variable is not set by user, try to locate tool using the code snippet
12389    for ac_prog in uniq
12390do
12391  # Extract the first word of "$ac_prog", so it can be a program name with args.
12392set dummy $ac_prog; ac_word=$2
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12394$as_echo_n "checking for $ac_word... " >&6; }
12395if ${ac_cv_path_UNIQ+:} false; then :
12396  $as_echo_n "(cached) " >&6
12397else
12398  case $UNIQ in
12399  [\\/]* | ?:[\\/]*)
12400  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12401  ;;
12402  *)
12403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12404for as_dir in $PATH
12405do
12406  IFS=$as_save_IFS
12407  test -z "$as_dir" && as_dir=.
12408    for ac_exec_ext in '' $ac_executable_extensions; do
12409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12410    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12412    break 2
12413  fi
12414done
12415  done
12416IFS=$as_save_IFS
12417
12418  ;;
12419esac
12420fi
12421UNIQ=$ac_cv_path_UNIQ
12422if test -n "$UNIQ"; then
12423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12424$as_echo "$UNIQ" >&6; }
12425else
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12427$as_echo "no" >&6; }
12428fi
12429
12430
12431  test -n "$UNIQ" && break
12432done
12433
12434  else
12435    # The variable is set, but is it from the command line or the environment?
12436
12437    # Try to remove the string !UNIQ! from our list.
12438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12440      # If it failed, the variable was not from the command line. Ignore it,
12441      # but warn the user (except for BASH, which is always set by the calling BASH).
12442      if test "xUNIQ" != xBASH; then
12443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12444$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12445      fi
12446      # Try to locate tool using the code snippet
12447      for ac_prog in uniq
12448do
12449  # Extract the first word of "$ac_prog", so it can be a program name with args.
12450set dummy $ac_prog; ac_word=$2
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12452$as_echo_n "checking for $ac_word... " >&6; }
12453if ${ac_cv_path_UNIQ+:} false; then :
12454  $as_echo_n "(cached) " >&6
12455else
12456  case $UNIQ in
12457  [\\/]* | ?:[\\/]*)
12458  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12459  ;;
12460  *)
12461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12462for as_dir in $PATH
12463do
12464  IFS=$as_save_IFS
12465  test -z "$as_dir" && as_dir=.
12466    for ac_exec_ext in '' $ac_executable_extensions; do
12467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12468    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12470    break 2
12471  fi
12472done
12473  done
12474IFS=$as_save_IFS
12475
12476  ;;
12477esac
12478fi
12479UNIQ=$ac_cv_path_UNIQ
12480if test -n "$UNIQ"; then
12481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12482$as_echo "$UNIQ" >&6; }
12483else
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12485$as_echo "no" >&6; }
12486fi
12487
12488
12489  test -n "$UNIQ" && break
12490done
12491
12492    else
12493      # If it succeeded, then it was overridden by the user. We will use it
12494      # for the tool.
12495
12496      # First remove it from the list of overridden variables, so we can test
12497      # for unknown variables in the end.
12498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12499
12500      # Check if we try to supply an empty value
12501      if test "x$UNIQ" = x; then
12502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12503$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12505$as_echo_n "checking for UNIQ... " >&6; }
12506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12507$as_echo "disabled" >&6; }
12508      else
12509        # Check if the provided tool contains a complete path.
12510        tool_specified="$UNIQ"
12511        tool_basename="${tool_specified##*/}"
12512        if test "x$tool_basename" = "x$tool_specified"; then
12513          # A command without a complete path is provided, search $PATH.
12514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12515$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12516          # Extract the first word of "$tool_basename", so it can be a program name with args.
12517set dummy $tool_basename; ac_word=$2
12518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12519$as_echo_n "checking for $ac_word... " >&6; }
12520if ${ac_cv_path_UNIQ+:} false; then :
12521  $as_echo_n "(cached) " >&6
12522else
12523  case $UNIQ in
12524  [\\/]* | ?:[\\/]*)
12525  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12526  ;;
12527  *)
12528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12529for as_dir in $PATH
12530do
12531  IFS=$as_save_IFS
12532  test -z "$as_dir" && as_dir=.
12533    for ac_exec_ext in '' $ac_executable_extensions; do
12534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12535    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12537    break 2
12538  fi
12539done
12540  done
12541IFS=$as_save_IFS
12542
12543  ;;
12544esac
12545fi
12546UNIQ=$ac_cv_path_UNIQ
12547if test -n "$UNIQ"; then
12548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12549$as_echo "$UNIQ" >&6; }
12550else
12551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12552$as_echo "no" >&6; }
12553fi
12554
12555
12556          if test "x$UNIQ" = x; then
12557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12558          fi
12559        else
12560          # Otherwise we believe it is a complete path. Use it as it is.
12561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12562$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12564$as_echo_n "checking for UNIQ... " >&6; }
12565          if test ! -x "$tool_specified"; then
12566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12567$as_echo "not found" >&6; }
12568            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12569          fi
12570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12571$as_echo "$tool_specified" >&6; }
12572        fi
12573      fi
12574    fi
12575
12576  fi
12577
12578
12579
12580  if test "x$UNIQ" = x; then
12581    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12582  fi
12583
12584
12585
12586
12587
12588  # Publish this variable in the help.
12589
12590
12591  if [ -z "${WC+x}" ]; then
12592    # The variable is not set by user, try to locate tool using the code snippet
12593    for ac_prog in wc
12594do
12595  # Extract the first word of "$ac_prog", so it can be a program name with args.
12596set dummy $ac_prog; ac_word=$2
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12598$as_echo_n "checking for $ac_word... " >&6; }
12599if ${ac_cv_path_WC+:} false; then :
12600  $as_echo_n "(cached) " >&6
12601else
12602  case $WC in
12603  [\\/]* | ?:[\\/]*)
12604  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12605  ;;
12606  *)
12607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12608for as_dir in $PATH
12609do
12610  IFS=$as_save_IFS
12611  test -z "$as_dir" && as_dir=.
12612    for ac_exec_ext in '' $ac_executable_extensions; do
12613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12614    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12616    break 2
12617  fi
12618done
12619  done
12620IFS=$as_save_IFS
12621
12622  ;;
12623esac
12624fi
12625WC=$ac_cv_path_WC
12626if test -n "$WC"; then
12627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12628$as_echo "$WC" >&6; }
12629else
12630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
12632fi
12633
12634
12635  test -n "$WC" && break
12636done
12637
12638  else
12639    # The variable is set, but is it from the command line or the environment?
12640
12641    # Try to remove the string !WC! from our list.
12642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12644      # If it failed, the variable was not from the command line. Ignore it,
12645      # but warn the user (except for BASH, which is always set by the calling BASH).
12646      if test "xWC" != xBASH; then
12647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12648$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12649      fi
12650      # Try to locate tool using the code snippet
12651      for ac_prog in wc
12652do
12653  # Extract the first word of "$ac_prog", so it can be a program name with args.
12654set dummy $ac_prog; ac_word=$2
12655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12656$as_echo_n "checking for $ac_word... " >&6; }
12657if ${ac_cv_path_WC+:} false; then :
12658  $as_echo_n "(cached) " >&6
12659else
12660  case $WC in
12661  [\\/]* | ?:[\\/]*)
12662  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12663  ;;
12664  *)
12665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12666for as_dir in $PATH
12667do
12668  IFS=$as_save_IFS
12669  test -z "$as_dir" && as_dir=.
12670    for ac_exec_ext in '' $ac_executable_extensions; do
12671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12672    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12674    break 2
12675  fi
12676done
12677  done
12678IFS=$as_save_IFS
12679
12680  ;;
12681esac
12682fi
12683WC=$ac_cv_path_WC
12684if test -n "$WC"; then
12685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12686$as_echo "$WC" >&6; }
12687else
12688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
12690fi
12691
12692
12693  test -n "$WC" && break
12694done
12695
12696    else
12697      # If it succeeded, then it was overridden by the user. We will use it
12698      # for the tool.
12699
12700      # First remove it from the list of overridden variables, so we can test
12701      # for unknown variables in the end.
12702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12703
12704      # Check if we try to supply an empty value
12705      if test "x$WC" = x; then
12706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12707$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12709$as_echo_n "checking for WC... " >&6; }
12710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12711$as_echo "disabled" >&6; }
12712      else
12713        # Check if the provided tool contains a complete path.
12714        tool_specified="$WC"
12715        tool_basename="${tool_specified##*/}"
12716        if test "x$tool_basename" = "x$tool_specified"; then
12717          # A command without a complete path is provided, search $PATH.
12718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12719$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12720          # Extract the first word of "$tool_basename", so it can be a program name with args.
12721set dummy $tool_basename; ac_word=$2
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12723$as_echo_n "checking for $ac_word... " >&6; }
12724if ${ac_cv_path_WC+:} false; then :
12725  $as_echo_n "(cached) " >&6
12726else
12727  case $WC in
12728  [\\/]* | ?:[\\/]*)
12729  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12730  ;;
12731  *)
12732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12733for as_dir in $PATH
12734do
12735  IFS=$as_save_IFS
12736  test -z "$as_dir" && as_dir=.
12737    for ac_exec_ext in '' $ac_executable_extensions; do
12738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12739    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12741    break 2
12742  fi
12743done
12744  done
12745IFS=$as_save_IFS
12746
12747  ;;
12748esac
12749fi
12750WC=$ac_cv_path_WC
12751if test -n "$WC"; then
12752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12753$as_echo "$WC" >&6; }
12754else
12755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12756$as_echo "no" >&6; }
12757fi
12758
12759
12760          if test "x$WC" = x; then
12761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12762          fi
12763        else
12764          # Otherwise we believe it is a complete path. Use it as it is.
12765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12766$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12768$as_echo_n "checking for WC... " >&6; }
12769          if test ! -x "$tool_specified"; then
12770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12771$as_echo "not found" >&6; }
12772            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12773          fi
12774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12775$as_echo "$tool_specified" >&6; }
12776        fi
12777      fi
12778    fi
12779
12780  fi
12781
12782
12783
12784  if test "x$WC" = x; then
12785    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12786  fi
12787
12788
12789
12790
12791
12792  # Publish this variable in the help.
12793
12794
12795  if [ -z "${WHICH+x}" ]; then
12796    # The variable is not set by user, try to locate tool using the code snippet
12797    for ac_prog in which
12798do
12799  # Extract the first word of "$ac_prog", so it can be a program name with args.
12800set dummy $ac_prog; ac_word=$2
12801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12802$as_echo_n "checking for $ac_word... " >&6; }
12803if ${ac_cv_path_WHICH+:} false; then :
12804  $as_echo_n "(cached) " >&6
12805else
12806  case $WHICH in
12807  [\\/]* | ?:[\\/]*)
12808  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12809  ;;
12810  *)
12811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12812for as_dir in $PATH
12813do
12814  IFS=$as_save_IFS
12815  test -z "$as_dir" && as_dir=.
12816    for ac_exec_ext in '' $ac_executable_extensions; do
12817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12818    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12820    break 2
12821  fi
12822done
12823  done
12824IFS=$as_save_IFS
12825
12826  ;;
12827esac
12828fi
12829WHICH=$ac_cv_path_WHICH
12830if test -n "$WHICH"; then
12831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12832$as_echo "$WHICH" >&6; }
12833else
12834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12835$as_echo "no" >&6; }
12836fi
12837
12838
12839  test -n "$WHICH" && break
12840done
12841
12842  else
12843    # The variable is set, but is it from the command line or the environment?
12844
12845    # Try to remove the string !WHICH! from our list.
12846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12848      # If it failed, the variable was not from the command line. Ignore it,
12849      # but warn the user (except for BASH, which is always set by the calling BASH).
12850      if test "xWHICH" != xBASH; then
12851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12852$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12853      fi
12854      # Try to locate tool using the code snippet
12855      for ac_prog in which
12856do
12857  # Extract the first word of "$ac_prog", so it can be a program name with args.
12858set dummy $ac_prog; ac_word=$2
12859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12860$as_echo_n "checking for $ac_word... " >&6; }
12861if ${ac_cv_path_WHICH+:} false; then :
12862  $as_echo_n "(cached) " >&6
12863else
12864  case $WHICH in
12865  [\\/]* | ?:[\\/]*)
12866  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12867  ;;
12868  *)
12869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12870for as_dir in $PATH
12871do
12872  IFS=$as_save_IFS
12873  test -z "$as_dir" && as_dir=.
12874    for ac_exec_ext in '' $ac_executable_extensions; do
12875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12876    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12878    break 2
12879  fi
12880done
12881  done
12882IFS=$as_save_IFS
12883
12884  ;;
12885esac
12886fi
12887WHICH=$ac_cv_path_WHICH
12888if test -n "$WHICH"; then
12889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12890$as_echo "$WHICH" >&6; }
12891else
12892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12893$as_echo "no" >&6; }
12894fi
12895
12896
12897  test -n "$WHICH" && break
12898done
12899
12900    else
12901      # If it succeeded, then it was overridden by the user. We will use it
12902      # for the tool.
12903
12904      # First remove it from the list of overridden variables, so we can test
12905      # for unknown variables in the end.
12906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12907
12908      # Check if we try to supply an empty value
12909      if test "x$WHICH" = x; then
12910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12911$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12913$as_echo_n "checking for WHICH... " >&6; }
12914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12915$as_echo "disabled" >&6; }
12916      else
12917        # Check if the provided tool contains a complete path.
12918        tool_specified="$WHICH"
12919        tool_basename="${tool_specified##*/}"
12920        if test "x$tool_basename" = "x$tool_specified"; then
12921          # A command without a complete path is provided, search $PATH.
12922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12923$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12924          # Extract the first word of "$tool_basename", so it can be a program name with args.
12925set dummy $tool_basename; ac_word=$2
12926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12927$as_echo_n "checking for $ac_word... " >&6; }
12928if ${ac_cv_path_WHICH+:} false; then :
12929  $as_echo_n "(cached) " >&6
12930else
12931  case $WHICH in
12932  [\\/]* | ?:[\\/]*)
12933  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12934  ;;
12935  *)
12936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12937for as_dir in $PATH
12938do
12939  IFS=$as_save_IFS
12940  test -z "$as_dir" && as_dir=.
12941    for ac_exec_ext in '' $ac_executable_extensions; do
12942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12943    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12945    break 2
12946  fi
12947done
12948  done
12949IFS=$as_save_IFS
12950
12951  ;;
12952esac
12953fi
12954WHICH=$ac_cv_path_WHICH
12955if test -n "$WHICH"; then
12956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12957$as_echo "$WHICH" >&6; }
12958else
12959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12960$as_echo "no" >&6; }
12961fi
12962
12963
12964          if test "x$WHICH" = x; then
12965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12966          fi
12967        else
12968          # Otherwise we believe it is a complete path. Use it as it is.
12969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12970$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12972$as_echo_n "checking for WHICH... " >&6; }
12973          if test ! -x "$tool_specified"; then
12974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12975$as_echo "not found" >&6; }
12976            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12977          fi
12978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12979$as_echo "$tool_specified" >&6; }
12980        fi
12981      fi
12982    fi
12983
12984  fi
12985
12986
12987
12988  if test "x$WHICH" = x; then
12989    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12990  fi
12991
12992
12993
12994
12995
12996  # Publish this variable in the help.
12997
12998
12999  if [ -z "${XARGS+x}" ]; then
13000    # The variable is not set by user, try to locate tool using the code snippet
13001    for ac_prog in xargs
13002do
13003  # Extract the first word of "$ac_prog", so it can be a program name with args.
13004set dummy $ac_prog; ac_word=$2
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13006$as_echo_n "checking for $ac_word... " >&6; }
13007if ${ac_cv_path_XARGS+:} false; then :
13008  $as_echo_n "(cached) " >&6
13009else
13010  case $XARGS in
13011  [\\/]* | ?:[\\/]*)
13012  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13013  ;;
13014  *)
13015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13016for as_dir in $PATH
13017do
13018  IFS=$as_save_IFS
13019  test -z "$as_dir" && as_dir=.
13020    for ac_exec_ext in '' $ac_executable_extensions; do
13021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13022    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13024    break 2
13025  fi
13026done
13027  done
13028IFS=$as_save_IFS
13029
13030  ;;
13031esac
13032fi
13033XARGS=$ac_cv_path_XARGS
13034if test -n "$XARGS"; then
13035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13036$as_echo "$XARGS" >&6; }
13037else
13038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13039$as_echo "no" >&6; }
13040fi
13041
13042
13043  test -n "$XARGS" && break
13044done
13045
13046  else
13047    # The variable is set, but is it from the command line or the environment?
13048
13049    # Try to remove the string !XARGS! from our list.
13050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13052      # If it failed, the variable was not from the command line. Ignore it,
13053      # but warn the user (except for BASH, which is always set by the calling BASH).
13054      if test "xXARGS" != xBASH; then
13055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13056$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13057      fi
13058      # Try to locate tool using the code snippet
13059      for ac_prog in xargs
13060do
13061  # Extract the first word of "$ac_prog", so it can be a program name with args.
13062set dummy $ac_prog; ac_word=$2
13063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13064$as_echo_n "checking for $ac_word... " >&6; }
13065if ${ac_cv_path_XARGS+:} false; then :
13066  $as_echo_n "(cached) " >&6
13067else
13068  case $XARGS in
13069  [\\/]* | ?:[\\/]*)
13070  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13071  ;;
13072  *)
13073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13074for as_dir in $PATH
13075do
13076  IFS=$as_save_IFS
13077  test -z "$as_dir" && as_dir=.
13078    for ac_exec_ext in '' $ac_executable_extensions; do
13079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13080    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13082    break 2
13083  fi
13084done
13085  done
13086IFS=$as_save_IFS
13087
13088  ;;
13089esac
13090fi
13091XARGS=$ac_cv_path_XARGS
13092if test -n "$XARGS"; then
13093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13094$as_echo "$XARGS" >&6; }
13095else
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13097$as_echo "no" >&6; }
13098fi
13099
13100
13101  test -n "$XARGS" && break
13102done
13103
13104    else
13105      # If it succeeded, then it was overridden by the user. We will use it
13106      # for the tool.
13107
13108      # First remove it from the list of overridden variables, so we can test
13109      # for unknown variables in the end.
13110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13111
13112      # Check if we try to supply an empty value
13113      if test "x$XARGS" = x; then
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13115$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13117$as_echo_n "checking for XARGS... " >&6; }
13118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13119$as_echo "disabled" >&6; }
13120      else
13121        # Check if the provided tool contains a complete path.
13122        tool_specified="$XARGS"
13123        tool_basename="${tool_specified##*/}"
13124        if test "x$tool_basename" = "x$tool_specified"; then
13125          # A command without a complete path is provided, search $PATH.
13126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13127$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13128          # Extract the first word of "$tool_basename", so it can be a program name with args.
13129set dummy $tool_basename; ac_word=$2
13130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13131$as_echo_n "checking for $ac_word... " >&6; }
13132if ${ac_cv_path_XARGS+:} false; then :
13133  $as_echo_n "(cached) " >&6
13134else
13135  case $XARGS in
13136  [\\/]* | ?:[\\/]*)
13137  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13138  ;;
13139  *)
13140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13141for as_dir in $PATH
13142do
13143  IFS=$as_save_IFS
13144  test -z "$as_dir" && as_dir=.
13145    for ac_exec_ext in '' $ac_executable_extensions; do
13146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13147    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13149    break 2
13150  fi
13151done
13152  done
13153IFS=$as_save_IFS
13154
13155  ;;
13156esac
13157fi
13158XARGS=$ac_cv_path_XARGS
13159if test -n "$XARGS"; then
13160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13161$as_echo "$XARGS" >&6; }
13162else
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13164$as_echo "no" >&6; }
13165fi
13166
13167
13168          if test "x$XARGS" = x; then
13169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13170          fi
13171        else
13172          # Otherwise we believe it is a complete path. Use it as it is.
13173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13174$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13176$as_echo_n "checking for XARGS... " >&6; }
13177          if test ! -x "$tool_specified"; then
13178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13179$as_echo "not found" >&6; }
13180            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13181          fi
13182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13183$as_echo "$tool_specified" >&6; }
13184        fi
13185      fi
13186    fi
13187
13188  fi
13189
13190
13191
13192  if test "x$XARGS" = x; then
13193    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13194  fi
13195
13196
13197
13198  # Then required tools that require some special treatment.
13199
13200
13201  # Publish this variable in the help.
13202
13203
13204  if [ -z "${AWK+x}" ]; then
13205    # The variable is not set by user, try to locate tool using the code snippet
13206    for ac_prog in gawk mawk nawk awk
13207do
13208  # Extract the first word of "$ac_prog", so it can be a program name with args.
13209set dummy $ac_prog; ac_word=$2
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13211$as_echo_n "checking for $ac_word... " >&6; }
13212if ${ac_cv_prog_AWK+:} false; then :
13213  $as_echo_n "(cached) " >&6
13214else
13215  if test -n "$AWK"; then
13216  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13217else
13218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13219for as_dir in $PATH
13220do
13221  IFS=$as_save_IFS
13222  test -z "$as_dir" && as_dir=.
13223    for ac_exec_ext in '' $ac_executable_extensions; do
13224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13225    ac_cv_prog_AWK="$ac_prog"
13226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13227    break 2
13228  fi
13229done
13230  done
13231IFS=$as_save_IFS
13232
13233fi
13234fi
13235AWK=$ac_cv_prog_AWK
13236if test -n "$AWK"; then
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13238$as_echo "$AWK" >&6; }
13239else
13240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242fi
13243
13244
13245  test -n "$AWK" && break
13246done
13247
13248  else
13249    # The variable is set, but is it from the command line or the environment?
13250
13251    # Try to remove the string !AWK! from our list.
13252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13254      # If it failed, the variable was not from the command line. Ignore it,
13255      # but warn the user (except for BASH, which is always set by the calling BASH).
13256      if test "xAWK" != xBASH; then
13257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13258$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13259      fi
13260      # Try to locate tool using the code snippet
13261      for ac_prog in gawk mawk nawk awk
13262do
13263  # Extract the first word of "$ac_prog", so it can be a program name with args.
13264set dummy $ac_prog; ac_word=$2
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13266$as_echo_n "checking for $ac_word... " >&6; }
13267if ${ac_cv_prog_AWK+:} false; then :
13268  $as_echo_n "(cached) " >&6
13269else
13270  if test -n "$AWK"; then
13271  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13272else
13273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13274for as_dir in $PATH
13275do
13276  IFS=$as_save_IFS
13277  test -z "$as_dir" && as_dir=.
13278    for ac_exec_ext in '' $ac_executable_extensions; do
13279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13280    ac_cv_prog_AWK="$ac_prog"
13281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13282    break 2
13283  fi
13284done
13285  done
13286IFS=$as_save_IFS
13287
13288fi
13289fi
13290AWK=$ac_cv_prog_AWK
13291if test -n "$AWK"; then
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13293$as_echo "$AWK" >&6; }
13294else
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
13297fi
13298
13299
13300  test -n "$AWK" && break
13301done
13302
13303    else
13304      # If it succeeded, then it was overridden by the user. We will use it
13305      # for the tool.
13306
13307      # First remove it from the list of overridden variables, so we can test
13308      # for unknown variables in the end.
13309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13310
13311      # Check if we try to supply an empty value
13312      if test "x$AWK" = x; then
13313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13314$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13316$as_echo_n "checking for AWK... " >&6; }
13317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13318$as_echo "disabled" >&6; }
13319      else
13320        # Check if the provided tool contains a complete path.
13321        tool_specified="$AWK"
13322        tool_basename="${tool_specified##*/}"
13323        if test "x$tool_basename" = "x$tool_specified"; then
13324          # A command without a complete path is provided, search $PATH.
13325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13326$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13327          # Extract the first word of "$tool_basename", so it can be a program name with args.
13328set dummy $tool_basename; ac_word=$2
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13330$as_echo_n "checking for $ac_word... " >&6; }
13331if ${ac_cv_path_AWK+:} false; then :
13332  $as_echo_n "(cached) " >&6
13333else
13334  case $AWK in
13335  [\\/]* | ?:[\\/]*)
13336  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13337  ;;
13338  *)
13339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13340for as_dir in $PATH
13341do
13342  IFS=$as_save_IFS
13343  test -z "$as_dir" && as_dir=.
13344    for ac_exec_ext in '' $ac_executable_extensions; do
13345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13346    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13348    break 2
13349  fi
13350done
13351  done
13352IFS=$as_save_IFS
13353
13354  ;;
13355esac
13356fi
13357AWK=$ac_cv_path_AWK
13358if test -n "$AWK"; then
13359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13360$as_echo "$AWK" >&6; }
13361else
13362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13363$as_echo "no" >&6; }
13364fi
13365
13366
13367          if test "x$AWK" = x; then
13368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13369          fi
13370        else
13371          # Otherwise we believe it is a complete path. Use it as it is.
13372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13373$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13375$as_echo_n "checking for AWK... " >&6; }
13376          if test ! -x "$tool_specified"; then
13377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13378$as_echo "not found" >&6; }
13379            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13380          fi
13381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13382$as_echo "$tool_specified" >&6; }
13383        fi
13384      fi
13385    fi
13386
13387  fi
13388
13389
13390  if test "x$AWK" = x; then
13391    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13392  fi
13393
13394
13395
13396
13397  # Publish this variable in the help.
13398
13399
13400  if [ -z "${GREP+x}" ]; then
13401    # The variable is not set by user, try to locate tool using the code snippet
13402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13403$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13404if ${ac_cv_path_GREP+:} false; then :
13405  $as_echo_n "(cached) " >&6
13406else
13407  if test -z "$GREP"; then
13408  ac_path_GREP_found=false
13409  # Loop through the user's path and test for each of PROGNAME-LIST
13410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13411for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13412do
13413  IFS=$as_save_IFS
13414  test -z "$as_dir" && as_dir=.
13415    for ac_prog in grep ggrep; do
13416    for ac_exec_ext in '' $ac_executable_extensions; do
13417      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13418      as_fn_executable_p "$ac_path_GREP" || continue
13419# Check for GNU ac_path_GREP and select it if it is found.
13420  # Check for GNU $ac_path_GREP
13421case `"$ac_path_GREP" --version 2>&1` in
13422*GNU*)
13423  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13424*)
13425  ac_count=0
13426  $as_echo_n 0123456789 >"conftest.in"
13427  while :
13428  do
13429    cat "conftest.in" "conftest.in" >"conftest.tmp"
13430    mv "conftest.tmp" "conftest.in"
13431    cp "conftest.in" "conftest.nl"
13432    $as_echo 'GREP' >> "conftest.nl"
13433    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13434    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13435    as_fn_arith $ac_count + 1 && ac_count=$as_val
13436    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13437      # Best one so far, save it but keep looking for a better one
13438      ac_cv_path_GREP="$ac_path_GREP"
13439      ac_path_GREP_max=$ac_count
13440    fi
13441    # 10*(2^10) chars as input seems more than enough
13442    test $ac_count -gt 10 && break
13443  done
13444  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13445esac
13446
13447      $ac_path_GREP_found && break 3
13448    done
13449  done
13450  done
13451IFS=$as_save_IFS
13452  if test -z "$ac_cv_path_GREP"; then
13453    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13454  fi
13455else
13456  ac_cv_path_GREP=$GREP
13457fi
13458
13459fi
13460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13461$as_echo "$ac_cv_path_GREP" >&6; }
13462 GREP="$ac_cv_path_GREP"
13463
13464
13465  else
13466    # The variable is set, but is it from the command line or the environment?
13467
13468    # Try to remove the string !GREP! from our list.
13469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13471      # If it failed, the variable was not from the command line. Ignore it,
13472      # but warn the user (except for BASH, which is always set by the calling BASH).
13473      if test "xGREP" != xBASH; then
13474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13475$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13476      fi
13477      # Try to locate tool using the code snippet
13478      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13479$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13480if ${ac_cv_path_GREP+:} false; then :
13481  $as_echo_n "(cached) " >&6
13482else
13483  if test -z "$GREP"; then
13484  ac_path_GREP_found=false
13485  # Loop through the user's path and test for each of PROGNAME-LIST
13486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13487for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13488do
13489  IFS=$as_save_IFS
13490  test -z "$as_dir" && as_dir=.
13491    for ac_prog in grep ggrep; do
13492    for ac_exec_ext in '' $ac_executable_extensions; do
13493      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13494      as_fn_executable_p "$ac_path_GREP" || continue
13495# Check for GNU ac_path_GREP and select it if it is found.
13496  # Check for GNU $ac_path_GREP
13497case `"$ac_path_GREP" --version 2>&1` in
13498*GNU*)
13499  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13500*)
13501  ac_count=0
13502  $as_echo_n 0123456789 >"conftest.in"
13503  while :
13504  do
13505    cat "conftest.in" "conftest.in" >"conftest.tmp"
13506    mv "conftest.tmp" "conftest.in"
13507    cp "conftest.in" "conftest.nl"
13508    $as_echo 'GREP' >> "conftest.nl"
13509    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13510    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13511    as_fn_arith $ac_count + 1 && ac_count=$as_val
13512    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13513      # Best one so far, save it but keep looking for a better one
13514      ac_cv_path_GREP="$ac_path_GREP"
13515      ac_path_GREP_max=$ac_count
13516    fi
13517    # 10*(2^10) chars as input seems more than enough
13518    test $ac_count -gt 10 && break
13519  done
13520  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13521esac
13522
13523      $ac_path_GREP_found && break 3
13524    done
13525  done
13526  done
13527IFS=$as_save_IFS
13528  if test -z "$ac_cv_path_GREP"; then
13529    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13530  fi
13531else
13532  ac_cv_path_GREP=$GREP
13533fi
13534
13535fi
13536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13537$as_echo "$ac_cv_path_GREP" >&6; }
13538 GREP="$ac_cv_path_GREP"
13539
13540
13541    else
13542      # If it succeeded, then it was overridden by the user. We will use it
13543      # for the tool.
13544
13545      # First remove it from the list of overridden variables, so we can test
13546      # for unknown variables in the end.
13547      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13548
13549      # Check if we try to supply an empty value
13550      if test "x$GREP" = x; then
13551        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13552$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13554$as_echo_n "checking for GREP... " >&6; }
13555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13556$as_echo "disabled" >&6; }
13557      else
13558        # Check if the provided tool contains a complete path.
13559        tool_specified="$GREP"
13560        tool_basename="${tool_specified##*/}"
13561        if test "x$tool_basename" = "x$tool_specified"; then
13562          # A command without a complete path is provided, search $PATH.
13563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13564$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13565          # Extract the first word of "$tool_basename", so it can be a program name with args.
13566set dummy $tool_basename; ac_word=$2
13567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13568$as_echo_n "checking for $ac_word... " >&6; }
13569if ${ac_cv_path_GREP+:} false; then :
13570  $as_echo_n "(cached) " >&6
13571else
13572  case $GREP in
13573  [\\/]* | ?:[\\/]*)
13574  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13575  ;;
13576  *)
13577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13578for as_dir in $PATH
13579do
13580  IFS=$as_save_IFS
13581  test -z "$as_dir" && as_dir=.
13582    for ac_exec_ext in '' $ac_executable_extensions; do
13583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13584    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13586    break 2
13587  fi
13588done
13589  done
13590IFS=$as_save_IFS
13591
13592  ;;
13593esac
13594fi
13595GREP=$ac_cv_path_GREP
13596if test -n "$GREP"; then
13597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13598$as_echo "$GREP" >&6; }
13599else
13600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
13602fi
13603
13604
13605          if test "x$GREP" = x; then
13606            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13607          fi
13608        else
13609          # Otherwise we believe it is a complete path. Use it as it is.
13610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13611$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13612          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13613$as_echo_n "checking for GREP... " >&6; }
13614          if test ! -x "$tool_specified"; then
13615            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13616$as_echo "not found" >&6; }
13617            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13618          fi
13619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13620$as_echo "$tool_specified" >&6; }
13621        fi
13622      fi
13623    fi
13624
13625  fi
13626
13627
13628  if test "x$GREP" = x; then
13629    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13630  fi
13631
13632
13633
13634
13635  # Publish this variable in the help.
13636
13637
13638  if [ -z "${EGREP+x}" ]; then
13639    # The variable is not set by user, try to locate tool using the code snippet
13640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13641$as_echo_n "checking for egrep... " >&6; }
13642if ${ac_cv_path_EGREP+:} false; then :
13643  $as_echo_n "(cached) " >&6
13644else
13645  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13646   then ac_cv_path_EGREP="$GREP -E"
13647   else
13648     if test -z "$EGREP"; then
13649  ac_path_EGREP_found=false
13650  # Loop through the user's path and test for each of PROGNAME-LIST
13651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13652for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13653do
13654  IFS=$as_save_IFS
13655  test -z "$as_dir" && as_dir=.
13656    for ac_prog in egrep; do
13657    for ac_exec_ext in '' $ac_executable_extensions; do
13658      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13659      as_fn_executable_p "$ac_path_EGREP" || continue
13660# Check for GNU ac_path_EGREP and select it if it is found.
13661  # Check for GNU $ac_path_EGREP
13662case `"$ac_path_EGREP" --version 2>&1` in
13663*GNU*)
13664  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13665*)
13666  ac_count=0
13667  $as_echo_n 0123456789 >"conftest.in"
13668  while :
13669  do
13670    cat "conftest.in" "conftest.in" >"conftest.tmp"
13671    mv "conftest.tmp" "conftest.in"
13672    cp "conftest.in" "conftest.nl"
13673    $as_echo 'EGREP' >> "conftest.nl"
13674    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13675    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13676    as_fn_arith $ac_count + 1 && ac_count=$as_val
13677    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13678      # Best one so far, save it but keep looking for a better one
13679      ac_cv_path_EGREP="$ac_path_EGREP"
13680      ac_path_EGREP_max=$ac_count
13681    fi
13682    # 10*(2^10) chars as input seems more than enough
13683    test $ac_count -gt 10 && break
13684  done
13685  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13686esac
13687
13688      $ac_path_EGREP_found && break 3
13689    done
13690  done
13691  done
13692IFS=$as_save_IFS
13693  if test -z "$ac_cv_path_EGREP"; then
13694    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13695  fi
13696else
13697  ac_cv_path_EGREP=$EGREP
13698fi
13699
13700   fi
13701fi
13702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13703$as_echo "$ac_cv_path_EGREP" >&6; }
13704 EGREP="$ac_cv_path_EGREP"
13705
13706
13707  else
13708    # The variable is set, but is it from the command line or the environment?
13709
13710    # Try to remove the string !EGREP! from our list.
13711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13713      # If it failed, the variable was not from the command line. Ignore it,
13714      # but warn the user (except for BASH, which is always set by the calling BASH).
13715      if test "xEGREP" != xBASH; then
13716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13717$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13718      fi
13719      # Try to locate tool using the code snippet
13720      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13721$as_echo_n "checking for egrep... " >&6; }
13722if ${ac_cv_path_EGREP+:} false; then :
13723  $as_echo_n "(cached) " >&6
13724else
13725  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13726   then ac_cv_path_EGREP="$GREP -E"
13727   else
13728     if test -z "$EGREP"; then
13729  ac_path_EGREP_found=false
13730  # Loop through the user's path and test for each of PROGNAME-LIST
13731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13732for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13733do
13734  IFS=$as_save_IFS
13735  test -z "$as_dir" && as_dir=.
13736    for ac_prog in egrep; do
13737    for ac_exec_ext in '' $ac_executable_extensions; do
13738      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13739      as_fn_executable_p "$ac_path_EGREP" || continue
13740# Check for GNU ac_path_EGREP and select it if it is found.
13741  # Check for GNU $ac_path_EGREP
13742case `"$ac_path_EGREP" --version 2>&1` in
13743*GNU*)
13744  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13745*)
13746  ac_count=0
13747  $as_echo_n 0123456789 >"conftest.in"
13748  while :
13749  do
13750    cat "conftest.in" "conftest.in" >"conftest.tmp"
13751    mv "conftest.tmp" "conftest.in"
13752    cp "conftest.in" "conftest.nl"
13753    $as_echo 'EGREP' >> "conftest.nl"
13754    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13755    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13756    as_fn_arith $ac_count + 1 && ac_count=$as_val
13757    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13758      # Best one so far, save it but keep looking for a better one
13759      ac_cv_path_EGREP="$ac_path_EGREP"
13760      ac_path_EGREP_max=$ac_count
13761    fi
13762    # 10*(2^10) chars as input seems more than enough
13763    test $ac_count -gt 10 && break
13764  done
13765  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13766esac
13767
13768      $ac_path_EGREP_found && break 3
13769    done
13770  done
13771  done
13772IFS=$as_save_IFS
13773  if test -z "$ac_cv_path_EGREP"; then
13774    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13775  fi
13776else
13777  ac_cv_path_EGREP=$EGREP
13778fi
13779
13780   fi
13781fi
13782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13783$as_echo "$ac_cv_path_EGREP" >&6; }
13784 EGREP="$ac_cv_path_EGREP"
13785
13786
13787    else
13788      # If it succeeded, then it was overridden by the user. We will use it
13789      # for the tool.
13790
13791      # First remove it from the list of overridden variables, so we can test
13792      # for unknown variables in the end.
13793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13794
13795      # Check if we try to supply an empty value
13796      if test "x$EGREP" = x; then
13797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13798$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13800$as_echo_n "checking for EGREP... " >&6; }
13801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13802$as_echo "disabled" >&6; }
13803      else
13804        # Check if the provided tool contains a complete path.
13805        tool_specified="$EGREP"
13806        tool_basename="${tool_specified##*/}"
13807        if test "x$tool_basename" = "x$tool_specified"; then
13808          # A command without a complete path is provided, search $PATH.
13809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13810$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13811          # Extract the first word of "$tool_basename", so it can be a program name with args.
13812set dummy $tool_basename; ac_word=$2
13813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13814$as_echo_n "checking for $ac_word... " >&6; }
13815if ${ac_cv_path_EGREP+:} false; then :
13816  $as_echo_n "(cached) " >&6
13817else
13818  case $EGREP in
13819  [\\/]* | ?:[\\/]*)
13820  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13821  ;;
13822  *)
13823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13824for as_dir in $PATH
13825do
13826  IFS=$as_save_IFS
13827  test -z "$as_dir" && as_dir=.
13828    for ac_exec_ext in '' $ac_executable_extensions; do
13829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13830    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13832    break 2
13833  fi
13834done
13835  done
13836IFS=$as_save_IFS
13837
13838  ;;
13839esac
13840fi
13841EGREP=$ac_cv_path_EGREP
13842if test -n "$EGREP"; then
13843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13844$as_echo "$EGREP" >&6; }
13845else
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13847$as_echo "no" >&6; }
13848fi
13849
13850
13851          if test "x$EGREP" = x; then
13852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13853          fi
13854        else
13855          # Otherwise we believe it is a complete path. Use it as it is.
13856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13857$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13859$as_echo_n "checking for EGREP... " >&6; }
13860          if test ! -x "$tool_specified"; then
13861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13862$as_echo "not found" >&6; }
13863            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13864          fi
13865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13866$as_echo "$tool_specified" >&6; }
13867        fi
13868      fi
13869    fi
13870
13871  fi
13872
13873
13874  if test "x$EGREP" = x; then
13875    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13876  fi
13877
13878
13879
13880
13881  # Publish this variable in the help.
13882
13883
13884  if [ -z "${FGREP+x}" ]; then
13885    # The variable is not set by user, try to locate tool using the code snippet
13886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13887$as_echo_n "checking for fgrep... " >&6; }
13888if ${ac_cv_path_FGREP+:} false; then :
13889  $as_echo_n "(cached) " >&6
13890else
13891  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13892   then ac_cv_path_FGREP="$GREP -F"
13893   else
13894     if test -z "$FGREP"; then
13895  ac_path_FGREP_found=false
13896  # Loop through the user's path and test for each of PROGNAME-LIST
13897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13898for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13899do
13900  IFS=$as_save_IFS
13901  test -z "$as_dir" && as_dir=.
13902    for ac_prog in fgrep; do
13903    for ac_exec_ext in '' $ac_executable_extensions; do
13904      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13905      as_fn_executable_p "$ac_path_FGREP" || continue
13906# Check for GNU ac_path_FGREP and select it if it is found.
13907  # Check for GNU $ac_path_FGREP
13908case `"$ac_path_FGREP" --version 2>&1` in
13909*GNU*)
13910  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13911*)
13912  ac_count=0
13913  $as_echo_n 0123456789 >"conftest.in"
13914  while :
13915  do
13916    cat "conftest.in" "conftest.in" >"conftest.tmp"
13917    mv "conftest.tmp" "conftest.in"
13918    cp "conftest.in" "conftest.nl"
13919    $as_echo 'FGREP' >> "conftest.nl"
13920    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13921    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13922    as_fn_arith $ac_count + 1 && ac_count=$as_val
13923    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13924      # Best one so far, save it but keep looking for a better one
13925      ac_cv_path_FGREP="$ac_path_FGREP"
13926      ac_path_FGREP_max=$ac_count
13927    fi
13928    # 10*(2^10) chars as input seems more than enough
13929    test $ac_count -gt 10 && break
13930  done
13931  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13932esac
13933
13934      $ac_path_FGREP_found && break 3
13935    done
13936  done
13937  done
13938IFS=$as_save_IFS
13939  if test -z "$ac_cv_path_FGREP"; then
13940    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13941  fi
13942else
13943  ac_cv_path_FGREP=$FGREP
13944fi
13945
13946   fi
13947fi
13948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13949$as_echo "$ac_cv_path_FGREP" >&6; }
13950 FGREP="$ac_cv_path_FGREP"
13951
13952
13953  else
13954    # The variable is set, but is it from the command line or the environment?
13955
13956    # Try to remove the string !FGREP! from our list.
13957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13959      # If it failed, the variable was not from the command line. Ignore it,
13960      # but warn the user (except for BASH, which is always set by the calling BASH).
13961      if test "xFGREP" != xBASH; then
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13963$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13964      fi
13965      # Try to locate tool using the code snippet
13966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13967$as_echo_n "checking for fgrep... " >&6; }
13968if ${ac_cv_path_FGREP+:} false; then :
13969  $as_echo_n "(cached) " >&6
13970else
13971  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13972   then ac_cv_path_FGREP="$GREP -F"
13973   else
13974     if test -z "$FGREP"; then
13975  ac_path_FGREP_found=false
13976  # Loop through the user's path and test for each of PROGNAME-LIST
13977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13978for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13979do
13980  IFS=$as_save_IFS
13981  test -z "$as_dir" && as_dir=.
13982    for ac_prog in fgrep; do
13983    for ac_exec_ext in '' $ac_executable_extensions; do
13984      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13985      as_fn_executable_p "$ac_path_FGREP" || continue
13986# Check for GNU ac_path_FGREP and select it if it is found.
13987  # Check for GNU $ac_path_FGREP
13988case `"$ac_path_FGREP" --version 2>&1` in
13989*GNU*)
13990  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13991*)
13992  ac_count=0
13993  $as_echo_n 0123456789 >"conftest.in"
13994  while :
13995  do
13996    cat "conftest.in" "conftest.in" >"conftest.tmp"
13997    mv "conftest.tmp" "conftest.in"
13998    cp "conftest.in" "conftest.nl"
13999    $as_echo 'FGREP' >> "conftest.nl"
14000    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14001    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14002    as_fn_arith $ac_count + 1 && ac_count=$as_val
14003    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14004      # Best one so far, save it but keep looking for a better one
14005      ac_cv_path_FGREP="$ac_path_FGREP"
14006      ac_path_FGREP_max=$ac_count
14007    fi
14008    # 10*(2^10) chars as input seems more than enough
14009    test $ac_count -gt 10 && break
14010  done
14011  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14012esac
14013
14014      $ac_path_FGREP_found && break 3
14015    done
14016  done
14017  done
14018IFS=$as_save_IFS
14019  if test -z "$ac_cv_path_FGREP"; then
14020    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14021  fi
14022else
14023  ac_cv_path_FGREP=$FGREP
14024fi
14025
14026   fi
14027fi
14028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14029$as_echo "$ac_cv_path_FGREP" >&6; }
14030 FGREP="$ac_cv_path_FGREP"
14031
14032
14033    else
14034      # If it succeeded, then it was overridden by the user. We will use it
14035      # for the tool.
14036
14037      # First remove it from the list of overridden variables, so we can test
14038      # for unknown variables in the end.
14039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14040
14041      # Check if we try to supply an empty value
14042      if test "x$FGREP" = x; then
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14044$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14046$as_echo_n "checking for FGREP... " >&6; }
14047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14048$as_echo "disabled" >&6; }
14049      else
14050        # Check if the provided tool contains a complete path.
14051        tool_specified="$FGREP"
14052        tool_basename="${tool_specified##*/}"
14053        if test "x$tool_basename" = "x$tool_specified"; then
14054          # A command without a complete path is provided, search $PATH.
14055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14056$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14057          # Extract the first word of "$tool_basename", so it can be a program name with args.
14058set dummy $tool_basename; ac_word=$2
14059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14060$as_echo_n "checking for $ac_word... " >&6; }
14061if ${ac_cv_path_FGREP+:} false; then :
14062  $as_echo_n "(cached) " >&6
14063else
14064  case $FGREP in
14065  [\\/]* | ?:[\\/]*)
14066  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14067  ;;
14068  *)
14069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14070for as_dir in $PATH
14071do
14072  IFS=$as_save_IFS
14073  test -z "$as_dir" && as_dir=.
14074    for ac_exec_ext in '' $ac_executable_extensions; do
14075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14076    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14078    break 2
14079  fi
14080done
14081  done
14082IFS=$as_save_IFS
14083
14084  ;;
14085esac
14086fi
14087FGREP=$ac_cv_path_FGREP
14088if test -n "$FGREP"; then
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14090$as_echo "$FGREP" >&6; }
14091else
14092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14093$as_echo "no" >&6; }
14094fi
14095
14096
14097          if test "x$FGREP" = x; then
14098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14099          fi
14100        else
14101          # Otherwise we believe it is a complete path. Use it as it is.
14102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14103$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14105$as_echo_n "checking for FGREP... " >&6; }
14106          if test ! -x "$tool_specified"; then
14107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14108$as_echo "not found" >&6; }
14109            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14110          fi
14111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14112$as_echo "$tool_specified" >&6; }
14113        fi
14114      fi
14115    fi
14116
14117  fi
14118
14119
14120  if test "x$FGREP" = x; then
14121    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14122  fi
14123
14124
14125
14126
14127  # Publish this variable in the help.
14128
14129
14130  if [ -z "${SED+x}" ]; then
14131    # The variable is not set by user, try to locate tool using the code snippet
14132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14133$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14134if ${ac_cv_path_SED+:} false; then :
14135  $as_echo_n "(cached) " >&6
14136else
14137            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14138     for ac_i in 1 2 3 4 5 6 7; do
14139       ac_script="$ac_script$as_nl$ac_script"
14140     done
14141     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14142     { ac_script=; unset ac_script;}
14143     if test -z "$SED"; then
14144  ac_path_SED_found=false
14145  # Loop through the user's path and test for each of PROGNAME-LIST
14146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14147for as_dir in $PATH
14148do
14149  IFS=$as_save_IFS
14150  test -z "$as_dir" && as_dir=.
14151    for ac_prog in sed gsed; do
14152    for ac_exec_ext in '' $ac_executable_extensions; do
14153      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14154      as_fn_executable_p "$ac_path_SED" || continue
14155# Check for GNU ac_path_SED and select it if it is found.
14156  # Check for GNU $ac_path_SED
14157case `"$ac_path_SED" --version 2>&1` in
14158*GNU*)
14159  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14160*)
14161  ac_count=0
14162  $as_echo_n 0123456789 >"conftest.in"
14163  while :
14164  do
14165    cat "conftest.in" "conftest.in" >"conftest.tmp"
14166    mv "conftest.tmp" "conftest.in"
14167    cp "conftest.in" "conftest.nl"
14168    $as_echo '' >> "conftest.nl"
14169    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14170    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14171    as_fn_arith $ac_count + 1 && ac_count=$as_val
14172    if test $ac_count -gt ${ac_path_SED_max-0}; then
14173      # Best one so far, save it but keep looking for a better one
14174      ac_cv_path_SED="$ac_path_SED"
14175      ac_path_SED_max=$ac_count
14176    fi
14177    # 10*(2^10) chars as input seems more than enough
14178    test $ac_count -gt 10 && break
14179  done
14180  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14181esac
14182
14183      $ac_path_SED_found && break 3
14184    done
14185  done
14186  done
14187IFS=$as_save_IFS
14188  if test -z "$ac_cv_path_SED"; then
14189    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14190  fi
14191else
14192  ac_cv_path_SED=$SED
14193fi
14194
14195fi
14196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14197$as_echo "$ac_cv_path_SED" >&6; }
14198 SED="$ac_cv_path_SED"
14199  rm -f conftest.sed
14200
14201  else
14202    # The variable is set, but is it from the command line or the environment?
14203
14204    # Try to remove the string !SED! from our list.
14205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14207      # If it failed, the variable was not from the command line. Ignore it,
14208      # but warn the user (except for BASH, which is always set by the calling BASH).
14209      if test "xSED" != xBASH; then
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14211$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14212      fi
14213      # Try to locate tool using the code snippet
14214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14215$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14216if ${ac_cv_path_SED+:} false; then :
14217  $as_echo_n "(cached) " >&6
14218else
14219            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14220     for ac_i in 1 2 3 4 5 6 7; do
14221       ac_script="$ac_script$as_nl$ac_script"
14222     done
14223     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14224     { ac_script=; unset ac_script;}
14225     if test -z "$SED"; then
14226  ac_path_SED_found=false
14227  # Loop through the user's path and test for each of PROGNAME-LIST
14228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14229for as_dir in $PATH
14230do
14231  IFS=$as_save_IFS
14232  test -z "$as_dir" && as_dir=.
14233    for ac_prog in sed gsed; do
14234    for ac_exec_ext in '' $ac_executable_extensions; do
14235      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14236      as_fn_executable_p "$ac_path_SED" || continue
14237# Check for GNU ac_path_SED and select it if it is found.
14238  # Check for GNU $ac_path_SED
14239case `"$ac_path_SED" --version 2>&1` in
14240*GNU*)
14241  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14242*)
14243  ac_count=0
14244  $as_echo_n 0123456789 >"conftest.in"
14245  while :
14246  do
14247    cat "conftest.in" "conftest.in" >"conftest.tmp"
14248    mv "conftest.tmp" "conftest.in"
14249    cp "conftest.in" "conftest.nl"
14250    $as_echo '' >> "conftest.nl"
14251    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14252    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14253    as_fn_arith $ac_count + 1 && ac_count=$as_val
14254    if test $ac_count -gt ${ac_path_SED_max-0}; then
14255      # Best one so far, save it but keep looking for a better one
14256      ac_cv_path_SED="$ac_path_SED"
14257      ac_path_SED_max=$ac_count
14258    fi
14259    # 10*(2^10) chars as input seems more than enough
14260    test $ac_count -gt 10 && break
14261  done
14262  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14263esac
14264
14265      $ac_path_SED_found && break 3
14266    done
14267  done
14268  done
14269IFS=$as_save_IFS
14270  if test -z "$ac_cv_path_SED"; then
14271    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14272  fi
14273else
14274  ac_cv_path_SED=$SED
14275fi
14276
14277fi
14278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14279$as_echo "$ac_cv_path_SED" >&6; }
14280 SED="$ac_cv_path_SED"
14281  rm -f conftest.sed
14282
14283    else
14284      # If it succeeded, then it was overridden by the user. We will use it
14285      # for the tool.
14286
14287      # First remove it from the list of overridden variables, so we can test
14288      # for unknown variables in the end.
14289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14290
14291      # Check if we try to supply an empty value
14292      if test "x$SED" = x; then
14293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14294$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14296$as_echo_n "checking for SED... " >&6; }
14297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14298$as_echo "disabled" >&6; }
14299      else
14300        # Check if the provided tool contains a complete path.
14301        tool_specified="$SED"
14302        tool_basename="${tool_specified##*/}"
14303        if test "x$tool_basename" = "x$tool_specified"; then
14304          # A command without a complete path is provided, search $PATH.
14305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14306$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14307          # Extract the first word of "$tool_basename", so it can be a program name with args.
14308set dummy $tool_basename; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_SED+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $SED in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337SED=$ac_cv_path_SED
14338if test -n "$SED"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14340$as_echo "$SED" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347          if test "x$SED" = x; then
14348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14349          fi
14350        else
14351          # Otherwise we believe it is a complete path. Use it as it is.
14352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14353$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14355$as_echo_n "checking for SED... " >&6; }
14356          if test ! -x "$tool_specified"; then
14357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14358$as_echo "not found" >&6; }
14359            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14360          fi
14361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14362$as_echo "$tool_specified" >&6; }
14363        fi
14364      fi
14365    fi
14366
14367  fi
14368
14369
14370  if test "x$SED" = x; then
14371    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14372  fi
14373
14374
14375
14376  # Always force rm.
14377  RM="$RM -f"
14378
14379  # pwd behaves differently on various platforms and some don't support the -L flag.
14380  # Always use the bash builtin pwd to get uniform behavior.
14381  THEPWDCMD=pwd
14382
14383  # These are not required on all platforms
14384
14385
14386  # Publish this variable in the help.
14387
14388
14389  if [ -z "${CYGPATH+x}" ]; then
14390    # The variable is not set by user, try to locate tool using the code snippet
14391    for ac_prog in cygpath
14392do
14393  # Extract the first word of "$ac_prog", so it can be a program name with args.
14394set dummy $ac_prog; ac_word=$2
14395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14396$as_echo_n "checking for $ac_word... " >&6; }
14397if ${ac_cv_path_CYGPATH+:} false; then :
14398  $as_echo_n "(cached) " >&6
14399else
14400  case $CYGPATH in
14401  [\\/]* | ?:[\\/]*)
14402  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14403  ;;
14404  *)
14405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14406for as_dir in $PATH
14407do
14408  IFS=$as_save_IFS
14409  test -z "$as_dir" && as_dir=.
14410    for ac_exec_ext in '' $ac_executable_extensions; do
14411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14412    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14414    break 2
14415  fi
14416done
14417  done
14418IFS=$as_save_IFS
14419
14420  ;;
14421esac
14422fi
14423CYGPATH=$ac_cv_path_CYGPATH
14424if test -n "$CYGPATH"; then
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14426$as_echo "$CYGPATH" >&6; }
14427else
14428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14429$as_echo "no" >&6; }
14430fi
14431
14432
14433  test -n "$CYGPATH" && break
14434done
14435
14436  else
14437    # The variable is set, but is it from the command line or the environment?
14438
14439    # Try to remove the string !CYGPATH! from our list.
14440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14442      # If it failed, the variable was not from the command line. Ignore it,
14443      # but warn the user (except for BASH, which is always set by the calling BASH).
14444      if test "xCYGPATH" != xBASH; then
14445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14446$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14447      fi
14448      # Try to locate tool using the code snippet
14449      for ac_prog in cygpath
14450do
14451  # Extract the first word of "$ac_prog", so it can be a program name with args.
14452set dummy $ac_prog; ac_word=$2
14453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14454$as_echo_n "checking for $ac_word... " >&6; }
14455if ${ac_cv_path_CYGPATH+:} false; then :
14456  $as_echo_n "(cached) " >&6
14457else
14458  case $CYGPATH in
14459  [\\/]* | ?:[\\/]*)
14460  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14461  ;;
14462  *)
14463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14464for as_dir in $PATH
14465do
14466  IFS=$as_save_IFS
14467  test -z "$as_dir" && as_dir=.
14468    for ac_exec_ext in '' $ac_executable_extensions; do
14469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14470    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14472    break 2
14473  fi
14474done
14475  done
14476IFS=$as_save_IFS
14477
14478  ;;
14479esac
14480fi
14481CYGPATH=$ac_cv_path_CYGPATH
14482if test -n "$CYGPATH"; then
14483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14484$as_echo "$CYGPATH" >&6; }
14485else
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14487$as_echo "no" >&6; }
14488fi
14489
14490
14491  test -n "$CYGPATH" && break
14492done
14493
14494    else
14495      # If it succeeded, then it was overridden by the user. We will use it
14496      # for the tool.
14497
14498      # First remove it from the list of overridden variables, so we can test
14499      # for unknown variables in the end.
14500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14501
14502      # Check if we try to supply an empty value
14503      if test "x$CYGPATH" = x; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14505$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14507$as_echo_n "checking for CYGPATH... " >&6; }
14508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14509$as_echo "disabled" >&6; }
14510      else
14511        # Check if the provided tool contains a complete path.
14512        tool_specified="$CYGPATH"
14513        tool_basename="${tool_specified##*/}"
14514        if test "x$tool_basename" = "x$tool_specified"; then
14515          # A command without a complete path is provided, search $PATH.
14516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14517$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14518          # Extract the first word of "$tool_basename", so it can be a program name with args.
14519set dummy $tool_basename; ac_word=$2
14520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14521$as_echo_n "checking for $ac_word... " >&6; }
14522if ${ac_cv_path_CYGPATH+:} false; then :
14523  $as_echo_n "(cached) " >&6
14524else
14525  case $CYGPATH in
14526  [\\/]* | ?:[\\/]*)
14527  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14528  ;;
14529  *)
14530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14531for as_dir in $PATH
14532do
14533  IFS=$as_save_IFS
14534  test -z "$as_dir" && as_dir=.
14535    for ac_exec_ext in '' $ac_executable_extensions; do
14536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14537    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14539    break 2
14540  fi
14541done
14542  done
14543IFS=$as_save_IFS
14544
14545  ;;
14546esac
14547fi
14548CYGPATH=$ac_cv_path_CYGPATH
14549if test -n "$CYGPATH"; then
14550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14551$as_echo "$CYGPATH" >&6; }
14552else
14553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14554$as_echo "no" >&6; }
14555fi
14556
14557
14558          if test "x$CYGPATH" = x; then
14559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14560          fi
14561        else
14562          # Otherwise we believe it is a complete path. Use it as it is.
14563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14564$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14566$as_echo_n "checking for CYGPATH... " >&6; }
14567          if test ! -x "$tool_specified"; then
14568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14569$as_echo "not found" >&6; }
14570            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14571          fi
14572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14573$as_echo "$tool_specified" >&6; }
14574        fi
14575      fi
14576    fi
14577
14578  fi
14579
14580
14581
14582
14583  # Publish this variable in the help.
14584
14585
14586  if [ -z "${READLINK+x}" ]; then
14587    # The variable is not set by user, try to locate tool using the code snippet
14588    for ac_prog in greadlink readlink
14589do
14590  # Extract the first word of "$ac_prog", so it can be a program name with args.
14591set dummy $ac_prog; ac_word=$2
14592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14593$as_echo_n "checking for $ac_word... " >&6; }
14594if ${ac_cv_path_READLINK+:} false; then :
14595  $as_echo_n "(cached) " >&6
14596else
14597  case $READLINK in
14598  [\\/]* | ?:[\\/]*)
14599  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14600  ;;
14601  *)
14602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14603for as_dir in $PATH
14604do
14605  IFS=$as_save_IFS
14606  test -z "$as_dir" && as_dir=.
14607    for ac_exec_ext in '' $ac_executable_extensions; do
14608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14609    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14611    break 2
14612  fi
14613done
14614  done
14615IFS=$as_save_IFS
14616
14617  ;;
14618esac
14619fi
14620READLINK=$ac_cv_path_READLINK
14621if test -n "$READLINK"; then
14622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14623$as_echo "$READLINK" >&6; }
14624else
14625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14626$as_echo "no" >&6; }
14627fi
14628
14629
14630  test -n "$READLINK" && break
14631done
14632
14633  else
14634    # The variable is set, but is it from the command line or the environment?
14635
14636    # Try to remove the string !READLINK! from our list.
14637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14639      # If it failed, the variable was not from the command line. Ignore it,
14640      # but warn the user (except for BASH, which is always set by the calling BASH).
14641      if test "xREADLINK" != xBASH; then
14642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14643$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14644      fi
14645      # Try to locate tool using the code snippet
14646      for ac_prog in greadlink readlink
14647do
14648  # Extract the first word of "$ac_prog", so it can be a program name with args.
14649set dummy $ac_prog; ac_word=$2
14650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14651$as_echo_n "checking for $ac_word... " >&6; }
14652if ${ac_cv_path_READLINK+:} false; then :
14653  $as_echo_n "(cached) " >&6
14654else
14655  case $READLINK in
14656  [\\/]* | ?:[\\/]*)
14657  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14658  ;;
14659  *)
14660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14661for as_dir in $PATH
14662do
14663  IFS=$as_save_IFS
14664  test -z "$as_dir" && as_dir=.
14665    for ac_exec_ext in '' $ac_executable_extensions; do
14666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14667    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14669    break 2
14670  fi
14671done
14672  done
14673IFS=$as_save_IFS
14674
14675  ;;
14676esac
14677fi
14678READLINK=$ac_cv_path_READLINK
14679if test -n "$READLINK"; then
14680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14681$as_echo "$READLINK" >&6; }
14682else
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14684$as_echo "no" >&6; }
14685fi
14686
14687
14688  test -n "$READLINK" && break
14689done
14690
14691    else
14692      # If it succeeded, then it was overridden by the user. We will use it
14693      # for the tool.
14694
14695      # First remove it from the list of overridden variables, so we can test
14696      # for unknown variables in the end.
14697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14698
14699      # Check if we try to supply an empty value
14700      if test "x$READLINK" = x; then
14701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14702$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14704$as_echo_n "checking for READLINK... " >&6; }
14705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14706$as_echo "disabled" >&6; }
14707      else
14708        # Check if the provided tool contains a complete path.
14709        tool_specified="$READLINK"
14710        tool_basename="${tool_specified##*/}"
14711        if test "x$tool_basename" = "x$tool_specified"; then
14712          # A command without a complete path is provided, search $PATH.
14713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14714$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14715          # Extract the first word of "$tool_basename", so it can be a program name with args.
14716set dummy $tool_basename; ac_word=$2
14717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14718$as_echo_n "checking for $ac_word... " >&6; }
14719if ${ac_cv_path_READLINK+:} false; then :
14720  $as_echo_n "(cached) " >&6
14721else
14722  case $READLINK in
14723  [\\/]* | ?:[\\/]*)
14724  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14725  ;;
14726  *)
14727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14728for as_dir in $PATH
14729do
14730  IFS=$as_save_IFS
14731  test -z "$as_dir" && as_dir=.
14732    for ac_exec_ext in '' $ac_executable_extensions; do
14733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14734    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14736    break 2
14737  fi
14738done
14739  done
14740IFS=$as_save_IFS
14741
14742  ;;
14743esac
14744fi
14745READLINK=$ac_cv_path_READLINK
14746if test -n "$READLINK"; then
14747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14748$as_echo "$READLINK" >&6; }
14749else
14750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14751$as_echo "no" >&6; }
14752fi
14753
14754
14755          if test "x$READLINK" = x; then
14756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14757          fi
14758        else
14759          # Otherwise we believe it is a complete path. Use it as it is.
14760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14761$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14763$as_echo_n "checking for READLINK... " >&6; }
14764          if test ! -x "$tool_specified"; then
14765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14766$as_echo "not found" >&6; }
14767            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14768          fi
14769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14770$as_echo "$tool_specified" >&6; }
14771        fi
14772      fi
14773    fi
14774
14775  fi
14776
14777
14778
14779
14780  # Publish this variable in the help.
14781
14782
14783  if [ -z "${DF+x}" ]; then
14784    # The variable is not set by user, try to locate tool using the code snippet
14785    for ac_prog in df
14786do
14787  # Extract the first word of "$ac_prog", so it can be a program name with args.
14788set dummy $ac_prog; ac_word=$2
14789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14790$as_echo_n "checking for $ac_word... " >&6; }
14791if ${ac_cv_path_DF+:} false; then :
14792  $as_echo_n "(cached) " >&6
14793else
14794  case $DF in
14795  [\\/]* | ?:[\\/]*)
14796  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14797  ;;
14798  *)
14799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14800for as_dir in $PATH
14801do
14802  IFS=$as_save_IFS
14803  test -z "$as_dir" && as_dir=.
14804    for ac_exec_ext in '' $ac_executable_extensions; do
14805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14806    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14808    break 2
14809  fi
14810done
14811  done
14812IFS=$as_save_IFS
14813
14814  ;;
14815esac
14816fi
14817DF=$ac_cv_path_DF
14818if test -n "$DF"; then
14819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14820$as_echo "$DF" >&6; }
14821else
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14823$as_echo "no" >&6; }
14824fi
14825
14826
14827  test -n "$DF" && break
14828done
14829
14830  else
14831    # The variable is set, but is it from the command line or the environment?
14832
14833    # Try to remove the string !DF! from our list.
14834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14836      # If it failed, the variable was not from the command line. Ignore it,
14837      # but warn the user (except for BASH, which is always set by the calling BASH).
14838      if test "xDF" != xBASH; then
14839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14840$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14841      fi
14842      # Try to locate tool using the code snippet
14843      for ac_prog in df
14844do
14845  # Extract the first word of "$ac_prog", so it can be a program name with args.
14846set dummy $ac_prog; ac_word=$2
14847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14848$as_echo_n "checking for $ac_word... " >&6; }
14849if ${ac_cv_path_DF+:} false; then :
14850  $as_echo_n "(cached) " >&6
14851else
14852  case $DF in
14853  [\\/]* | ?:[\\/]*)
14854  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14855  ;;
14856  *)
14857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14858for as_dir in $PATH
14859do
14860  IFS=$as_save_IFS
14861  test -z "$as_dir" && as_dir=.
14862    for ac_exec_ext in '' $ac_executable_extensions; do
14863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14864    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14866    break 2
14867  fi
14868done
14869  done
14870IFS=$as_save_IFS
14871
14872  ;;
14873esac
14874fi
14875DF=$ac_cv_path_DF
14876if test -n "$DF"; then
14877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14878$as_echo "$DF" >&6; }
14879else
14880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14881$as_echo "no" >&6; }
14882fi
14883
14884
14885  test -n "$DF" && break
14886done
14887
14888    else
14889      # If it succeeded, then it was overridden by the user. We will use it
14890      # for the tool.
14891
14892      # First remove it from the list of overridden variables, so we can test
14893      # for unknown variables in the end.
14894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14895
14896      # Check if we try to supply an empty value
14897      if test "x$DF" = x; then
14898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14899$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14901$as_echo_n "checking for DF... " >&6; }
14902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14903$as_echo "disabled" >&6; }
14904      else
14905        # Check if the provided tool contains a complete path.
14906        tool_specified="$DF"
14907        tool_basename="${tool_specified##*/}"
14908        if test "x$tool_basename" = "x$tool_specified"; then
14909          # A command without a complete path is provided, search $PATH.
14910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14911$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14912          # Extract the first word of "$tool_basename", so it can be a program name with args.
14913set dummy $tool_basename; ac_word=$2
14914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14915$as_echo_n "checking for $ac_word... " >&6; }
14916if ${ac_cv_path_DF+:} false; then :
14917  $as_echo_n "(cached) " >&6
14918else
14919  case $DF in
14920  [\\/]* | ?:[\\/]*)
14921  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14922  ;;
14923  *)
14924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14925for as_dir in $PATH
14926do
14927  IFS=$as_save_IFS
14928  test -z "$as_dir" && as_dir=.
14929    for ac_exec_ext in '' $ac_executable_extensions; do
14930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14931    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14933    break 2
14934  fi
14935done
14936  done
14937IFS=$as_save_IFS
14938
14939  ;;
14940esac
14941fi
14942DF=$ac_cv_path_DF
14943if test -n "$DF"; then
14944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14945$as_echo "$DF" >&6; }
14946else
14947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14948$as_echo "no" >&6; }
14949fi
14950
14951
14952          if test "x$DF" = x; then
14953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14954          fi
14955        else
14956          # Otherwise we believe it is a complete path. Use it as it is.
14957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14958$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14960$as_echo_n "checking for DF... " >&6; }
14961          if test ! -x "$tool_specified"; then
14962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14963$as_echo "not found" >&6; }
14964            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14965          fi
14966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14967$as_echo "$tool_specified" >&6; }
14968        fi
14969      fi
14970    fi
14971
14972  fi
14973
14974
14975
14976
14977  # Publish this variable in the help.
14978
14979
14980  if [ -z "${CPIO+x}" ]; then
14981    # The variable is not set by user, try to locate tool using the code snippet
14982    for ac_prog in cpio bsdcpio
14983do
14984  # Extract the first word of "$ac_prog", so it can be a program name with args.
14985set dummy $ac_prog; ac_word=$2
14986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14987$as_echo_n "checking for $ac_word... " >&6; }
14988if ${ac_cv_path_CPIO+:} false; then :
14989  $as_echo_n "(cached) " >&6
14990else
14991  case $CPIO in
14992  [\\/]* | ?:[\\/]*)
14993  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14994  ;;
14995  *)
14996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14997for as_dir in $PATH
14998do
14999  IFS=$as_save_IFS
15000  test -z "$as_dir" && as_dir=.
15001    for ac_exec_ext in '' $ac_executable_extensions; do
15002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15003    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15005    break 2
15006  fi
15007done
15008  done
15009IFS=$as_save_IFS
15010
15011  ;;
15012esac
15013fi
15014CPIO=$ac_cv_path_CPIO
15015if test -n "$CPIO"; then
15016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15017$as_echo "$CPIO" >&6; }
15018else
15019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15020$as_echo "no" >&6; }
15021fi
15022
15023
15024  test -n "$CPIO" && break
15025done
15026
15027  else
15028    # The variable is set, but is it from the command line or the environment?
15029
15030    # Try to remove the string !CPIO! from our list.
15031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15033      # If it failed, the variable was not from the command line. Ignore it,
15034      # but warn the user (except for BASH, which is always set by the calling BASH).
15035      if test "xCPIO" != xBASH; then
15036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15037$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15038      fi
15039      # Try to locate tool using the code snippet
15040      for ac_prog in cpio bsdcpio
15041do
15042  # Extract the first word of "$ac_prog", so it can be a program name with args.
15043set dummy $ac_prog; ac_word=$2
15044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15045$as_echo_n "checking for $ac_word... " >&6; }
15046if ${ac_cv_path_CPIO+:} false; then :
15047  $as_echo_n "(cached) " >&6
15048else
15049  case $CPIO in
15050  [\\/]* | ?:[\\/]*)
15051  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15052  ;;
15053  *)
15054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15055for as_dir in $PATH
15056do
15057  IFS=$as_save_IFS
15058  test -z "$as_dir" && as_dir=.
15059    for ac_exec_ext in '' $ac_executable_extensions; do
15060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15061    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15063    break 2
15064  fi
15065done
15066  done
15067IFS=$as_save_IFS
15068
15069  ;;
15070esac
15071fi
15072CPIO=$ac_cv_path_CPIO
15073if test -n "$CPIO"; then
15074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15075$as_echo "$CPIO" >&6; }
15076else
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15078$as_echo "no" >&6; }
15079fi
15080
15081
15082  test -n "$CPIO" && break
15083done
15084
15085    else
15086      # If it succeeded, then it was overridden by the user. We will use it
15087      # for the tool.
15088
15089      # First remove it from the list of overridden variables, so we can test
15090      # for unknown variables in the end.
15091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15092
15093      # Check if we try to supply an empty value
15094      if test "x$CPIO" = x; then
15095        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15096$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15098$as_echo_n "checking for CPIO... " >&6; }
15099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15100$as_echo "disabled" >&6; }
15101      else
15102        # Check if the provided tool contains a complete path.
15103        tool_specified="$CPIO"
15104        tool_basename="${tool_specified##*/}"
15105        if test "x$tool_basename" = "x$tool_specified"; then
15106          # A command without a complete path is provided, search $PATH.
15107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15108$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15109          # Extract the first word of "$tool_basename", so it can be a program name with args.
15110set dummy $tool_basename; ac_word=$2
15111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15112$as_echo_n "checking for $ac_word... " >&6; }
15113if ${ac_cv_path_CPIO+:} false; then :
15114  $as_echo_n "(cached) " >&6
15115else
15116  case $CPIO in
15117  [\\/]* | ?:[\\/]*)
15118  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15119  ;;
15120  *)
15121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15122for as_dir in $PATH
15123do
15124  IFS=$as_save_IFS
15125  test -z "$as_dir" && as_dir=.
15126    for ac_exec_ext in '' $ac_executable_extensions; do
15127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15128    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15130    break 2
15131  fi
15132done
15133  done
15134IFS=$as_save_IFS
15135
15136  ;;
15137esac
15138fi
15139CPIO=$ac_cv_path_CPIO
15140if test -n "$CPIO"; then
15141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15142$as_echo "$CPIO" >&6; }
15143else
15144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15145$as_echo "no" >&6; }
15146fi
15147
15148
15149          if test "x$CPIO" = x; then
15150            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15151          fi
15152        else
15153          # Otherwise we believe it is a complete path. Use it as it is.
15154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15155$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15156          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15157$as_echo_n "checking for CPIO... " >&6; }
15158          if test ! -x "$tool_specified"; then
15159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15160$as_echo "not found" >&6; }
15161            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15162          fi
15163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15164$as_echo "$tool_specified" >&6; }
15165        fi
15166      fi
15167    fi
15168
15169  fi
15170
15171
15172
15173
15174  # Publish this variable in the help.
15175
15176
15177  if [ -z "${NICE+x}" ]; then
15178    # The variable is not set by user, try to locate tool using the code snippet
15179    for ac_prog in nice
15180do
15181  # Extract the first word of "$ac_prog", so it can be a program name with args.
15182set dummy $ac_prog; ac_word=$2
15183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15184$as_echo_n "checking for $ac_word... " >&6; }
15185if ${ac_cv_path_NICE+:} false; then :
15186  $as_echo_n "(cached) " >&6
15187else
15188  case $NICE in
15189  [\\/]* | ?:[\\/]*)
15190  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15191  ;;
15192  *)
15193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15194for as_dir in $PATH
15195do
15196  IFS=$as_save_IFS
15197  test -z "$as_dir" && as_dir=.
15198    for ac_exec_ext in '' $ac_executable_extensions; do
15199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15200    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15202    break 2
15203  fi
15204done
15205  done
15206IFS=$as_save_IFS
15207
15208  ;;
15209esac
15210fi
15211NICE=$ac_cv_path_NICE
15212if test -n "$NICE"; then
15213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15214$as_echo "$NICE" >&6; }
15215else
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15217$as_echo "no" >&6; }
15218fi
15219
15220
15221  test -n "$NICE" && break
15222done
15223
15224  else
15225    # The variable is set, but is it from the command line or the environment?
15226
15227    # Try to remove the string !NICE! from our list.
15228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15230      # If it failed, the variable was not from the command line. Ignore it,
15231      # but warn the user (except for BASH, which is always set by the calling BASH).
15232      if test "xNICE" != xBASH; then
15233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15234$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15235      fi
15236      # Try to locate tool using the code snippet
15237      for ac_prog in nice
15238do
15239  # Extract the first word of "$ac_prog", so it can be a program name with args.
15240set dummy $ac_prog; ac_word=$2
15241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15242$as_echo_n "checking for $ac_word... " >&6; }
15243if ${ac_cv_path_NICE+:} false; then :
15244  $as_echo_n "(cached) " >&6
15245else
15246  case $NICE in
15247  [\\/]* | ?:[\\/]*)
15248  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15249  ;;
15250  *)
15251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15252for as_dir in $PATH
15253do
15254  IFS=$as_save_IFS
15255  test -z "$as_dir" && as_dir=.
15256    for ac_exec_ext in '' $ac_executable_extensions; do
15257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15258    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15260    break 2
15261  fi
15262done
15263  done
15264IFS=$as_save_IFS
15265
15266  ;;
15267esac
15268fi
15269NICE=$ac_cv_path_NICE
15270if test -n "$NICE"; then
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15272$as_echo "$NICE" >&6; }
15273else
15274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15275$as_echo "no" >&6; }
15276fi
15277
15278
15279  test -n "$NICE" && break
15280done
15281
15282    else
15283      # If it succeeded, then it was overridden by the user. We will use it
15284      # for the tool.
15285
15286      # First remove it from the list of overridden variables, so we can test
15287      # for unknown variables in the end.
15288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15289
15290      # Check if we try to supply an empty value
15291      if test "x$NICE" = x; then
15292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15293$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15295$as_echo_n "checking for NICE... " >&6; }
15296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15297$as_echo "disabled" >&6; }
15298      else
15299        # Check if the provided tool contains a complete path.
15300        tool_specified="$NICE"
15301        tool_basename="${tool_specified##*/}"
15302        if test "x$tool_basename" = "x$tool_specified"; then
15303          # A command without a complete path is provided, search $PATH.
15304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15305$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15306          # Extract the first word of "$tool_basename", so it can be a program name with args.
15307set dummy $tool_basename; ac_word=$2
15308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15309$as_echo_n "checking for $ac_word... " >&6; }
15310if ${ac_cv_path_NICE+:} false; then :
15311  $as_echo_n "(cached) " >&6
15312else
15313  case $NICE in
15314  [\\/]* | ?:[\\/]*)
15315  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15316  ;;
15317  *)
15318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15319for as_dir in $PATH
15320do
15321  IFS=$as_save_IFS
15322  test -z "$as_dir" && as_dir=.
15323    for ac_exec_ext in '' $ac_executable_extensions; do
15324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15325    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15327    break 2
15328  fi
15329done
15330  done
15331IFS=$as_save_IFS
15332
15333  ;;
15334esac
15335fi
15336NICE=$ac_cv_path_NICE
15337if test -n "$NICE"; then
15338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15339$as_echo "$NICE" >&6; }
15340else
15341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15342$as_echo "no" >&6; }
15343fi
15344
15345
15346          if test "x$NICE" = x; then
15347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15348          fi
15349        else
15350          # Otherwise we believe it is a complete path. Use it as it is.
15351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15352$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15354$as_echo_n "checking for NICE... " >&6; }
15355          if test ! -x "$tool_specified"; then
15356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15357$as_echo "not found" >&6; }
15358            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15359          fi
15360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15361$as_echo "$tool_specified" >&6; }
15362        fi
15363      fi
15364    fi
15365
15366  fi
15367
15368
15369
15370
15371# Now we can determine OpenJDK build and target platforms. This is required to
15372# have early on.
15373# Make sure we can run config.sub.
15374$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15375  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15376
15377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15378$as_echo_n "checking build system type... " >&6; }
15379if ${ac_cv_build+:} false; then :
15380  $as_echo_n "(cached) " >&6
15381else
15382  ac_build_alias=$build_alias
15383test "x$ac_build_alias" = x &&
15384  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15385test "x$ac_build_alias" = x &&
15386  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15387ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15388  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15389
15390fi
15391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15392$as_echo "$ac_cv_build" >&6; }
15393case $ac_cv_build in
15394*-*-*) ;;
15395*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15396esac
15397build=$ac_cv_build
15398ac_save_IFS=$IFS; IFS='-'
15399set x $ac_cv_build
15400shift
15401build_cpu=$1
15402build_vendor=$2
15403shift; shift
15404# Remember, the first character of IFS is used to create $*,
15405# except with old shells:
15406build_os=$*
15407IFS=$ac_save_IFS
15408case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15409
15410
15411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15412$as_echo_n "checking host system type... " >&6; }
15413if ${ac_cv_host+:} false; then :
15414  $as_echo_n "(cached) " >&6
15415else
15416  if test "x$host_alias" = x; then
15417  ac_cv_host=$ac_cv_build
15418else
15419  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15420    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15421fi
15422
15423fi
15424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15425$as_echo "$ac_cv_host" >&6; }
15426case $ac_cv_host in
15427*-*-*) ;;
15428*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15429esac
15430host=$ac_cv_host
15431ac_save_IFS=$IFS; IFS='-'
15432set x $ac_cv_host
15433shift
15434host_cpu=$1
15435host_vendor=$2
15436shift; shift
15437# Remember, the first character of IFS is used to create $*,
15438# except with old shells:
15439host_os=$*
15440IFS=$ac_save_IFS
15441case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15442
15443
15444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15445$as_echo_n "checking target system type... " >&6; }
15446if ${ac_cv_target+:} false; then :
15447  $as_echo_n "(cached) " >&6
15448else
15449  if test "x$target_alias" = x; then
15450  ac_cv_target=$ac_cv_host
15451else
15452  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15453    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15454fi
15455
15456fi
15457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15458$as_echo "$ac_cv_target" >&6; }
15459case $ac_cv_target in
15460*-*-*) ;;
15461*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15462esac
15463target=$ac_cv_target
15464ac_save_IFS=$IFS; IFS='-'
15465set x $ac_cv_target
15466shift
15467target_cpu=$1
15468target_vendor=$2
15469shift; shift
15470# Remember, the first character of IFS is used to create $*,
15471# except with old shells:
15472target_os=$*
15473IFS=$ac_save_IFS
15474case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15475
15476
15477# The aliases save the names the user supplied, while $host etc.
15478# will get canonicalized.
15479test -n "$target_alias" &&
15480  test "$program_prefix$program_suffix$program_transform_name" = \
15481    NONENONEs,x,x, &&
15482  program_prefix=${target_alias}-
15483
15484  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15485  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15486  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15487  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15488  # to use the configure naming style.
15489
15490
15491
15492
15493
15494  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15495  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15496  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15497  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15498  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15499  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15500
15501
15502
15503  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15504
15505  case "$build_os" in
15506    *linux*)
15507      VAR_OS=linux
15508      VAR_OS_TYPE=unix
15509      ;;
15510    *solaris*)
15511      VAR_OS=solaris
15512      VAR_OS_TYPE=unix
15513      ;;
15514    *darwin*)
15515      VAR_OS=macosx
15516      VAR_OS_TYPE=unix
15517      ;;
15518    *bsd*)
15519      VAR_OS=bsd
15520      VAR_OS_TYPE=unix
15521      ;;
15522    *cygwin*)
15523      VAR_OS=windows
15524      VAR_OS_ENV=windows.cygwin
15525      ;;
15526    *mingw*)
15527      VAR_OS=windows
15528      VAR_OS_ENV=windows.msys
15529      ;;
15530    *aix*)
15531      VAR_OS=aix
15532      VAR_OS_TYPE=unix
15533      ;;
15534    *)
15535      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15536      ;;
15537  esac
15538
15539
15540  # First argument is the cpu name from the trip/quad
15541  case "$build_cpu" in
15542    x86_64)
15543      VAR_CPU=x86_64
15544      VAR_CPU_ARCH=x86
15545      VAR_CPU_BITS=64
15546      VAR_CPU_ENDIAN=little
15547      ;;
15548    i?86)
15549      VAR_CPU=x86
15550      VAR_CPU_ARCH=x86
15551      VAR_CPU_BITS=32
15552      VAR_CPU_ENDIAN=little
15553      ;;
15554    arm*)
15555      VAR_CPU=arm
15556      VAR_CPU_ARCH=arm
15557      VAR_CPU_BITS=32
15558      VAR_CPU_ENDIAN=little
15559      ;;
15560    aarch64)
15561      VAR_CPU=aarch64
15562      VAR_CPU_ARCH=aarch64
15563      VAR_CPU_BITS=64
15564      VAR_CPU_ENDIAN=little
15565      ;;
15566    powerpc)
15567      VAR_CPU=ppc
15568      VAR_CPU_ARCH=ppc
15569      VAR_CPU_BITS=32
15570      VAR_CPU_ENDIAN=big
15571      ;;
15572    powerpc64)
15573      VAR_CPU=ppc64
15574      VAR_CPU_ARCH=ppc
15575      VAR_CPU_BITS=64
15576      VAR_CPU_ENDIAN=big
15577      ;;
15578    powerpc64le)
15579      VAR_CPU=ppc64le
15580      VAR_CPU_ARCH=ppc
15581      VAR_CPU_BITS=64
15582      VAR_CPU_ENDIAN=little
15583      ;;
15584    s390)
15585      VAR_CPU=s390
15586      VAR_CPU_ARCH=s390
15587      VAR_CPU_BITS=32
15588      VAR_CPU_ENDIAN=big
15589      ;;
15590    s390x)
15591      VAR_CPU=s390x
15592      VAR_CPU_ARCH=s390
15593      VAR_CPU_BITS=64
15594      VAR_CPU_ENDIAN=big
15595      ;;
15596    sparc)
15597      VAR_CPU=sparc
15598      VAR_CPU_ARCH=sparc
15599      VAR_CPU_BITS=32
15600      VAR_CPU_ENDIAN=big
15601      ;;
15602    sparcv9|sparc64)
15603      VAR_CPU=sparcv9
15604      VAR_CPU_ARCH=sparc
15605      VAR_CPU_BITS=64
15606      VAR_CPU_ENDIAN=big
15607      ;;
15608    *)
15609      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15610      ;;
15611  esac
15612
15613  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15614  OPENJDK_BUILD_OS="$VAR_OS"
15615  if test "x$VAR_OS_TYPE" != x; then
15616    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15617  else
15618    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15619  fi
15620  if test "x$VAR_OS_ENV" != x; then
15621    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15622  else
15623    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15624  fi
15625  OPENJDK_BUILD_CPU="$VAR_CPU"
15626  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15627  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15628  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15629
15630
15631
15632
15633
15634
15635
15636
15637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15638$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15640$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15641
15642  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15643
15644  case "$host_os" in
15645    *linux*)
15646      VAR_OS=linux
15647      VAR_OS_TYPE=unix
15648      ;;
15649    *solaris*)
15650      VAR_OS=solaris
15651      VAR_OS_TYPE=unix
15652      ;;
15653    *darwin*)
15654      VAR_OS=macosx
15655      VAR_OS_TYPE=unix
15656      ;;
15657    *bsd*)
15658      VAR_OS=bsd
15659      VAR_OS_TYPE=unix
15660      ;;
15661    *cygwin*)
15662      VAR_OS=windows
15663      VAR_OS_ENV=windows.cygwin
15664      ;;
15665    *mingw*)
15666      VAR_OS=windows
15667      VAR_OS_ENV=windows.msys
15668      ;;
15669    *aix*)
15670      VAR_OS=aix
15671      VAR_OS_TYPE=unix
15672      ;;
15673    *)
15674      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15675      ;;
15676  esac
15677
15678
15679  # First argument is the cpu name from the trip/quad
15680  case "$host_cpu" in
15681    x86_64)
15682      VAR_CPU=x86_64
15683      VAR_CPU_ARCH=x86
15684      VAR_CPU_BITS=64
15685      VAR_CPU_ENDIAN=little
15686      ;;
15687    i?86)
15688      VAR_CPU=x86
15689      VAR_CPU_ARCH=x86
15690      VAR_CPU_BITS=32
15691      VAR_CPU_ENDIAN=little
15692      ;;
15693    arm*)
15694      VAR_CPU=arm
15695      VAR_CPU_ARCH=arm
15696      VAR_CPU_BITS=32
15697      VAR_CPU_ENDIAN=little
15698      ;;
15699    aarch64)
15700      VAR_CPU=aarch64
15701      VAR_CPU_ARCH=aarch64
15702      VAR_CPU_BITS=64
15703      VAR_CPU_ENDIAN=little
15704      ;;
15705    powerpc)
15706      VAR_CPU=ppc
15707      VAR_CPU_ARCH=ppc
15708      VAR_CPU_BITS=32
15709      VAR_CPU_ENDIAN=big
15710      ;;
15711    powerpc64)
15712      VAR_CPU=ppc64
15713      VAR_CPU_ARCH=ppc
15714      VAR_CPU_BITS=64
15715      VAR_CPU_ENDIAN=big
15716      ;;
15717    powerpc64le)
15718      VAR_CPU=ppc64le
15719      VAR_CPU_ARCH=ppc
15720      VAR_CPU_BITS=64
15721      VAR_CPU_ENDIAN=little
15722      ;;
15723    s390)
15724      VAR_CPU=s390
15725      VAR_CPU_ARCH=s390
15726      VAR_CPU_BITS=32
15727      VAR_CPU_ENDIAN=big
15728      ;;
15729    s390x)
15730      VAR_CPU=s390x
15731      VAR_CPU_ARCH=s390
15732      VAR_CPU_BITS=64
15733      VAR_CPU_ENDIAN=big
15734      ;;
15735    sparc)
15736      VAR_CPU=sparc
15737      VAR_CPU_ARCH=sparc
15738      VAR_CPU_BITS=32
15739      VAR_CPU_ENDIAN=big
15740      ;;
15741    sparcv9|sparc64)
15742      VAR_CPU=sparcv9
15743      VAR_CPU_ARCH=sparc
15744      VAR_CPU_BITS=64
15745      VAR_CPU_ENDIAN=big
15746      ;;
15747    *)
15748      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15749      ;;
15750  esac
15751
15752  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15753  OPENJDK_TARGET_OS="$VAR_OS"
15754  if test "x$VAR_OS_TYPE" != x; then
15755    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15756  else
15757    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15758  fi
15759  if test "x$VAR_OS_ENV" != x; then
15760    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15761  else
15762    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15763  fi
15764  OPENJDK_TARGET_CPU="$VAR_CPU"
15765  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15766  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15767  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15768
15769
15770
15771
15772
15773
15774
15775
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15777$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15779$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15780
15781
15782
15783# Check whether --with-target-bits was given.
15784if test "${with_target_bits+set}" = set; then :
15785  withval=$with_target_bits;
15786fi
15787
15788
15789  # We have three types of compiles:
15790  # native  == normal compilation, target system == build system
15791  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15792  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15793  #
15794  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15795    # We're doing a proper cross-compilation
15796    COMPILE_TYPE="cross"
15797  else
15798    COMPILE_TYPE="native"
15799  fi
15800
15801  if test "x$with_target_bits" != x; then
15802    if test "x$COMPILE_TYPE" = "xcross"; then
15803      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15804    fi
15805
15806    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15807      # A reduced build is requested
15808      COMPILE_TYPE="reduced"
15809      OPENJDK_TARGET_CPU_BITS=32
15810      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15811        OPENJDK_TARGET_CPU=x86
15812      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15813        OPENJDK_TARGET_CPU=sparc
15814      else
15815        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15816      fi
15817    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15818      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
15819    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15820      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15821$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15822    else
15823      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15824    fi
15825  fi
15826
15827
15828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15829$as_echo_n "checking compilation type... " >&6; }
15830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15831$as_echo "$COMPILE_TYPE" >&6; }
15832
15833
15834  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15835    REQUIRED_OS_NAME=SunOS
15836    REQUIRED_OS_VERSION=5.10
15837  fi
15838  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15839    REQUIRED_OS_NAME=Linux
15840    REQUIRED_OS_VERSION=2.6
15841  fi
15842  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15843    REQUIRED_OS_NAME=Windows
15844    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15845      REQUIRED_OS_VERSION=5.2
15846    else
15847      REQUIRED_OS_VERSION=5.1
15848    fi
15849  fi
15850  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15851    REQUIRED_OS_NAME=Darwin
15852    REQUIRED_OS_VERSION=11.2
15853  fi
15854  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15855    REQUIRED_OS_NAME=AIX
15856    REQUIRED_OS_VERSION=7.1
15857  fi
15858
15859
15860
15861
15862
15863
15864  # Also store the legacy naming of the cpu.
15865  # Ie i586 and amd64 instead of x86 and x86_64
15866  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15867  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15868    OPENJDK_TARGET_CPU_LEGACY="i586"
15869  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15870    # On all platforms except MacOSX replace x86_64 with amd64.
15871    OPENJDK_TARGET_CPU_LEGACY="amd64"
15872  fi
15873
15874
15875  # And the second legacy naming of the cpu.
15876  # Ie i386 and amd64 instead of x86 and x86_64.
15877  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15878  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15879    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15880  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15881    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15882  fi
15883
15884
15885  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15886  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15887  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15888  OPENJDK_TARGET_CPU_ISADIR=""
15889  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15890    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15891      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15892    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15893      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15894    fi
15895  fi
15896
15897
15898  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15899  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15900  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    # On linux only, we replace x86 with i386.
15902    OPENJDK_TARGET_CPU_OSARCH="i386"
15903  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15904    # On all platforms except macosx, we replace x86_64 with amd64.
15905    OPENJDK_TARGET_CPU_OSARCH="amd64"
15906  fi
15907
15908
15909  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15910  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15911    OPENJDK_TARGET_CPU_JLI="i386"
15912  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15913    # On all platforms except macosx, we replace x86_64 with amd64.
15914    OPENJDK_TARGET_CPU_JLI="amd64"
15915  fi
15916
15917  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15918      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15919  else
15920      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15921  fi
15922
15923
15924  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15925  # Macosx is osx and x86_64 is x64
15926  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15927    OPENJDK_TARGET_OS_BUNDLE="osx"
15928  else
15929    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15930  fi
15931  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15932    OPENJDK_TARGET_CPU_BUNDLE="x64"
15933  else
15934    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15935  fi
15936  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15937
15938
15939
15940
15941  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15942    A_LP64="LP64:="
15943    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15944    # unpack200.exe
15945    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15946      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15947    fi
15948  fi
15949  LP64=$A_LP64
15950
15951
15952  if test "x$COMPILE_TYPE" = "xcross"; then
15953    # FIXME: ... or should this include reduced builds..?
15954    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15955  else
15956    DEFINE_CROSS_COMPILE_ARCH=""
15957  fi
15958
15959
15960  # Convert openjdk platform names to hotspot names
15961
15962  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15963  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15964    HOTSPOT_TARGET_OS=bsd
15965  fi
15966
15967
15968  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15969  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15970    HOTSPOT_TARGET_OS_TYPE=posix
15971  fi
15972
15973
15974  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15975  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15976    HOTSPOT_TARGET_CPU=x86_32
15977  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15978    HOTSPOT_TARGET_CPU=sparc
15979  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15980    HOTSPOT_TARGET_CPU=ppc_64
15981  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15982    HOTSPOT_TARGET_CPU=ppc_64
15983  fi
15984
15985
15986  # This is identical with OPENJDK_*, but define anyway for consistency.
15987  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15988
15989
15990  # Setup HOTSPOT_TARGET_CPU_DEFINE
15991  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15992    HOTSPOT_TARGET_CPU_DEFINE=IA32
15993  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15994    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15995  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15996    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15997  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15998    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15999  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16000    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16001  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16002    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16003
16004  # The cpu defines below are for zero, we don't support them directly.
16005  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16006    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16007  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16008    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16009  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16010    HOTSPOT_TARGET_CPU_DEFINE=S390
16011  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16012    HOTSPOT_TARGET_CPU_DEFINE=S390
16013  elif test "x$OPENJDK_TARGET_CPU" != x; then
16014    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16015  fi
16016
16017
16018
16019
16020  # Also store the legacy naming of the cpu.
16021  # Ie i586 and amd64 instead of x86 and x86_64
16022  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16023  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16024    OPENJDK_BUILD_CPU_LEGACY="i586"
16025  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16026    # On all platforms except MacOSX replace x86_64 with amd64.
16027    OPENJDK_BUILD_CPU_LEGACY="amd64"
16028  fi
16029
16030
16031  # And the second legacy naming of the cpu.
16032  # Ie i386 and amd64 instead of x86 and x86_64.
16033  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16034  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16035    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16036  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16037    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16038  fi
16039
16040
16041  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16042  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16043  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16044  OPENJDK_BUILD_CPU_ISADIR=""
16045  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16046    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16047      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16048    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16049      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16050    fi
16051  fi
16052
16053
16054  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16055  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16056  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16057    # On linux only, we replace x86 with i386.
16058    OPENJDK_BUILD_CPU_OSARCH="i386"
16059  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16060    # On all platforms except macosx, we replace x86_64 with amd64.
16061    OPENJDK_BUILD_CPU_OSARCH="amd64"
16062  fi
16063
16064
16065  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16066  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16067    OPENJDK_BUILD_CPU_JLI="i386"
16068  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16069    # On all platforms except macosx, we replace x86_64 with amd64.
16070    OPENJDK_BUILD_CPU_JLI="amd64"
16071  fi
16072
16073  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16074      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16075  else
16076      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16077  fi
16078
16079
16080  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16081  # Macosx is osx and x86_64 is x64
16082  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16083    OPENJDK_BUILD_OS_BUNDLE="osx"
16084  else
16085    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16086  fi
16087  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16088    OPENJDK_BUILD_CPU_BUNDLE="x64"
16089  else
16090    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16091  fi
16092  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16093
16094
16095
16096
16097  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16098    A_LP64="LP64:="
16099    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16100    # unpack200.exe
16101    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16102      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16103    fi
16104  fi
16105  LP64=$A_LP64
16106
16107
16108  if test "x$COMPILE_TYPE" = "xcross"; then
16109    # FIXME: ... or should this include reduced builds..?
16110    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16111  else
16112    DEFINE_CROSS_COMPILE_ARCH=""
16113  fi
16114
16115
16116  # Convert openjdk platform names to hotspot names
16117
16118  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16119  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16120    HOTSPOT_BUILD_OS=bsd
16121  fi
16122
16123
16124  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16125  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16126    HOTSPOT_BUILD_OS_TYPE=posix
16127  fi
16128
16129
16130  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16131  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16132    HOTSPOT_BUILD_CPU=x86_32
16133  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16134    HOTSPOT_BUILD_CPU=sparc
16135  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16136    HOTSPOT_BUILD_CPU=ppc_64
16137  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16138    HOTSPOT_BUILD_CPU=ppc_64
16139  fi
16140
16141
16142  # This is identical with OPENJDK_*, but define anyway for consistency.
16143  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16144
16145
16146  # Setup HOTSPOT_BUILD_CPU_DEFINE
16147  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16148    HOTSPOT_BUILD_CPU_DEFINE=IA32
16149  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16150    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16151  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16152    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16153  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16154    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16155  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16156    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16157  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16158    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16159
16160  # The cpu defines below are for zero, we don't support them directly.
16161  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16162    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16163  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16164    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16165  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16166    HOTSPOT_BUILD_CPU_DEFINE=S390
16167  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16168    HOTSPOT_BUILD_CPU_DEFINE=S390
16169  elif test "x$OPENJDK_BUILD_CPU" != x; then
16170    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16171  fi
16172
16173
16174
16175
16176  # ZERO_ARCHDEF is used to enable architecture-specific code.
16177  # This is used in legacy hotspot build.
16178  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16179
16180
16181
16182
16183
16184# Continue setting up basic stuff. Most remaining code require fundamental tools.
16185
16186  # Save the current directory this script was started from
16187  CURDIR="$PWD"
16188
16189  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16190  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16191  # was not available at that time.
16192  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16193  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16194    ORIGINAL_PATH="$REWRITTEN_PATH"
16195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16196$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16197  fi
16198
16199  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16200    PATH_SEP=";"
16201
16202  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16203  if test $SRC_ROOT_LENGTH -gt 100; then
16204    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16205  fi
16206
16207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16209$as_echo_n "checking cygwin release... " >&6; }
16210    CYGWIN_VERSION=`$UNAME -r`
16211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16212$as_echo "$CYGWIN_VERSION" >&6; }
16213    WINDOWS_ENV_VENDOR='cygwin'
16214    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16215
16216    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16217    if test "x$CYGWIN_VERSION_OLD" != x; then
16218      { $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
16219$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;}
16220      as_fn_error $? "Cannot continue" "$LINENO" 5
16221    fi
16222    if test "x$CYGPATH" = x; then
16223      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16224    fi
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16226$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16227    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16228    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16229    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16230    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16232$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16233    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16234    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16235    if test "x$test_cygdrive_prefix" = x; then
16236      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16237    fi
16238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16240$as_echo_n "checking msys release... " >&6; }
16241    MSYS_VERSION=`$UNAME -r`
16242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16243$as_echo "$MSYS_VERSION" >&6; }
16244
16245    WINDOWS_ENV_VENDOR='msys'
16246    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16247
16248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16249$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16250    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16251    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16252
16253  windows_path="$MSYS_ROOT_PATH"
16254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16255    unix_path=`$CYGPATH -u "$windows_path"`
16256    MSYS_ROOT_PATH="$unix_path"
16257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16259    MSYS_ROOT_PATH="$unix_path"
16260  fi
16261
16262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16263$as_echo "$MSYS_ROOT_PATH" >&6; }
16264    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16265  else
16266    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16267  fi
16268
16269  # Test if windows or unix (cygwin/msys) find is first in path.
16270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16271$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16272  FIND_BINARY_OUTPUT=`find --version 2>&1`
16273  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16275$as_echo "unix style" >&6; }
16276  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16278$as_echo "Windows" >&6; }
16279    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16280$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16281    { $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
16282$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16283    as_fn_error $? "Cannot continue" "$LINENO" 5
16284  else
16285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16286$as_echo "unknown" >&6; }
16287    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16288$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16289  fi
16290
16291  else
16292    PATH_SEP=":"
16293  fi
16294
16295
16296  # We get the top-level directory from the supporting wrappers.
16297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16298$as_echo_n "checking for top-level directory... " >&6; }
16299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16300$as_echo "$TOPDIR" >&6; }
16301
16302
16303  # Save the original version of TOPDIR for string comparisons
16304  ORIGINAL_TOPDIR="$TOPDIR"
16305
16306
16307  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16308
16309  # Only process if variable expands to non-empty
16310
16311  if test "x$CURDIR" != x; then
16312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16313
16314  # Input might be given as Windows format, start by converting to
16315  # unix format.
16316  path="$CURDIR"
16317  new_path=`$CYGPATH -u "$path"`
16318
16319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16322  # "foo.exe" is OK but "foo" is an error.
16323  #
16324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16325  # It is also a way to make sure we got the proper file name for the real test later on.
16326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16327  if test "x$test_shortpath" = x; then
16328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16329$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16330    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16331  fi
16332
16333  # Call helper function which possibly converts this using DOS-style short mode.
16334  # If so, the updated path is stored in $new_path.
16335
16336  input_path="$new_path"
16337  # Check if we need to convert this using DOS-style short mode. If the path
16338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16339  # take no chances and rewrite it.
16340  # Note: m4 eats our [], so we need to use [ and ] instead.
16341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16342  if test "x$has_forbidden_chars" != x; then
16343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16347      # Going to short mode and back again did indeed matter. Since short mode is
16348      # case insensitive, let's make it lowercase to improve readability.
16349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16350      # Now convert it back to Unix-style (cygpath)
16351      input_path=`$CYGPATH -u "$shortmode_path"`
16352      new_path="$input_path"
16353    fi
16354  fi
16355
16356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16357  if test "x$test_cygdrive_prefix" = x; then
16358    # As a simple fix, exclude /usr/bin since it's not a real path.
16359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16361      # a path prefixed by /cygdrive for fixpath to work.
16362      new_path="$CYGWIN_ROOT_PATH$input_path"
16363    fi
16364  fi
16365
16366
16367  if test "x$path" != "x$new_path"; then
16368    CURDIR="$new_path"
16369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16370$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16371  fi
16372
16373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16374
16375  path="$CURDIR"
16376  has_colon=`$ECHO $path | $GREP ^.:`
16377  new_path="$path"
16378  if test "x$has_colon" = x; then
16379    # Not in mixed or Windows style, start by that.
16380    new_path=`cmd //c echo $path`
16381  fi
16382
16383
16384  input_path="$new_path"
16385  # Check if we need to convert this using DOS-style short mode. If the path
16386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16387  # take no chances and rewrite it.
16388  # Note: m4 eats our [], so we need to use [ and ] instead.
16389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16390  if test "x$has_forbidden_chars" != x; then
16391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16393  fi
16394
16395
16396  windows_path="$new_path"
16397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16398    unix_path=`$CYGPATH -u "$windows_path"`
16399    new_path="$unix_path"
16400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16402    new_path="$unix_path"
16403  fi
16404
16405  if test "x$path" != "x$new_path"; then
16406    CURDIR="$new_path"
16407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16408$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16409  fi
16410
16411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16413
16414    else
16415      # We're on a unix platform. Hooray! :)
16416      path="$CURDIR"
16417      has_space=`$ECHO "$path" | $GREP " "`
16418      if test "x$has_space" != x; then
16419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16420$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16422      fi
16423
16424      # Use eval to expand a potential ~
16425      eval path="$path"
16426      if test ! -f "$path" && test ! -d "$path"; then
16427        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16428      fi
16429
16430      if test -d "$path"; then
16431        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16432      else
16433        dir="`$DIRNAME "$path"`"
16434        base="`$BASENAME "$path"`"
16435        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16436      fi
16437    fi
16438  fi
16439
16440
16441  # Only process if variable expands to non-empty
16442
16443  if test "x$TOPDIR" != x; then
16444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16445
16446  # Input might be given as Windows format, start by converting to
16447  # unix format.
16448  path="$TOPDIR"
16449  new_path=`$CYGPATH -u "$path"`
16450
16451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16454  # "foo.exe" is OK but "foo" is an error.
16455  #
16456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16457  # It is also a way to make sure we got the proper file name for the real test later on.
16458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16459  if test "x$test_shortpath" = x; then
16460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16461$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16462    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16463  fi
16464
16465  # Call helper function which possibly converts this using DOS-style short mode.
16466  # If so, the updated path is stored in $new_path.
16467
16468  input_path="$new_path"
16469  # Check if we need to convert this using DOS-style short mode. If the path
16470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16471  # take no chances and rewrite it.
16472  # Note: m4 eats our [], so we need to use [ and ] instead.
16473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16474  if test "x$has_forbidden_chars" != x; then
16475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16479      # Going to short mode and back again did indeed matter. Since short mode is
16480      # case insensitive, let's make it lowercase to improve readability.
16481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16482      # Now convert it back to Unix-style (cygpath)
16483      input_path=`$CYGPATH -u "$shortmode_path"`
16484      new_path="$input_path"
16485    fi
16486  fi
16487
16488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16489  if test "x$test_cygdrive_prefix" = x; then
16490    # As a simple fix, exclude /usr/bin since it's not a real path.
16491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16493      # a path prefixed by /cygdrive for fixpath to work.
16494      new_path="$CYGWIN_ROOT_PATH$input_path"
16495    fi
16496  fi
16497
16498
16499  if test "x$path" != "x$new_path"; then
16500    TOPDIR="$new_path"
16501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16502$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16503  fi
16504
16505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16506
16507  path="$TOPDIR"
16508  has_colon=`$ECHO $path | $GREP ^.:`
16509  new_path="$path"
16510  if test "x$has_colon" = x; then
16511    # Not in mixed or Windows style, start by that.
16512    new_path=`cmd //c echo $path`
16513  fi
16514
16515
16516  input_path="$new_path"
16517  # Check if we need to convert this using DOS-style short mode. If the path
16518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16519  # take no chances and rewrite it.
16520  # Note: m4 eats our [], so we need to use [ and ] instead.
16521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16522  if test "x$has_forbidden_chars" != x; then
16523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16525  fi
16526
16527
16528  windows_path="$new_path"
16529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16530    unix_path=`$CYGPATH -u "$windows_path"`
16531    new_path="$unix_path"
16532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16534    new_path="$unix_path"
16535  fi
16536
16537  if test "x$path" != "x$new_path"; then
16538    TOPDIR="$new_path"
16539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16540$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16541  fi
16542
16543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16545
16546    else
16547      # We're on a unix platform. Hooray! :)
16548      path="$TOPDIR"
16549      has_space=`$ECHO "$path" | $GREP " "`
16550      if test "x$has_space" != x; then
16551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16552$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16554      fi
16555
16556      # Use eval to expand a potential ~
16557      eval path="$path"
16558      if test ! -f "$path" && test ! -d "$path"; then
16559        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16560      fi
16561
16562      if test -d "$path"; then
16563        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16564      else
16565        dir="`$DIRNAME "$path"`"
16566        base="`$BASENAME "$path"`"
16567        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16568      fi
16569    fi
16570  fi
16571
16572  # SRC_ROOT is a traditional alias for TOPDIR.
16573  SRC_ROOT=$TOPDIR
16574
16575  # Calculate a canonical version of TOPDIR for string comparisons
16576  CANONICAL_TOPDIR=$TOPDIR
16577
16578  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16579    # Follow a chain of symbolic links. Use readlink
16580    # where it exists, else fall back to horribly
16581    # complicated shell code.
16582    if test "x$READLINK_TESTED" != yes; then
16583      # On MacOSX there is a readlink tool with a different
16584      # purpose than the GNU readlink tool. Check the found readlink.
16585      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16586      if test "x$ISGNU" = x; then
16587        # A readlink that we do not know how to use.
16588        # Are there other non-GNU readlinks out there?
16589        READLINK_TESTED=yes
16590        READLINK=
16591      fi
16592    fi
16593
16594    if test "x$READLINK" != x; then
16595      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16596    else
16597      # Save the current directory for restoring afterwards
16598      STARTDIR=$PWD
16599      COUNTER=0
16600      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16601      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16602      cd $sym_link_dir
16603      # Use -P flag to resolve symlinks in directories.
16604      cd `$THEPWDCMD -P`
16605      sym_link_dir=`$THEPWDCMD -P`
16606      # Resolve file symlinks
16607      while test $COUNTER -lt 20; do
16608        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16609        if test "x$ISLINK" == x; then
16610          # This is not a symbolic link! We are done!
16611          break
16612        fi
16613        # Again resolve directory symlinks since the target of the just found
16614        # link could be in a different directory
16615        cd `$DIRNAME $ISLINK`
16616        sym_link_dir=`$THEPWDCMD -P`
16617        sym_link_file=`$BASENAME $ISLINK`
16618        let COUNTER=COUNTER+1
16619      done
16620      cd $STARTDIR
16621      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16622    fi
16623  fi
16624
16625
16626
16627  # Locate the directory of this script.
16628  AUTOCONF_DIR=$TOPDIR/common/autoconf
16629
16630  # Setup username (for use in adhoc version strings etc)
16631  # Outer [ ] to quote m4.
16632   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16633
16634
16635
16636# Check if it's a pure open build or if custom sources are to be used.
16637
16638  # Check whether --enable-openjdk-only was given.
16639if test "${enable_openjdk_only+set}" = set; then :
16640  enableval=$enable_openjdk_only;
16641else
16642  enable_openjdk_only="no"
16643fi
16644
16645
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16647$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16649$as_echo "$enable_openjdk_only" >&6; }
16650  if test "x$enable_openjdk_only" = "xyes"; then
16651    SUPPRESS_CUSTOM_EXTENSIONS="true"
16652  elif test "x$enable_openjdk_only" = "xno"; then
16653    SUPPRESS_CUSTOM_EXTENSIONS="false"
16654  else
16655    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16656  fi
16657
16658  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16659  # the IncludeCustomExtension macro.
16660
16661
16662# Check whether --with-custom-make-dir was given.
16663if test "${with_custom_make_dir+set}" = set; then :
16664  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
16665$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16666fi
16667
16668
16669
16670
16671# These are needed to be able to create a configuration name (and thus the output directory)
16672
16673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16674$as_echo_n "checking which variant of the JDK to build... " >&6; }
16675
16676# Check whether --with-jdk-variant was given.
16677if test "${with_jdk_variant+set}" = set; then :
16678  withval=$with_jdk_variant;
16679fi
16680
16681
16682  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16683    JDK_VARIANT="normal"
16684  else
16685    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16686  fi
16687
16688
16689
16690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16691$as_echo "$JDK_VARIANT" >&6; }
16692
16693
16694  DEBUG_LEVEL="release"
16695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16696$as_echo_n "checking which debug level to use... " >&6; }
16697  # Check whether --enable-debug was given.
16698if test "${enable_debug+set}" = set; then :
16699  enableval=$enable_debug;
16700        ENABLE_DEBUG="${enableval}"
16701        DEBUG_LEVEL="fastdebug"
16702
16703else
16704  ENABLE_DEBUG="no"
16705fi
16706
16707
16708
16709# Check whether --with-debug-level was given.
16710if test "${with_debug_level+set}" = set; then :
16711  withval=$with_debug_level;
16712        DEBUG_LEVEL="${withval}"
16713        if test "x$ENABLE_DEBUG" = xyes; then
16714          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16715        fi
16716
16717fi
16718
16719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16720$as_echo "$DEBUG_LEVEL" >&6; }
16721
16722  if test "x$DEBUG_LEVEL" != xrelease && \
16723      test "x$DEBUG_LEVEL" != xoptimized && \
16724      test "x$DEBUG_LEVEL" != xfastdebug && \
16725      test "x$DEBUG_LEVEL" != xslowdebug; then
16726    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16727  fi
16728
16729  # Translate DEBUG_LEVEL to debug level used by Hotspot
16730  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16731  if test "x$DEBUG_LEVEL" = xrelease; then
16732    HOTSPOT_DEBUG_LEVEL="product"
16733  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16734    HOTSPOT_DEBUG_LEVEL="debug"
16735  fi
16736
16737  if test "x$DEBUG_LEVEL" = xoptimized; then
16738    # The debug level 'optimized' is a little special because it is currently only
16739    # applicable to the HotSpot build where it means to build a completely
16740    # optimized version of the VM without any debugging code (like for the
16741    # 'release' debug level which is called 'product' in the HotSpot build) but
16742    # with the exception that it can contain additional code which is otherwise
16743    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16744    # test new and/or experimental features which are not intended for customer
16745    # shipment. Because these new features need to be tested and benchmarked in
16746    # real world scenarios, we want to build the containing JDK at the 'release'
16747    # debug level.
16748    DEBUG_LEVEL="release"
16749  fi
16750
16751
16752
16753
16754
16755
16756# Check whether --with-jvm-variants was given.
16757if test "${with_jvm_variants+set}" = set; then :
16758  withval=$with_jvm_variants;
16759fi
16760
16761
16762
16763
16764# Check whether --with-cpu-port was given.
16765if test "${with_cpu_port+set}" = set; then :
16766  withval=$with_cpu_port;
16767fi
16768
16769
16770  if test "x$with_cpu_port" != x; then
16771    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16772      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16773    fi
16774    if test "x$with_cpu_port" != xarm64 && \
16775        test "x$with_cpu_port" != xaarch64; then
16776      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16777    fi
16778    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16779  fi
16780
16781
16782  if test "x$with_jvm_variants" = x; then
16783    with_jvm_variants="server"
16784  fi
16785  JVM_VARIANTS_OPT="$with_jvm_variants"
16786
16787  # Has the user listed more than one variant?
16788  # Additional [] needed to keep m4 from mangling shell constructs.
16789  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16790    BUILDING_MULTIPLE_JVM_VARIANTS=true
16791  else
16792    BUILDING_MULTIPLE_JVM_VARIANTS=false
16793  fi
16794  # Replace the commas with AND for use in the build directory name.
16795  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16796
16797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16798$as_echo_n "checking which variants of the JVM to build... " >&6; }
16799  # JVM_VARIANTS is a space-separated list.
16800  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16801  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16803$as_echo "$JVM_VARIANTS" >&6; }
16804
16805  # Check that the selected variants are valid
16806
16807  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16808  # Notice that the original variant failes on SLES 10 and 11
16809  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16810  STACK=${JVM_VARIANTS// /$'\n'}
16811  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16812  if test "x$INVALID_VARIANTS" != x; then
16813    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16814$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16815    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16816  fi
16817
16818  # All "special" variants share the same output directory ("server")
16819  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16820  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16821  STACK=${JVM_VARIANTS// /$'\n'}
16822  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16823  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16824    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16825  fi
16826
16827  # The "main" variant is the one used by other libs to link against during the
16828  # build.
16829  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16830    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16831    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16832      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16833        JVM_VARIANT_MAIN="$variant"
16834        break
16835      fi
16836    done
16837  else
16838    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16839  fi
16840
16841
16842
16843
16844
16845  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16846    # zero behaves as a platform and rewrites these values. This is really weird. :(
16847    # We are guaranteed that we do not build any other variants when building zero.
16848    HOTSPOT_TARGET_CPU=zero
16849    HOTSPOT_TARGET_CPU_ARCH=zero
16850  fi
16851
16852
16853# With basic setup done, call the custom early hook.
16854
16855
16856# Check if we have devkits, extra paths or sysroot set.
16857
16858
16859# Check whether --with-devkit was given.
16860if test "${with_devkit+set}" = set; then :
16861  withval=$with_devkit;
16862
16863  # Only process if variable expands to non-empty
16864
16865  if test "x$with_devkit" != x; then
16866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867
16868  # Input might be given as Windows format, start by converting to
16869  # unix format.
16870  path="$with_devkit"
16871  new_path=`$CYGPATH -u "$path"`
16872
16873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16876  # "foo.exe" is OK but "foo" is an error.
16877  #
16878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16879  # It is also a way to make sure we got the proper file name for the real test later on.
16880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16881  if test "x$test_shortpath" = x; then
16882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16883$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16884    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16885  fi
16886
16887  # Call helper function which possibly converts this using DOS-style short mode.
16888  # If so, the updated path is stored in $new_path.
16889
16890  input_path="$new_path"
16891  # Check if we need to convert this using DOS-style short mode. If the path
16892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16893  # take no chances and rewrite it.
16894  # Note: m4 eats our [], so we need to use [ and ] instead.
16895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16896  if test "x$has_forbidden_chars" != x; then
16897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16901      # Going to short mode and back again did indeed matter. Since short mode is
16902      # case insensitive, let's make it lowercase to improve readability.
16903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16904      # Now convert it back to Unix-style (cygpath)
16905      input_path=`$CYGPATH -u "$shortmode_path"`
16906      new_path="$input_path"
16907    fi
16908  fi
16909
16910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16911  if test "x$test_cygdrive_prefix" = x; then
16912    # As a simple fix, exclude /usr/bin since it's not a real path.
16913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16915      # a path prefixed by /cygdrive for fixpath to work.
16916      new_path="$CYGWIN_ROOT_PATH$input_path"
16917    fi
16918  fi
16919
16920
16921  if test "x$path" != "x$new_path"; then
16922    with_devkit="$new_path"
16923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16924$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16925  fi
16926
16927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16928
16929  path="$with_devkit"
16930  has_colon=`$ECHO $path | $GREP ^.:`
16931  new_path="$path"
16932  if test "x$has_colon" = x; then
16933    # Not in mixed or Windows style, start by that.
16934    new_path=`cmd //c echo $path`
16935  fi
16936
16937
16938  input_path="$new_path"
16939  # Check if we need to convert this using DOS-style short mode. If the path
16940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16941  # take no chances and rewrite it.
16942  # Note: m4 eats our [], so we need to use [ and ] instead.
16943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16944  if test "x$has_forbidden_chars" != x; then
16945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16947  fi
16948
16949
16950  windows_path="$new_path"
16951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16952    unix_path=`$CYGPATH -u "$windows_path"`
16953    new_path="$unix_path"
16954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16956    new_path="$unix_path"
16957  fi
16958
16959  if test "x$path" != "x$new_path"; then
16960    with_devkit="$new_path"
16961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16962$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16963  fi
16964
16965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16967
16968    else
16969      # We're on a unix platform. Hooray! :)
16970      path="$with_devkit"
16971      has_space=`$ECHO "$path" | $GREP " "`
16972      if test "x$has_space" != x; then
16973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16974$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16976      fi
16977
16978      # Use eval to expand a potential ~
16979      eval path="$path"
16980      if test ! -f "$path" && test ! -d "$path"; then
16981        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16982      fi
16983
16984      if test -d "$path"; then
16985        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16986      else
16987        dir="`$DIRNAME "$path"`"
16988        base="`$BASENAME "$path"`"
16989        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16990      fi
16991    fi
16992  fi
16993
16994        DEVKIT_ROOT="$with_devkit"
16995        # Check for a meta data info file in the root of the devkit
16996        if test -f "$DEVKIT_ROOT/devkit.info"; then
16997          . $DEVKIT_ROOT/devkit.info
16998          # This potentially sets the following:
16999          # A descriptive name of the devkit
17000
17001  if test "x$DEVKIT_NAME" = x; then
17002    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17003  fi
17004
17005          # Corresponds to --with-extra-path
17006
17007  if test "x$DEVKIT_EXTRA_PATH" = x; then
17008    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17009  fi
17010
17011          # Corresponds to --with-toolchain-path
17012
17013  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17014    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17015  fi
17016
17017          # Corresponds to --with-sysroot
17018
17019  if test "x$DEVKIT_SYSROOT" = x; then
17020    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17021  fi
17022
17023
17024          # Identifies the Visual Studio version in the devkit
17025
17026  if test "x$DEVKIT_VS_VERSION" = x; then
17027    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17028  fi
17029
17030          # The Visual Studio include environment variable
17031
17032  if test "x$DEVKIT_VS_INCLUDE" = x; then
17033    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17034  fi
17035
17036          # The Visual Studio lib environment variable
17037
17038  if test "x$DEVKIT_VS_LIB" = x; then
17039    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17040  fi
17041
17042          # Corresponds to --with-msvcr-dll
17043
17044  if test "x$DEVKIT_MSVCR_DLL" = x; then
17045    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17046  fi
17047
17048          # Corresponds to --with-msvcp-dll
17049
17050  if test "x$DEVKIT_MSVCP_DLL" = x; then
17051    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17052  fi
17053
17054        fi
17055
17056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17057$as_echo_n "checking for devkit... " >&6; }
17058        if test "x$DEVKIT_NAME" != x; then
17059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17060$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17061        else
17062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17063$as_echo "$DEVKIT_ROOT" >&6; }
17064        fi
17065
17066
17067  if test "x$DEVKIT_EXTRA_PATH" != x; then
17068    if test "x$EXTRA_PATH" = x; then
17069      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17070    else
17071      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17072    fi
17073  fi
17074
17075
17076        # Fallback default of just /bin if DEVKIT_PATH is not defined
17077        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17078          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17079        fi
17080
17081  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17082    if test "x$TOOLCHAIN_PATH" = x; then
17083      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17084    else
17085      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17086    fi
17087  fi
17088
17089
17090        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17091        # places for backwards compatiblity.
17092        if test "x$DEVKIT_SYSROOT" != x; then
17093          SYSROOT="$DEVKIT_SYSROOT"
17094        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17095          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17096        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17097          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17098        fi
17099
17100
17101fi
17102
17103
17104  # You can force the sysroot if the sysroot encoded into the compiler tools
17105  # is not correct.
17106
17107# Check whether --with-sys-root was given.
17108if test "${with_sys_root+set}" = set; then :
17109  withval=$with_sys_root; SYSROOT=$with_sys_root
17110
17111fi
17112
17113
17114
17115# Check whether --with-sysroot was given.
17116if test "${with_sysroot+set}" = set; then :
17117  withval=$with_sysroot; SYSROOT=$with_sysroot
17118
17119fi
17120
17121
17122
17123# Check whether --with-tools-dir was given.
17124if test "${with_tools_dir+set}" = set; then :
17125  withval=$with_tools_dir;
17126  if test "x$with_tools_dir" != x; then
17127    if test "x$TOOLCHAIN_PATH" = x; then
17128      TOOLCHAIN_PATH="$with_tools_dir"
17129    else
17130      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17131    fi
17132  fi
17133
17134
17135fi
17136
17137
17138
17139# Check whether --with-toolchain-path was given.
17140if test "${with_toolchain_path+set}" = set; then :
17141  withval=$with_toolchain_path;
17142  if test "x$with_toolchain_path" != x; then
17143    if test "x$TOOLCHAIN_PATH" = x; then
17144      TOOLCHAIN_PATH="$with_toolchain_path"
17145    else
17146      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17147    fi
17148  fi
17149
17150
17151fi
17152
17153
17154
17155# Check whether --with-extra-path was given.
17156if test "${with_extra_path+set}" = set; then :
17157  withval=$with_extra_path;
17158  if test "x$with_extra_path" != x; then
17159    if test "x$EXTRA_PATH" = x; then
17160      EXTRA_PATH="$with_extra_path"
17161    else
17162      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17163    fi
17164  fi
17165
17166
17167fi
17168
17169
17170  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17171    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17172    # If not, detect if Xcode is installed by running xcodebuild -version
17173    # if no Xcode installed, xcodebuild exits with 1
17174    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17175    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17176      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17177      # fall back on the stub binary in /usr/bin/xcodebuild
17178      # Extract the first word of "xcodebuild", so it can be a program name with args.
17179set dummy xcodebuild; ac_word=$2
17180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17181$as_echo_n "checking for $ac_word... " >&6; }
17182if ${ac_cv_path_XCODEBUILD+:} false; then :
17183  $as_echo_n "(cached) " >&6
17184else
17185  case $XCODEBUILD in
17186  [\\/]* | ?:[\\/]*)
17187  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17188  ;;
17189  *)
17190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17191for as_dir in $TOOLCHAIN_PATH
17192do
17193  IFS=$as_save_IFS
17194  test -z "$as_dir" && as_dir=.
17195    for ac_exec_ext in '' $ac_executable_extensions; do
17196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17197    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17199    break 2
17200  fi
17201done
17202  done
17203IFS=$as_save_IFS
17204
17205  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17206  ;;
17207esac
17208fi
17209XCODEBUILD=$ac_cv_path_XCODEBUILD
17210if test -n "$XCODEBUILD"; then
17211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17212$as_echo "$XCODEBUILD" >&6; }
17213else
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17215$as_echo "no" >&6; }
17216fi
17217
17218
17219    else
17220      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17221      # when only the command line tools are installed there are no SDKs, so headers
17222      # are copied into the system frameworks
17223      XCODEBUILD=
17224
17225    fi
17226
17227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17228$as_echo_n "checking for sdk name... " >&6; }
17229
17230# Check whether --with-sdk-name was given.
17231if test "${with_sdk_name+set}" = set; then :
17232  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17233
17234fi
17235
17236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17237$as_echo "$SDKNAME" >&6; }
17238
17239    # if toolchain path is specified then don't rely on system headers, they may not compile
17240    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17241    test -z "$TOOLCHAIN_PATH" && \
17242      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17243
17244    if test -z "$SYSROOT"; then
17245      if test -n "$XCODEBUILD"; then
17246        # if we don't have system headers, use default SDK name (last resort)
17247        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17248          SDKNAME=${SDKNAME:-macosx}
17249        fi
17250
17251        if test -n "$SDKNAME"; then
17252          # Call xcodebuild to determine SYSROOT
17253          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17254        fi
17255      else
17256        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17257          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
17258        fi
17259      fi
17260    else
17261      # warn user if --with-sdk-name was also set
17262      if test -n "$with_sdk_name"; then
17263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17264$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17265      fi
17266    fi
17267
17268    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17269      # If no system framework headers, then SYSROOT must be set, or we won't build
17270      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
17271    fi
17272
17273    # Perform a basic sanity test
17274    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17275      if test -z "$SYSROOT"; then
17276        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
17277      else
17278        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17279      fi
17280    fi
17281
17282    # set SDKROOT too, Xcode tools will pick it up
17283    SDKROOT=$SYSROOT
17284
17285  fi
17286
17287  # Prepend the extra path to the global path
17288
17289  if test "x$EXTRA_PATH" != x; then
17290    if test "x$PATH" = x; then
17291      PATH="$EXTRA_PATH"
17292    else
17293      PATH="$EXTRA_PATH:$PATH"
17294    fi
17295  fi
17296
17297
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17299$as_echo_n "checking for sysroot... " >&6; }
17300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17301$as_echo "$SYSROOT" >&6; }
17302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17303$as_echo_n "checking for toolchain path... " >&6; }
17304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17305$as_echo "$TOOLCHAIN_PATH" >&6; }
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17307$as_echo_n "checking for extra path... " >&6; }
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17309$as_echo "$EXTRA_PATH" >&6; }
17310
17311
17312# To properly create a configuration name, we need to have the OpenJDK target
17313# and options (variants and debug level) parsed.
17314
17315
17316
17317# Check whether --with-conf-name was given.
17318if test "${with_conf_name+set}" = set; then :
17319  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17320fi
17321
17322
17323  # Test from where we are running configure, in or outside of src root.
17324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17325$as_echo_n "checking where to store configuration... " >&6; }
17326  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17327      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17328      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17329    # We are running configure from the src root.
17330    # Create a default ./build/target-variant-debuglevel output root.
17331    if test "x${CONF_NAME}" = x; then
17332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17333$as_echo "in default location" >&6; }
17334      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17335    else
17336      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17337$as_echo "in build directory with custom name" >&6; }
17338    fi
17339    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17340    $MKDIR -p "$OUTPUT_ROOT"
17341    if test ! -d "$OUTPUT_ROOT"; then
17342      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17343    fi
17344  else
17345    # We are running configure from outside of the src dir.
17346    # Then use the current directory as output dir!
17347    # If configuration is situated in normal build directory, just use the build
17348    # directory name as configuration name, otherwise use the complete path.
17349    if test "x${CONF_NAME}" = x; then
17350      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17351    fi
17352    OUTPUT_ROOT="$CURDIR"
17353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17354$as_echo "in current directory" >&6; }
17355
17356    # WARNING: This might be a bad thing to do. You need to be sure you want to
17357    # have a configuration in this directory. Do some sanity checks!
17358
17359    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17360      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17361      # other files
17362      files_present=`$LS $OUTPUT_ROOT`
17363      # Configure has already touched config.log and confdefs.h in the current dir when this check
17364      # is performed.
17365      filtered_files=`$ECHO "$files_present" \
17366          | $SED -e 's/config.log//g' \
17367              -e 's/configure.log//g' \
17368              -e 's/confdefs.h//g' \
17369              -e 's/ //g' \
17370          | $TR -d '\n'`
17371      if test "x$filtered_files" != x; then
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17373$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17374        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17375$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17376        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17377$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17378        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17379$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17380        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17381$as_echo "$as_me: seriously mess up just about everything." >&6;}
17382        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17383$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17384        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17385$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17386        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17387      fi
17388    fi
17389  fi
17390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17391$as_echo_n "checking what configuration name to use... " >&6; }
17392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17393$as_echo "$CONF_NAME" >&6; }
17394
17395
17396  # Only process if variable expands to non-empty
17397
17398  if test "x$OUTPUT_ROOT" != x; then
17399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17400
17401  # Input might be given as Windows format, start by converting to
17402  # unix format.
17403  path="$OUTPUT_ROOT"
17404  new_path=`$CYGPATH -u "$path"`
17405
17406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17409  # "foo.exe" is OK but "foo" is an error.
17410  #
17411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17412  # It is also a way to make sure we got the proper file name for the real test later on.
17413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17414  if test "x$test_shortpath" = x; then
17415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17416$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17417    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17418  fi
17419
17420  # Call helper function which possibly converts this using DOS-style short mode.
17421  # If so, the updated path is stored in $new_path.
17422
17423  input_path="$new_path"
17424  # Check if we need to convert this using DOS-style short mode. If the path
17425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17426  # take no chances and rewrite it.
17427  # Note: m4 eats our [], so we need to use [ and ] instead.
17428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17429  if test "x$has_forbidden_chars" != x; then
17430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17434      # Going to short mode and back again did indeed matter. Since short mode is
17435      # case insensitive, let's make it lowercase to improve readability.
17436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17437      # Now convert it back to Unix-style (cygpath)
17438      input_path=`$CYGPATH -u "$shortmode_path"`
17439      new_path="$input_path"
17440    fi
17441  fi
17442
17443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17444  if test "x$test_cygdrive_prefix" = x; then
17445    # As a simple fix, exclude /usr/bin since it's not a real path.
17446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17448      # a path prefixed by /cygdrive for fixpath to work.
17449      new_path="$CYGWIN_ROOT_PATH$input_path"
17450    fi
17451  fi
17452
17453
17454  if test "x$path" != "x$new_path"; then
17455    OUTPUT_ROOT="$new_path"
17456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17457$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17458  fi
17459
17460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17461
17462  path="$OUTPUT_ROOT"
17463  has_colon=`$ECHO $path | $GREP ^.:`
17464  new_path="$path"
17465  if test "x$has_colon" = x; then
17466    # Not in mixed or Windows style, start by that.
17467    new_path=`cmd //c echo $path`
17468  fi
17469
17470
17471  input_path="$new_path"
17472  # Check if we need to convert this using DOS-style short mode. If the path
17473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17474  # take no chances and rewrite it.
17475  # Note: m4 eats our [], so we need to use [ and ] instead.
17476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17477  if test "x$has_forbidden_chars" != x; then
17478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17480  fi
17481
17482
17483  windows_path="$new_path"
17484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17485    unix_path=`$CYGPATH -u "$windows_path"`
17486    new_path="$unix_path"
17487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17489    new_path="$unix_path"
17490  fi
17491
17492  if test "x$path" != "x$new_path"; then
17493    OUTPUT_ROOT="$new_path"
17494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17495$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17496  fi
17497
17498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17500
17501    else
17502      # We're on a unix platform. Hooray! :)
17503      path="$OUTPUT_ROOT"
17504      has_space=`$ECHO "$path" | $GREP " "`
17505      if test "x$has_space" != x; then
17506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17507$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17509      fi
17510
17511      # Use eval to expand a potential ~
17512      eval path="$path"
17513      if test ! -f "$path" && test ! -d "$path"; then
17514        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17515      fi
17516
17517      if test -d "$path"; then
17518        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17519      else
17520        dir="`$DIRNAME "$path"`"
17521        base="`$BASENAME "$path"`"
17522        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17523      fi
17524    fi
17525  fi
17526
17527
17528  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17529  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17530
17531  SPEC=$OUTPUT_ROOT/spec.gmk
17532
17533  CONF_NAME=$CONF_NAME
17534
17535  OUTPUT_ROOT=$OUTPUT_ROOT
17536
17537
17538
17539  # The spec.gmk file contains all variables for the make system.
17540  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17541
17542  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17543  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17544
17545  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17546  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17547
17548  # The compare.sh is used to compare the build output to other builds.
17549  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17550
17551  # The generated Makefile knows where the spec.gmk is and where the source is.
17552  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17553  # which will look for generated configurations
17554  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17555
17556
17557
17558# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17559
17560  for ac_prog in apt-get yum brew port pkgutil pkgadd
17561do
17562  # Extract the first word of "$ac_prog", so it can be a program name with args.
17563set dummy $ac_prog; ac_word=$2
17564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17565$as_echo_n "checking for $ac_word... " >&6; }
17566if ${ac_cv_prog_PKGHANDLER+:} false; then :
17567  $as_echo_n "(cached) " >&6
17568else
17569  if test -n "$PKGHANDLER"; then
17570  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17571else
17572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17573for as_dir in $PATH
17574do
17575  IFS=$as_save_IFS
17576  test -z "$as_dir" && as_dir=.
17577    for ac_exec_ext in '' $ac_executable_extensions; do
17578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17579    ac_cv_prog_PKGHANDLER="$ac_prog"
17580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17581    break 2
17582  fi
17583done
17584  done
17585IFS=$as_save_IFS
17586
17587fi
17588fi
17589PKGHANDLER=$ac_cv_prog_PKGHANDLER
17590if test -n "$PKGHANDLER"; then
17591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17592$as_echo "$PKGHANDLER" >&6; }
17593else
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17595$as_echo "no" >&6; }
17596fi
17597
17598
17599  test -n "$PKGHANDLER" && break
17600done
17601
17602
17603
17604# Setup tools that requires more complex handling, or that is not needed by the configure script.
17605
17606
17607
17608  # Publish this variable in the help.
17609
17610
17611  if [ -z "${MAKE+x}" ]; then
17612    # The variable is not set by user, try to locate tool using the code snippet
17613
17614    # Try our hardest to locate a correct version of GNU make
17615    for ac_prog in gmake
17616do
17617  # Extract the first word of "$ac_prog", so it can be a program name with args.
17618set dummy $ac_prog; ac_word=$2
17619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17620$as_echo_n "checking for $ac_word... " >&6; }
17621if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17622  $as_echo_n "(cached) " >&6
17623else
17624  case $CHECK_GMAKE in
17625  [\\/]* | ?:[\\/]*)
17626  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17627  ;;
17628  *)
17629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17630for as_dir in $PATH
17631do
17632  IFS=$as_save_IFS
17633  test -z "$as_dir" && as_dir=.
17634    for ac_exec_ext in '' $ac_executable_extensions; do
17635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17636    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17638    break 2
17639  fi
17640done
17641  done
17642IFS=$as_save_IFS
17643
17644  ;;
17645esac
17646fi
17647CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17648if test -n "$CHECK_GMAKE"; then
17649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17650$as_echo "$CHECK_GMAKE" >&6; }
17651else
17652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17653$as_echo "no" >&6; }
17654fi
17655
17656
17657  test -n "$CHECK_GMAKE" && break
17658done
17659
17660
17661  MAKE_CANDIDATE=""$CHECK_GMAKE""
17662  DESCRIPTION="gmake in PATH"
17663
17664  # On Cygwin, we require a newer version of make than on other platforms
17665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17666    MAKE_VERSION_EXPR="-e 4\."
17667    MAKE_REQUIRED_VERSION="4.0"
17668   else
17669    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17670    MAKE_REQUIRED_VERSION="3.81"
17671  fi
17672
17673  if test "x$MAKE_CANDIDATE" != x; then
17674    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17675$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17676    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17677    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17678    if test "x$IS_GNU_MAKE" = x; then
17679      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17680$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17681    else
17682      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17683      if test "x$IS_MODERN_MAKE" = x; then
17684        { $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
17685$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;}
17686      else
17687        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17688          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17689            MAKE_EXPECTED_ENV='cygwin'
17690          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17691            MAKE_EXPECTED_ENV='msys'
17692          else
17693            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17694          fi
17695          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17696          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17697        else
17698          # Not relevant for non-Windows
17699          IS_MAKE_CORRECT_ENV=true
17700        fi
17701        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17702          { $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
17703$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;}
17704        else
17705          FOUND_MAKE=$MAKE_CANDIDATE
17706
17707  # Only process if variable expands to non-empty
17708
17709  if test "x$FOUND_MAKE" != x; then
17710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17711
17712  # First separate the path from the arguments. This will split at the first
17713  # space.
17714  complete="$FOUND_MAKE"
17715  path="${complete%% *}"
17716  tmp="$complete EOL"
17717  arguments="${tmp#* }"
17718
17719  # Input might be given as Windows format, start by converting to
17720  # unix format.
17721  new_path=`$CYGPATH -u "$path"`
17722
17723  # Now try to locate executable using which
17724  new_path=`$WHICH "$new_path" 2> /dev/null`
17725  # bat and cmd files are not always considered executable in cygwin causing which
17726  # to not find them
17727  if test "x$new_path" = x \
17728      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17729      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17730    new_path=`$CYGPATH -u "$path"`
17731  fi
17732  if test "x$new_path" = x; then
17733    # Oops. Which didn't find the executable.
17734    # The splitting of arguments from the executable at a space might have been incorrect,
17735    # since paths with space are more likely in Windows. Give it another try with the whole
17736    # argument.
17737    path="$complete"
17738    arguments="EOL"
17739    new_path=`$CYGPATH -u "$path"`
17740    new_path=`$WHICH "$new_path" 2> /dev/null`
17741    # bat and cmd files are not always considered executable in cygwin causing which
17742    # to not find them
17743    if test "x$new_path" = x \
17744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17746      new_path=`$CYGPATH -u "$path"`
17747    fi
17748    if test "x$new_path" = x; then
17749      # It's still not found. Now this is an unrecoverable error.
17750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17752      has_space=`$ECHO "$complete" | $GREP " "`
17753      if test "x$has_space" != x; then
17754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17756      fi
17757      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17758    fi
17759  fi
17760
17761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17764  # "foo.exe" is OK but "foo" is an error.
17765  #
17766  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17767  # It is also a way to make sure we got the proper file name for the real test later on.
17768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17769  if test "x$test_shortpath" = x; then
17770    # Short path failed, file does not exist as specified.
17771    # Try adding .exe or .cmd
17772    if test -f "${new_path}.exe"; then
17773      input_to_shortpath="${new_path}.exe"
17774    elif test -f "${new_path}.cmd"; then
17775      input_to_shortpath="${new_path}.cmd"
17776    else
17777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17778$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17779      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17780$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17781      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17782    fi
17783  else
17784    input_to_shortpath="$new_path"
17785  fi
17786
17787  # Call helper function which possibly converts this using DOS-style short mode.
17788  # If so, the updated path is stored in $new_path.
17789  new_path="$input_to_shortpath"
17790
17791  input_path="$input_to_shortpath"
17792  # Check if we need to convert this using DOS-style short mode. If the path
17793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17794  # take no chances and rewrite it.
17795  # Note: m4 eats our [], so we need to use [ and ] instead.
17796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17797  if test "x$has_forbidden_chars" != x; then
17798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17802      # Going to short mode and back again did indeed matter. Since short mode is
17803      # case insensitive, let's make it lowercase to improve readability.
17804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17805      # Now convert it back to Unix-style (cygpath)
17806      input_path=`$CYGPATH -u "$shortmode_path"`
17807      new_path="$input_path"
17808    fi
17809  fi
17810
17811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17812  if test "x$test_cygdrive_prefix" = x; then
17813    # As a simple fix, exclude /usr/bin since it's not a real path.
17814    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17816      # a path prefixed by /cygdrive for fixpath to work.
17817      new_path="$CYGWIN_ROOT_PATH$input_path"
17818    fi
17819  fi
17820
17821  # remove trailing .exe if any
17822  new_path="${new_path/%.exe/}"
17823
17824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17825
17826  # First separate the path from the arguments. This will split at the first
17827  # space.
17828  complete="$FOUND_MAKE"
17829  path="${complete%% *}"
17830  tmp="$complete EOL"
17831  arguments="${tmp#* }"
17832
17833  # Input might be given as Windows format, start by converting to
17834  # unix format.
17835  new_path="$path"
17836
17837  windows_path="$new_path"
17838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17839    unix_path=`$CYGPATH -u "$windows_path"`
17840    new_path="$unix_path"
17841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17843    new_path="$unix_path"
17844  fi
17845
17846
17847  # Now try to locate executable using which
17848  new_path=`$WHICH "$new_path" 2> /dev/null`
17849
17850  if test "x$new_path" = x; then
17851    # Oops. Which didn't find the executable.
17852    # The splitting of arguments from the executable at a space might have been incorrect,
17853    # since paths with space are more likely in Windows. Give it another try with the whole
17854    # argument.
17855    path="$complete"
17856    arguments="EOL"
17857    new_path="$path"
17858
17859  windows_path="$new_path"
17860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17861    unix_path=`$CYGPATH -u "$windows_path"`
17862    new_path="$unix_path"
17863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17865    new_path="$unix_path"
17866  fi
17867
17868
17869    new_path=`$WHICH "$new_path" 2> /dev/null`
17870    # bat and cmd files are not always considered executable in MSYS causing which
17871    # to not find them
17872    if test "x$new_path" = x \
17873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17875      new_path="$path"
17876
17877  windows_path="$new_path"
17878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17879    unix_path=`$CYGPATH -u "$windows_path"`
17880    new_path="$unix_path"
17881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17883    new_path="$unix_path"
17884  fi
17885
17886    fi
17887
17888    if test "x$new_path" = x; then
17889      # It's still not found. Now this is an unrecoverable error.
17890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17892      has_space=`$ECHO "$complete" | $GREP " "`
17893      if test "x$has_space" != x; then
17894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17896      fi
17897      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17898    fi
17899  fi
17900
17901  # Now new_path has a complete unix path to the binary
17902  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17903    # Keep paths in /bin as-is, but remove trailing .exe if any
17904    new_path="${new_path/%.exe/}"
17905    # Do not save /bin paths to all_fixpath_prefixes!
17906  else
17907    # Not in mixed or Windows style, start by that.
17908    new_path=`cmd //c echo $new_path`
17909
17910  input_path="$new_path"
17911  # Check if we need to convert this using DOS-style short mode. If the path
17912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17913  # take no chances and rewrite it.
17914  # Note: m4 eats our [], so we need to use [ and ] instead.
17915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17916  if test "x$has_forbidden_chars" != x; then
17917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17919  fi
17920
17921    # Output is in $new_path
17922
17923  windows_path="$new_path"
17924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17925    unix_path=`$CYGPATH -u "$windows_path"`
17926    new_path="$unix_path"
17927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17929    new_path="$unix_path"
17930  fi
17931
17932    # remove trailing .exe if any
17933    new_path="${new_path/%.exe/}"
17934
17935    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17936    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17937  fi
17938
17939    else
17940      # We're on a unix platform. Hooray! :)
17941      # First separate the path from the arguments. This will split at the first
17942      # space.
17943      complete="$FOUND_MAKE"
17944      path="${complete%% *}"
17945      tmp="$complete EOL"
17946      arguments="${tmp#* }"
17947
17948      # Cannot rely on the command "which" here since it doesn't always work.
17949      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17950      if test -z "$is_absolute_path"; then
17951        # Path to executable is not absolute. Find it.
17952        IFS_save="$IFS"
17953        IFS=:
17954        for p in $PATH; do
17955          if test -f "$p/$path" && test -x "$p/$path"; then
17956            new_path="$p/$path"
17957            break
17958          fi
17959        done
17960        IFS="$IFS_save"
17961      else
17962        # This is an absolute path, we can use it without further modifications.
17963        new_path="$path"
17964      fi
17965
17966      if test "x$new_path" = x; then
17967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17968$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17969        has_space=`$ECHO "$complete" | $GREP " "`
17970        if test "x$has_space" != x; then
17971          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17973        fi
17974        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17975      fi
17976    fi
17977
17978    # Now join together the path and the arguments once again
17979    if test "x$arguments" != xEOL; then
17980      new_complete="$new_path ${arguments% *}"
17981    else
17982      new_complete="$new_path"
17983    fi
17984
17985    if test "x$complete" != "x$new_complete"; then
17986      FOUND_MAKE="$new_complete"
17987      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17988$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17989    fi
17990  fi
17991
17992        fi
17993      fi
17994    fi
17995  fi
17996
17997
17998    if test "x$FOUND_MAKE" = x; then
17999      for ac_prog in make
18000do
18001  # Extract the first word of "$ac_prog", so it can be a program name with args.
18002set dummy $ac_prog; ac_word=$2
18003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18004$as_echo_n "checking for $ac_word... " >&6; }
18005if ${ac_cv_path_CHECK_MAKE+:} false; then :
18006  $as_echo_n "(cached) " >&6
18007else
18008  case $CHECK_MAKE in
18009  [\\/]* | ?:[\\/]*)
18010  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18011  ;;
18012  *)
18013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18014for as_dir in $PATH
18015do
18016  IFS=$as_save_IFS
18017  test -z "$as_dir" && as_dir=.
18018    for ac_exec_ext in '' $ac_executable_extensions; do
18019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18020    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18022    break 2
18023  fi
18024done
18025  done
18026IFS=$as_save_IFS
18027
18028  ;;
18029esac
18030fi
18031CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18032if test -n "$CHECK_MAKE"; then
18033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18034$as_echo "$CHECK_MAKE" >&6; }
18035else
18036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18037$as_echo "no" >&6; }
18038fi
18039
18040
18041  test -n "$CHECK_MAKE" && break
18042done
18043
18044
18045  MAKE_CANDIDATE=""$CHECK_MAKE""
18046  DESCRIPTION="make in PATH"
18047
18048  # On Cygwin, we require a newer version of make than on other platforms
18049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18050    MAKE_VERSION_EXPR="-e 4\."
18051    MAKE_REQUIRED_VERSION="4.0"
18052   else
18053    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18054    MAKE_REQUIRED_VERSION="3.81"
18055  fi
18056
18057  if test "x$MAKE_CANDIDATE" != x; then
18058    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18059$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18060    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18061    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18062    if test "x$IS_GNU_MAKE" = x; then
18063      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18064$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18065    else
18066      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18067      if test "x$IS_MODERN_MAKE" = x; then
18068        { $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
18069$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;}
18070      else
18071        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18072          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18073            MAKE_EXPECTED_ENV='cygwin'
18074          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18075            MAKE_EXPECTED_ENV='msys'
18076          else
18077            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18078          fi
18079          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18080          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18081        else
18082          # Not relevant for non-Windows
18083          IS_MAKE_CORRECT_ENV=true
18084        fi
18085        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18086          { $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
18087$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;}
18088        else
18089          FOUND_MAKE=$MAKE_CANDIDATE
18090
18091  # Only process if variable expands to non-empty
18092
18093  if test "x$FOUND_MAKE" != x; then
18094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18095
18096  # First separate the path from the arguments. This will split at the first
18097  # space.
18098  complete="$FOUND_MAKE"
18099  path="${complete%% *}"
18100  tmp="$complete EOL"
18101  arguments="${tmp#* }"
18102
18103  # Input might be given as Windows format, start by converting to
18104  # unix format.
18105  new_path=`$CYGPATH -u "$path"`
18106
18107  # Now try to locate executable using which
18108  new_path=`$WHICH "$new_path" 2> /dev/null`
18109  # bat and cmd files are not always considered executable in cygwin causing which
18110  # to not find them
18111  if test "x$new_path" = x \
18112      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18113      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18114    new_path=`$CYGPATH -u "$path"`
18115  fi
18116  if test "x$new_path" = x; then
18117    # Oops. Which didn't find the executable.
18118    # The splitting of arguments from the executable at a space might have been incorrect,
18119    # since paths with space are more likely in Windows. Give it another try with the whole
18120    # argument.
18121    path="$complete"
18122    arguments="EOL"
18123    new_path=`$CYGPATH -u "$path"`
18124    new_path=`$WHICH "$new_path" 2> /dev/null`
18125    # bat and cmd files are not always considered executable in cygwin causing which
18126    # to not find them
18127    if test "x$new_path" = x \
18128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18130      new_path=`$CYGPATH -u "$path"`
18131    fi
18132    if test "x$new_path" = x; then
18133      # It's still not found. Now this is an unrecoverable error.
18134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18135$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18136      has_space=`$ECHO "$complete" | $GREP " "`
18137      if test "x$has_space" != x; then
18138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18140      fi
18141      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18142    fi
18143  fi
18144
18145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18148  # "foo.exe" is OK but "foo" is an error.
18149  #
18150  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18151  # It is also a way to make sure we got the proper file name for the real test later on.
18152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18153  if test "x$test_shortpath" = x; then
18154    # Short path failed, file does not exist as specified.
18155    # Try adding .exe or .cmd
18156    if test -f "${new_path}.exe"; then
18157      input_to_shortpath="${new_path}.exe"
18158    elif test -f "${new_path}.cmd"; then
18159      input_to_shortpath="${new_path}.cmd"
18160    else
18161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18162$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18163      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18164$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18165      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18166    fi
18167  else
18168    input_to_shortpath="$new_path"
18169  fi
18170
18171  # Call helper function which possibly converts this using DOS-style short mode.
18172  # If so, the updated path is stored in $new_path.
18173  new_path="$input_to_shortpath"
18174
18175  input_path="$input_to_shortpath"
18176  # Check if we need to convert this using DOS-style short mode. If the path
18177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18178  # take no chances and rewrite it.
18179  # Note: m4 eats our [], so we need to use [ and ] instead.
18180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18181  if test "x$has_forbidden_chars" != x; then
18182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18186      # Going to short mode and back again did indeed matter. Since short mode is
18187      # case insensitive, let's make it lowercase to improve readability.
18188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18189      # Now convert it back to Unix-style (cygpath)
18190      input_path=`$CYGPATH -u "$shortmode_path"`
18191      new_path="$input_path"
18192    fi
18193  fi
18194
18195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18196  if test "x$test_cygdrive_prefix" = x; then
18197    # As a simple fix, exclude /usr/bin since it's not a real path.
18198    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18200      # a path prefixed by /cygdrive for fixpath to work.
18201      new_path="$CYGWIN_ROOT_PATH$input_path"
18202    fi
18203  fi
18204
18205  # remove trailing .exe if any
18206  new_path="${new_path/%.exe/}"
18207
18208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18209
18210  # First separate the path from the arguments. This will split at the first
18211  # space.
18212  complete="$FOUND_MAKE"
18213  path="${complete%% *}"
18214  tmp="$complete EOL"
18215  arguments="${tmp#* }"
18216
18217  # Input might be given as Windows format, start by converting to
18218  # unix format.
18219  new_path="$path"
18220
18221  windows_path="$new_path"
18222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18223    unix_path=`$CYGPATH -u "$windows_path"`
18224    new_path="$unix_path"
18225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18227    new_path="$unix_path"
18228  fi
18229
18230
18231  # Now try to locate executable using which
18232  new_path=`$WHICH "$new_path" 2> /dev/null`
18233
18234  if test "x$new_path" = x; then
18235    # Oops. Which didn't find the executable.
18236    # The splitting of arguments from the executable at a space might have been incorrect,
18237    # since paths with space are more likely in Windows. Give it another try with the whole
18238    # argument.
18239    path="$complete"
18240    arguments="EOL"
18241    new_path="$path"
18242
18243  windows_path="$new_path"
18244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18245    unix_path=`$CYGPATH -u "$windows_path"`
18246    new_path="$unix_path"
18247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18249    new_path="$unix_path"
18250  fi
18251
18252
18253    new_path=`$WHICH "$new_path" 2> /dev/null`
18254    # bat and cmd files are not always considered executable in MSYS causing which
18255    # to not find them
18256    if test "x$new_path" = x \
18257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18259      new_path="$path"
18260
18261  windows_path="$new_path"
18262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18263    unix_path=`$CYGPATH -u "$windows_path"`
18264    new_path="$unix_path"
18265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18267    new_path="$unix_path"
18268  fi
18269
18270    fi
18271
18272    if test "x$new_path" = x; then
18273      # It's still not found. Now this is an unrecoverable error.
18274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18275$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18276      has_space=`$ECHO "$complete" | $GREP " "`
18277      if test "x$has_space" != x; then
18278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18280      fi
18281      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18282    fi
18283  fi
18284
18285  # Now new_path has a complete unix path to the binary
18286  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18287    # Keep paths in /bin as-is, but remove trailing .exe if any
18288    new_path="${new_path/%.exe/}"
18289    # Do not save /bin paths to all_fixpath_prefixes!
18290  else
18291    # Not in mixed or Windows style, start by that.
18292    new_path=`cmd //c echo $new_path`
18293
18294  input_path="$new_path"
18295  # Check if we need to convert this using DOS-style short mode. If the path
18296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18297  # take no chances and rewrite it.
18298  # Note: m4 eats our [], so we need to use [ and ] instead.
18299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18300  if test "x$has_forbidden_chars" != x; then
18301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18303  fi
18304
18305    # Output is in $new_path
18306
18307  windows_path="$new_path"
18308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18309    unix_path=`$CYGPATH -u "$windows_path"`
18310    new_path="$unix_path"
18311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18313    new_path="$unix_path"
18314  fi
18315
18316    # remove trailing .exe if any
18317    new_path="${new_path/%.exe/}"
18318
18319    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18320    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18321  fi
18322
18323    else
18324      # We're on a unix platform. Hooray! :)
18325      # First separate the path from the arguments. This will split at the first
18326      # space.
18327      complete="$FOUND_MAKE"
18328      path="${complete%% *}"
18329      tmp="$complete EOL"
18330      arguments="${tmp#* }"
18331
18332      # Cannot rely on the command "which" here since it doesn't always work.
18333      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18334      if test -z "$is_absolute_path"; then
18335        # Path to executable is not absolute. Find it.
18336        IFS_save="$IFS"
18337        IFS=:
18338        for p in $PATH; do
18339          if test -f "$p/$path" && test -x "$p/$path"; then
18340            new_path="$p/$path"
18341            break
18342          fi
18343        done
18344        IFS="$IFS_save"
18345      else
18346        # This is an absolute path, we can use it without further modifications.
18347        new_path="$path"
18348      fi
18349
18350      if test "x$new_path" = x; then
18351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18353        has_space=`$ECHO "$complete" | $GREP " "`
18354        if test "x$has_space" != x; then
18355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18357        fi
18358        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18359      fi
18360    fi
18361
18362    # Now join together the path and the arguments once again
18363    if test "x$arguments" != xEOL; then
18364      new_complete="$new_path ${arguments% *}"
18365    else
18366      new_complete="$new_path"
18367    fi
18368
18369    if test "x$complete" != "x$new_complete"; then
18370      FOUND_MAKE="$new_complete"
18371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18372$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18373    fi
18374  fi
18375
18376        fi
18377      fi
18378    fi
18379  fi
18380
18381    fi
18382
18383    if test "x$FOUND_MAKE" = x; then
18384      if test "x$TOOLCHAIN_PATH" != x; then
18385        # We have a toolchain path, check that as well before giving up.
18386        OLD_PATH=$PATH
18387        PATH=$TOOLCHAIN_PATH:$PATH
18388        for ac_prog in gmake
18389do
18390  # Extract the first word of "$ac_prog", so it can be a program name with args.
18391set dummy $ac_prog; ac_word=$2
18392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18393$as_echo_n "checking for $ac_word... " >&6; }
18394if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18395  $as_echo_n "(cached) " >&6
18396else
18397  case $CHECK_TOOLSDIR_GMAKE in
18398  [\\/]* | ?:[\\/]*)
18399  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18400  ;;
18401  *)
18402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18403for as_dir in $PATH
18404do
18405  IFS=$as_save_IFS
18406  test -z "$as_dir" && as_dir=.
18407    for ac_exec_ext in '' $ac_executable_extensions; do
18408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18409    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18411    break 2
18412  fi
18413done
18414  done
18415IFS=$as_save_IFS
18416
18417  ;;
18418esac
18419fi
18420CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18421if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18423$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18424else
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427fi
18428
18429
18430  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18431done
18432
18433
18434  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18435  DESCRIPTION="gmake in tools-dir"
18436
18437  # On Cygwin, we require a newer version of make than on other platforms
18438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18439    MAKE_VERSION_EXPR="-e 4\."
18440    MAKE_REQUIRED_VERSION="4.0"
18441   else
18442    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18443    MAKE_REQUIRED_VERSION="3.81"
18444  fi
18445
18446  if test "x$MAKE_CANDIDATE" != x; then
18447    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18448$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18449    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18450    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18451    if test "x$IS_GNU_MAKE" = x; then
18452      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18453$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18454    else
18455      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18456      if test "x$IS_MODERN_MAKE" = x; then
18457        { $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
18458$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;}
18459      else
18460        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18461          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18462            MAKE_EXPECTED_ENV='cygwin'
18463          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18464            MAKE_EXPECTED_ENV='msys'
18465          else
18466            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18467          fi
18468          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18469          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18470        else
18471          # Not relevant for non-Windows
18472          IS_MAKE_CORRECT_ENV=true
18473        fi
18474        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18475          { $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
18476$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;}
18477        else
18478          FOUND_MAKE=$MAKE_CANDIDATE
18479
18480  # Only process if variable expands to non-empty
18481
18482  if test "x$FOUND_MAKE" != x; then
18483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18484
18485  # First separate the path from the arguments. This will split at the first
18486  # space.
18487  complete="$FOUND_MAKE"
18488  path="${complete%% *}"
18489  tmp="$complete EOL"
18490  arguments="${tmp#* }"
18491
18492  # Input might be given as Windows format, start by converting to
18493  # unix format.
18494  new_path=`$CYGPATH -u "$path"`
18495
18496  # Now try to locate executable using which
18497  new_path=`$WHICH "$new_path" 2> /dev/null`
18498  # bat and cmd files are not always considered executable in cygwin causing which
18499  # to not find them
18500  if test "x$new_path" = x \
18501      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18502      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18503    new_path=`$CYGPATH -u "$path"`
18504  fi
18505  if test "x$new_path" = x; then
18506    # Oops. Which didn't find the executable.
18507    # The splitting of arguments from the executable at a space might have been incorrect,
18508    # since paths with space are more likely in Windows. Give it another try with the whole
18509    # argument.
18510    path="$complete"
18511    arguments="EOL"
18512    new_path=`$CYGPATH -u "$path"`
18513    new_path=`$WHICH "$new_path" 2> /dev/null`
18514    # bat and cmd files are not always considered executable in cygwin causing which
18515    # to not find them
18516    if test "x$new_path" = x \
18517        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18518        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18519      new_path=`$CYGPATH -u "$path"`
18520    fi
18521    if test "x$new_path" = x; then
18522      # It's still not found. Now this is an unrecoverable error.
18523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18524$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18525      has_space=`$ECHO "$complete" | $GREP " "`
18526      if test "x$has_space" != x; then
18527        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18528$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18529      fi
18530      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18531    fi
18532  fi
18533
18534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18537  # "foo.exe" is OK but "foo" is an error.
18538  #
18539  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18540  # It is also a way to make sure we got the proper file name for the real test later on.
18541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18542  if test "x$test_shortpath" = x; then
18543    # Short path failed, file does not exist as specified.
18544    # Try adding .exe or .cmd
18545    if test -f "${new_path}.exe"; then
18546      input_to_shortpath="${new_path}.exe"
18547    elif test -f "${new_path}.cmd"; then
18548      input_to_shortpath="${new_path}.cmd"
18549    else
18550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18552      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18553$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18554      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18555    fi
18556  else
18557    input_to_shortpath="$new_path"
18558  fi
18559
18560  # Call helper function which possibly converts this using DOS-style short mode.
18561  # If so, the updated path is stored in $new_path.
18562  new_path="$input_to_shortpath"
18563
18564  input_path="$input_to_shortpath"
18565  # Check if we need to convert this using DOS-style short mode. If the path
18566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18567  # take no chances and rewrite it.
18568  # Note: m4 eats our [], so we need to use [ and ] instead.
18569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18570  if test "x$has_forbidden_chars" != x; then
18571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18575      # Going to short mode and back again did indeed matter. Since short mode is
18576      # case insensitive, let's make it lowercase to improve readability.
18577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18578      # Now convert it back to Unix-style (cygpath)
18579      input_path=`$CYGPATH -u "$shortmode_path"`
18580      new_path="$input_path"
18581    fi
18582  fi
18583
18584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18585  if test "x$test_cygdrive_prefix" = x; then
18586    # As a simple fix, exclude /usr/bin since it's not a real path.
18587    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18589      # a path prefixed by /cygdrive for fixpath to work.
18590      new_path="$CYGWIN_ROOT_PATH$input_path"
18591    fi
18592  fi
18593
18594  # remove trailing .exe if any
18595  new_path="${new_path/%.exe/}"
18596
18597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18598
18599  # First separate the path from the arguments. This will split at the first
18600  # space.
18601  complete="$FOUND_MAKE"
18602  path="${complete%% *}"
18603  tmp="$complete EOL"
18604  arguments="${tmp#* }"
18605
18606  # Input might be given as Windows format, start by converting to
18607  # unix format.
18608  new_path="$path"
18609
18610  windows_path="$new_path"
18611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18612    unix_path=`$CYGPATH -u "$windows_path"`
18613    new_path="$unix_path"
18614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18616    new_path="$unix_path"
18617  fi
18618
18619
18620  # Now try to locate executable using which
18621  new_path=`$WHICH "$new_path" 2> /dev/null`
18622
18623  if test "x$new_path" = x; then
18624    # Oops. Which didn't find the executable.
18625    # The splitting of arguments from the executable at a space might have been incorrect,
18626    # since paths with space are more likely in Windows. Give it another try with the whole
18627    # argument.
18628    path="$complete"
18629    arguments="EOL"
18630    new_path="$path"
18631
18632  windows_path="$new_path"
18633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634    unix_path=`$CYGPATH -u "$windows_path"`
18635    new_path="$unix_path"
18636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18638    new_path="$unix_path"
18639  fi
18640
18641
18642    new_path=`$WHICH "$new_path" 2> /dev/null`
18643    # bat and cmd files are not always considered executable in MSYS causing which
18644    # to not find them
18645    if test "x$new_path" = x \
18646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18648      new_path="$path"
18649
18650  windows_path="$new_path"
18651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18652    unix_path=`$CYGPATH -u "$windows_path"`
18653    new_path="$unix_path"
18654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18656    new_path="$unix_path"
18657  fi
18658
18659    fi
18660
18661    if test "x$new_path" = x; then
18662      # It's still not found. Now this is an unrecoverable error.
18663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18665      has_space=`$ECHO "$complete" | $GREP " "`
18666      if test "x$has_space" != x; then
18667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18669      fi
18670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18671    fi
18672  fi
18673
18674  # Now new_path has a complete unix path to the binary
18675  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18676    # Keep paths in /bin as-is, but remove trailing .exe if any
18677    new_path="${new_path/%.exe/}"
18678    # Do not save /bin paths to all_fixpath_prefixes!
18679  else
18680    # Not in mixed or Windows style, start by that.
18681    new_path=`cmd //c echo $new_path`
18682
18683  input_path="$new_path"
18684  # Check if we need to convert this using DOS-style short mode. If the path
18685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18686  # take no chances and rewrite it.
18687  # Note: m4 eats our [], so we need to use [ and ] instead.
18688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18689  if test "x$has_forbidden_chars" != x; then
18690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18692  fi
18693
18694    # Output is in $new_path
18695
18696  windows_path="$new_path"
18697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18698    unix_path=`$CYGPATH -u "$windows_path"`
18699    new_path="$unix_path"
18700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18702    new_path="$unix_path"
18703  fi
18704
18705    # remove trailing .exe if any
18706    new_path="${new_path/%.exe/}"
18707
18708    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18709    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18710  fi
18711
18712    else
18713      # We're on a unix platform. Hooray! :)
18714      # First separate the path from the arguments. This will split at the first
18715      # space.
18716      complete="$FOUND_MAKE"
18717      path="${complete%% *}"
18718      tmp="$complete EOL"
18719      arguments="${tmp#* }"
18720
18721      # Cannot rely on the command "which" here since it doesn't always work.
18722      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18723      if test -z "$is_absolute_path"; then
18724        # Path to executable is not absolute. Find it.
18725        IFS_save="$IFS"
18726        IFS=:
18727        for p in $PATH; do
18728          if test -f "$p/$path" && test -x "$p/$path"; then
18729            new_path="$p/$path"
18730            break
18731          fi
18732        done
18733        IFS="$IFS_save"
18734      else
18735        # This is an absolute path, we can use it without further modifications.
18736        new_path="$path"
18737      fi
18738
18739      if test "x$new_path" = x; then
18740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18741$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18742        has_space=`$ECHO "$complete" | $GREP " "`
18743        if test "x$has_space" != x; then
18744          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18745$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18746        fi
18747        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18748      fi
18749    fi
18750
18751    # Now join together the path and the arguments once again
18752    if test "x$arguments" != xEOL; then
18753      new_complete="$new_path ${arguments% *}"
18754    else
18755      new_complete="$new_path"
18756    fi
18757
18758    if test "x$complete" != "x$new_complete"; then
18759      FOUND_MAKE="$new_complete"
18760      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18761$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18762    fi
18763  fi
18764
18765        fi
18766      fi
18767    fi
18768  fi
18769
18770        if test "x$FOUND_MAKE" = x; then
18771          for ac_prog in make
18772do
18773  # Extract the first word of "$ac_prog", so it can be a program name with args.
18774set dummy $ac_prog; ac_word=$2
18775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18776$as_echo_n "checking for $ac_word... " >&6; }
18777if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18778  $as_echo_n "(cached) " >&6
18779else
18780  case $CHECK_TOOLSDIR_MAKE in
18781  [\\/]* | ?:[\\/]*)
18782  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18783  ;;
18784  *)
18785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18786for as_dir in $PATH
18787do
18788  IFS=$as_save_IFS
18789  test -z "$as_dir" && as_dir=.
18790    for ac_exec_ext in '' $ac_executable_extensions; do
18791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18792    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18794    break 2
18795  fi
18796done
18797  done
18798IFS=$as_save_IFS
18799
18800  ;;
18801esac
18802fi
18803CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18804if test -n "$CHECK_TOOLSDIR_MAKE"; then
18805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18806$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18807else
18808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18809$as_echo "no" >&6; }
18810fi
18811
18812
18813  test -n "$CHECK_TOOLSDIR_MAKE" && break
18814done
18815
18816
18817  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18818  DESCRIPTION="make in tools-dir"
18819
18820  # On Cygwin, we require a newer version of make than on other platforms
18821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18822    MAKE_VERSION_EXPR="-e 4\."
18823    MAKE_REQUIRED_VERSION="4.0"
18824   else
18825    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18826    MAKE_REQUIRED_VERSION="3.81"
18827  fi
18828
18829  if test "x$MAKE_CANDIDATE" != x; then
18830    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18831$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18832    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18833    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18834    if test "x$IS_GNU_MAKE" = x; then
18835      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18836$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18837    else
18838      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18839      if test "x$IS_MODERN_MAKE" = x; then
18840        { $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
18841$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;}
18842      else
18843        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18844          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18845            MAKE_EXPECTED_ENV='cygwin'
18846          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18847            MAKE_EXPECTED_ENV='msys'
18848          else
18849            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18850          fi
18851          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18852          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18853        else
18854          # Not relevant for non-Windows
18855          IS_MAKE_CORRECT_ENV=true
18856        fi
18857        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18858          { $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
18859$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;}
18860        else
18861          FOUND_MAKE=$MAKE_CANDIDATE
18862
18863  # Only process if variable expands to non-empty
18864
18865  if test "x$FOUND_MAKE" != x; then
18866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18867
18868  # First separate the path from the arguments. This will split at the first
18869  # space.
18870  complete="$FOUND_MAKE"
18871  path="${complete%% *}"
18872  tmp="$complete EOL"
18873  arguments="${tmp#* }"
18874
18875  # Input might be given as Windows format, start by converting to
18876  # unix format.
18877  new_path=`$CYGPATH -u "$path"`
18878
18879  # Now try to locate executable using which
18880  new_path=`$WHICH "$new_path" 2> /dev/null`
18881  # bat and cmd files are not always considered executable in cygwin causing which
18882  # to not find them
18883  if test "x$new_path" = x \
18884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18886    new_path=`$CYGPATH -u "$path"`
18887  fi
18888  if test "x$new_path" = x; then
18889    # Oops. Which didn't find the executable.
18890    # The splitting of arguments from the executable at a space might have been incorrect,
18891    # since paths with space are more likely in Windows. Give it another try with the whole
18892    # argument.
18893    path="$complete"
18894    arguments="EOL"
18895    new_path=`$CYGPATH -u "$path"`
18896    new_path=`$WHICH "$new_path" 2> /dev/null`
18897    # bat and cmd files are not always considered executable in cygwin causing which
18898    # to not find them
18899    if test "x$new_path" = x \
18900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18902      new_path=`$CYGPATH -u "$path"`
18903    fi
18904    if test "x$new_path" = x; then
18905      # It's still not found. Now this is an unrecoverable error.
18906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18907$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18908      has_space=`$ECHO "$complete" | $GREP " "`
18909      if test "x$has_space" != x; then
18910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18912      fi
18913      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18914    fi
18915  fi
18916
18917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18920  # "foo.exe" is OK but "foo" is an error.
18921  #
18922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18923  # It is also a way to make sure we got the proper file name for the real test later on.
18924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18925  if test "x$test_shortpath" = x; then
18926    # Short path failed, file does not exist as specified.
18927    # Try adding .exe or .cmd
18928    if test -f "${new_path}.exe"; then
18929      input_to_shortpath="${new_path}.exe"
18930    elif test -f "${new_path}.cmd"; then
18931      input_to_shortpath="${new_path}.cmd"
18932    else
18933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18937      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18938    fi
18939  else
18940    input_to_shortpath="$new_path"
18941  fi
18942
18943  # Call helper function which possibly converts this using DOS-style short mode.
18944  # If so, the updated path is stored in $new_path.
18945  new_path="$input_to_shortpath"
18946
18947  input_path="$input_to_shortpath"
18948  # Check if we need to convert this using DOS-style short mode. If the path
18949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18950  # take no chances and rewrite it.
18951  # Note: m4 eats our [], so we need to use [ and ] instead.
18952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18953  if test "x$has_forbidden_chars" != x; then
18954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18958      # Going to short mode and back again did indeed matter. Since short mode is
18959      # case insensitive, let's make it lowercase to improve readability.
18960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18961      # Now convert it back to Unix-style (cygpath)
18962      input_path=`$CYGPATH -u "$shortmode_path"`
18963      new_path="$input_path"
18964    fi
18965  fi
18966
18967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18968  if test "x$test_cygdrive_prefix" = x; then
18969    # As a simple fix, exclude /usr/bin since it's not a real path.
18970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18972      # a path prefixed by /cygdrive for fixpath to work.
18973      new_path="$CYGWIN_ROOT_PATH$input_path"
18974    fi
18975  fi
18976
18977  # remove trailing .exe if any
18978  new_path="${new_path/%.exe/}"
18979
18980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18981
18982  # First separate the path from the arguments. This will split at the first
18983  # space.
18984  complete="$FOUND_MAKE"
18985  path="${complete%% *}"
18986  tmp="$complete EOL"
18987  arguments="${tmp#* }"
18988
18989  # Input might be given as Windows format, start by converting to
18990  # unix format.
18991  new_path="$path"
18992
18993  windows_path="$new_path"
18994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18995    unix_path=`$CYGPATH -u "$windows_path"`
18996    new_path="$unix_path"
18997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18999    new_path="$unix_path"
19000  fi
19001
19002
19003  # Now try to locate executable using which
19004  new_path=`$WHICH "$new_path" 2> /dev/null`
19005
19006  if test "x$new_path" = x; then
19007    # Oops. Which didn't find the executable.
19008    # The splitting of arguments from the executable at a space might have been incorrect,
19009    # since paths with space are more likely in Windows. Give it another try with the whole
19010    # argument.
19011    path="$complete"
19012    arguments="EOL"
19013    new_path="$path"
19014
19015  windows_path="$new_path"
19016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19017    unix_path=`$CYGPATH -u "$windows_path"`
19018    new_path="$unix_path"
19019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19021    new_path="$unix_path"
19022  fi
19023
19024
19025    new_path=`$WHICH "$new_path" 2> /dev/null`
19026    # bat and cmd files are not always considered executable in MSYS causing which
19027    # to not find them
19028    if test "x$new_path" = x \
19029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19031      new_path="$path"
19032
19033  windows_path="$new_path"
19034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19035    unix_path=`$CYGPATH -u "$windows_path"`
19036    new_path="$unix_path"
19037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19039    new_path="$unix_path"
19040  fi
19041
19042    fi
19043
19044    if test "x$new_path" = x; then
19045      # It's still not found. Now this is an unrecoverable error.
19046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19048      has_space=`$ECHO "$complete" | $GREP " "`
19049      if test "x$has_space" != x; then
19050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19052      fi
19053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19054    fi
19055  fi
19056
19057  # Now new_path has a complete unix path to the binary
19058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19059    # Keep paths in /bin as-is, but remove trailing .exe if any
19060    new_path="${new_path/%.exe/}"
19061    # Do not save /bin paths to all_fixpath_prefixes!
19062  else
19063    # Not in mixed or Windows style, start by that.
19064    new_path=`cmd //c echo $new_path`
19065
19066  input_path="$new_path"
19067  # Check if we need to convert this using DOS-style short mode. If the path
19068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19069  # take no chances and rewrite it.
19070  # Note: m4 eats our [], so we need to use [ and ] instead.
19071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19072  if test "x$has_forbidden_chars" != x; then
19073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19075  fi
19076
19077    # Output is in $new_path
19078
19079  windows_path="$new_path"
19080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19081    unix_path=`$CYGPATH -u "$windows_path"`
19082    new_path="$unix_path"
19083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19085    new_path="$unix_path"
19086  fi
19087
19088    # remove trailing .exe if any
19089    new_path="${new_path/%.exe/}"
19090
19091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19093  fi
19094
19095    else
19096      # We're on a unix platform. Hooray! :)
19097      # First separate the path from the arguments. This will split at the first
19098      # space.
19099      complete="$FOUND_MAKE"
19100      path="${complete%% *}"
19101      tmp="$complete EOL"
19102      arguments="${tmp#* }"
19103
19104      # Cannot rely on the command "which" here since it doesn't always work.
19105      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19106      if test -z "$is_absolute_path"; then
19107        # Path to executable is not absolute. Find it.
19108        IFS_save="$IFS"
19109        IFS=:
19110        for p in $PATH; do
19111          if test -f "$p/$path" && test -x "$p/$path"; then
19112            new_path="$p/$path"
19113            break
19114          fi
19115        done
19116        IFS="$IFS_save"
19117      else
19118        # This is an absolute path, we can use it without further modifications.
19119        new_path="$path"
19120      fi
19121
19122      if test "x$new_path" = x; then
19123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19124$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19125        has_space=`$ECHO "$complete" | $GREP " "`
19126        if test "x$has_space" != x; then
19127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19129        fi
19130        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19131      fi
19132    fi
19133
19134    # Now join together the path and the arguments once again
19135    if test "x$arguments" != xEOL; then
19136      new_complete="$new_path ${arguments% *}"
19137    else
19138      new_complete="$new_path"
19139    fi
19140
19141    if test "x$complete" != "x$new_complete"; then
19142      FOUND_MAKE="$new_complete"
19143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19144$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19145    fi
19146  fi
19147
19148        fi
19149      fi
19150    fi
19151  fi
19152
19153        fi
19154        PATH=$OLD_PATH
19155      fi
19156    fi
19157
19158    if test "x$FOUND_MAKE" = x; then
19159      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
19160    fi
19161
19162  else
19163    # The variable is set, but is it from the command line or the environment?
19164
19165    # Try to remove the string !MAKE! from our list.
19166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19168      # If it failed, the variable was not from the command line. Ignore it,
19169      # but warn the user (except for BASH, which is always set by the calling BASH).
19170      if test "xMAKE" != xBASH; then
19171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19172$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19173      fi
19174      # Try to locate tool using the code snippet
19175
19176    # Try our hardest to locate a correct version of GNU make
19177    for ac_prog in gmake
19178do
19179  # Extract the first word of "$ac_prog", so it can be a program name with args.
19180set dummy $ac_prog; ac_word=$2
19181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19182$as_echo_n "checking for $ac_word... " >&6; }
19183if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19184  $as_echo_n "(cached) " >&6
19185else
19186  case $CHECK_GMAKE in
19187  [\\/]* | ?:[\\/]*)
19188  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19189  ;;
19190  *)
19191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19192for as_dir in $PATH
19193do
19194  IFS=$as_save_IFS
19195  test -z "$as_dir" && as_dir=.
19196    for ac_exec_ext in '' $ac_executable_extensions; do
19197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19198    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19200    break 2
19201  fi
19202done
19203  done
19204IFS=$as_save_IFS
19205
19206  ;;
19207esac
19208fi
19209CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19210if test -n "$CHECK_GMAKE"; then
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19212$as_echo "$CHECK_GMAKE" >&6; }
19213else
19214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19215$as_echo "no" >&6; }
19216fi
19217
19218
19219  test -n "$CHECK_GMAKE" && break
19220done
19221
19222
19223  MAKE_CANDIDATE=""$CHECK_GMAKE""
19224  DESCRIPTION="gmake in PATH"
19225
19226  # On Cygwin, we require a newer version of make than on other platforms
19227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19228    MAKE_VERSION_EXPR="-e 4\."
19229    MAKE_REQUIRED_VERSION="4.0"
19230   else
19231    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19232    MAKE_REQUIRED_VERSION="3.81"
19233  fi
19234
19235  if test "x$MAKE_CANDIDATE" != x; then
19236    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19237$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19238    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19239    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19240    if test "x$IS_GNU_MAKE" = x; then
19241      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19242$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19243    else
19244      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19245      if test "x$IS_MODERN_MAKE" = x; then
19246        { $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
19247$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;}
19248      else
19249        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19250          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19251            MAKE_EXPECTED_ENV='cygwin'
19252          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19253            MAKE_EXPECTED_ENV='msys'
19254          else
19255            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19256          fi
19257          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19258          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19259        else
19260          # Not relevant for non-Windows
19261          IS_MAKE_CORRECT_ENV=true
19262        fi
19263        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19264          { $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
19265$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;}
19266        else
19267          FOUND_MAKE=$MAKE_CANDIDATE
19268
19269  # Only process if variable expands to non-empty
19270
19271  if test "x$FOUND_MAKE" != x; then
19272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273
19274  # First separate the path from the arguments. This will split at the first
19275  # space.
19276  complete="$FOUND_MAKE"
19277  path="${complete%% *}"
19278  tmp="$complete EOL"
19279  arguments="${tmp#* }"
19280
19281  # Input might be given as Windows format, start by converting to
19282  # unix format.
19283  new_path=`$CYGPATH -u "$path"`
19284
19285  # Now try to locate executable using which
19286  new_path=`$WHICH "$new_path" 2> /dev/null`
19287  # bat and cmd files are not always considered executable in cygwin causing which
19288  # to not find them
19289  if test "x$new_path" = x \
19290      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19291      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19292    new_path=`$CYGPATH -u "$path"`
19293  fi
19294  if test "x$new_path" = x; then
19295    # Oops. Which didn't find the executable.
19296    # The splitting of arguments from the executable at a space might have been incorrect,
19297    # since paths with space are more likely in Windows. Give it another try with the whole
19298    # argument.
19299    path="$complete"
19300    arguments="EOL"
19301    new_path=`$CYGPATH -u "$path"`
19302    new_path=`$WHICH "$new_path" 2> /dev/null`
19303    # bat and cmd files are not always considered executable in cygwin causing which
19304    # to not find them
19305    if test "x$new_path" = x \
19306        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19307        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19308      new_path=`$CYGPATH -u "$path"`
19309    fi
19310    if test "x$new_path" = x; then
19311      # It's still not found. Now this is an unrecoverable error.
19312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19313$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19314      has_space=`$ECHO "$complete" | $GREP " "`
19315      if test "x$has_space" != x; then
19316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19318      fi
19319      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19320    fi
19321  fi
19322
19323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19326  # "foo.exe" is OK but "foo" is an error.
19327  #
19328  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19329  # It is also a way to make sure we got the proper file name for the real test later on.
19330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19331  if test "x$test_shortpath" = x; then
19332    # Short path failed, file does not exist as specified.
19333    # Try adding .exe or .cmd
19334    if test -f "${new_path}.exe"; then
19335      input_to_shortpath="${new_path}.exe"
19336    elif test -f "${new_path}.cmd"; then
19337      input_to_shortpath="${new_path}.cmd"
19338    else
19339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19341      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19342$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19343      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19344    fi
19345  else
19346    input_to_shortpath="$new_path"
19347  fi
19348
19349  # Call helper function which possibly converts this using DOS-style short mode.
19350  # If so, the updated path is stored in $new_path.
19351  new_path="$input_to_shortpath"
19352
19353  input_path="$input_to_shortpath"
19354  # Check if we need to convert this using DOS-style short mode. If the path
19355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19356  # take no chances and rewrite it.
19357  # Note: m4 eats our [], so we need to use [ and ] instead.
19358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19359  if test "x$has_forbidden_chars" != x; then
19360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19364      # Going to short mode and back again did indeed matter. Since short mode is
19365      # case insensitive, let's make it lowercase to improve readability.
19366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19367      # Now convert it back to Unix-style (cygpath)
19368      input_path=`$CYGPATH -u "$shortmode_path"`
19369      new_path="$input_path"
19370    fi
19371  fi
19372
19373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19374  if test "x$test_cygdrive_prefix" = x; then
19375    # As a simple fix, exclude /usr/bin since it's not a real path.
19376    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19378      # a path prefixed by /cygdrive for fixpath to work.
19379      new_path="$CYGWIN_ROOT_PATH$input_path"
19380    fi
19381  fi
19382
19383  # remove trailing .exe if any
19384  new_path="${new_path/%.exe/}"
19385
19386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19387
19388  # First separate the path from the arguments. This will split at the first
19389  # space.
19390  complete="$FOUND_MAKE"
19391  path="${complete%% *}"
19392  tmp="$complete EOL"
19393  arguments="${tmp#* }"
19394
19395  # Input might be given as Windows format, start by converting to
19396  # unix format.
19397  new_path="$path"
19398
19399  windows_path="$new_path"
19400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19401    unix_path=`$CYGPATH -u "$windows_path"`
19402    new_path="$unix_path"
19403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19405    new_path="$unix_path"
19406  fi
19407
19408
19409  # Now try to locate executable using which
19410  new_path=`$WHICH "$new_path" 2> /dev/null`
19411
19412  if test "x$new_path" = x; then
19413    # Oops. Which didn't find the executable.
19414    # The splitting of arguments from the executable at a space might have been incorrect,
19415    # since paths with space are more likely in Windows. Give it another try with the whole
19416    # argument.
19417    path="$complete"
19418    arguments="EOL"
19419    new_path="$path"
19420
19421  windows_path="$new_path"
19422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19423    unix_path=`$CYGPATH -u "$windows_path"`
19424    new_path="$unix_path"
19425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19427    new_path="$unix_path"
19428  fi
19429
19430
19431    new_path=`$WHICH "$new_path" 2> /dev/null`
19432    # bat and cmd files are not always considered executable in MSYS causing which
19433    # to not find them
19434    if test "x$new_path" = x \
19435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19437      new_path="$path"
19438
19439  windows_path="$new_path"
19440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19441    unix_path=`$CYGPATH -u "$windows_path"`
19442    new_path="$unix_path"
19443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19445    new_path="$unix_path"
19446  fi
19447
19448    fi
19449
19450    if test "x$new_path" = x; then
19451      # It's still not found. Now this is an unrecoverable error.
19452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19453$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19454      has_space=`$ECHO "$complete" | $GREP " "`
19455      if test "x$has_space" != x; then
19456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19458      fi
19459      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19460    fi
19461  fi
19462
19463  # Now new_path has a complete unix path to the binary
19464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19465    # Keep paths in /bin as-is, but remove trailing .exe if any
19466    new_path="${new_path/%.exe/}"
19467    # Do not save /bin paths to all_fixpath_prefixes!
19468  else
19469    # Not in mixed or Windows style, start by that.
19470    new_path=`cmd //c echo $new_path`
19471
19472  input_path="$new_path"
19473  # Check if we need to convert this using DOS-style short mode. If the path
19474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19475  # take no chances and rewrite it.
19476  # Note: m4 eats our [], so we need to use [ and ] instead.
19477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19478  if test "x$has_forbidden_chars" != x; then
19479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19481  fi
19482
19483    # Output is in $new_path
19484
19485  windows_path="$new_path"
19486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19487    unix_path=`$CYGPATH -u "$windows_path"`
19488    new_path="$unix_path"
19489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19491    new_path="$unix_path"
19492  fi
19493
19494    # remove trailing .exe if any
19495    new_path="${new_path/%.exe/}"
19496
19497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19499  fi
19500
19501    else
19502      # We're on a unix platform. Hooray! :)
19503      # First separate the path from the arguments. This will split at the first
19504      # space.
19505      complete="$FOUND_MAKE"
19506      path="${complete%% *}"
19507      tmp="$complete EOL"
19508      arguments="${tmp#* }"
19509
19510      # Cannot rely on the command "which" here since it doesn't always work.
19511      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19512      if test -z "$is_absolute_path"; then
19513        # Path to executable is not absolute. Find it.
19514        IFS_save="$IFS"
19515        IFS=:
19516        for p in $PATH; do
19517          if test -f "$p/$path" && test -x "$p/$path"; then
19518            new_path="$p/$path"
19519            break
19520          fi
19521        done
19522        IFS="$IFS_save"
19523      else
19524        # This is an absolute path, we can use it without further modifications.
19525        new_path="$path"
19526      fi
19527
19528      if test "x$new_path" = x; then
19529        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19530$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19531        has_space=`$ECHO "$complete" | $GREP " "`
19532        if test "x$has_space" != x; then
19533          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19535        fi
19536        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19537      fi
19538    fi
19539
19540    # Now join together the path and the arguments once again
19541    if test "x$arguments" != xEOL; then
19542      new_complete="$new_path ${arguments% *}"
19543    else
19544      new_complete="$new_path"
19545    fi
19546
19547    if test "x$complete" != "x$new_complete"; then
19548      FOUND_MAKE="$new_complete"
19549      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19550$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19551    fi
19552  fi
19553
19554        fi
19555      fi
19556    fi
19557  fi
19558
19559
19560    if test "x$FOUND_MAKE" = x; then
19561      for ac_prog in make
19562do
19563  # Extract the first word of "$ac_prog", so it can be a program name with args.
19564set dummy $ac_prog; ac_word=$2
19565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19566$as_echo_n "checking for $ac_word... " >&6; }
19567if ${ac_cv_path_CHECK_MAKE+:} false; then :
19568  $as_echo_n "(cached) " >&6
19569else
19570  case $CHECK_MAKE in
19571  [\\/]* | ?:[\\/]*)
19572  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19573  ;;
19574  *)
19575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19576for as_dir in $PATH
19577do
19578  IFS=$as_save_IFS
19579  test -z "$as_dir" && as_dir=.
19580    for ac_exec_ext in '' $ac_executable_extensions; do
19581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19582    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19584    break 2
19585  fi
19586done
19587  done
19588IFS=$as_save_IFS
19589
19590  ;;
19591esac
19592fi
19593CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19594if test -n "$CHECK_MAKE"; then
19595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19596$as_echo "$CHECK_MAKE" >&6; }
19597else
19598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19599$as_echo "no" >&6; }
19600fi
19601
19602
19603  test -n "$CHECK_MAKE" && break
19604done
19605
19606
19607  MAKE_CANDIDATE=""$CHECK_MAKE""
19608  DESCRIPTION="make in PATH"
19609
19610  # On Cygwin, we require a newer version of make than on other platforms
19611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19612    MAKE_VERSION_EXPR="-e 4\."
19613    MAKE_REQUIRED_VERSION="4.0"
19614   else
19615    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19616    MAKE_REQUIRED_VERSION="3.81"
19617  fi
19618
19619  if test "x$MAKE_CANDIDATE" != x; then
19620    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19621$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19622    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19623    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19624    if test "x$IS_GNU_MAKE" = x; then
19625      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19626$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19627    else
19628      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19629      if test "x$IS_MODERN_MAKE" = x; then
19630        { $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
19631$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;}
19632      else
19633        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19634          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19635            MAKE_EXPECTED_ENV='cygwin'
19636          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19637            MAKE_EXPECTED_ENV='msys'
19638          else
19639            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19640          fi
19641          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19642          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19643        else
19644          # Not relevant for non-Windows
19645          IS_MAKE_CORRECT_ENV=true
19646        fi
19647        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19648          { $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
19649$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;}
19650        else
19651          FOUND_MAKE=$MAKE_CANDIDATE
19652
19653  # Only process if variable expands to non-empty
19654
19655  if test "x$FOUND_MAKE" != x; then
19656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19657
19658  # First separate the path from the arguments. This will split at the first
19659  # space.
19660  complete="$FOUND_MAKE"
19661  path="${complete%% *}"
19662  tmp="$complete EOL"
19663  arguments="${tmp#* }"
19664
19665  # Input might be given as Windows format, start by converting to
19666  # unix format.
19667  new_path=`$CYGPATH -u "$path"`
19668
19669  # Now try to locate executable using which
19670  new_path=`$WHICH "$new_path" 2> /dev/null`
19671  # bat and cmd files are not always considered executable in cygwin causing which
19672  # to not find them
19673  if test "x$new_path" = x \
19674      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19675      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19676    new_path=`$CYGPATH -u "$path"`
19677  fi
19678  if test "x$new_path" = x; then
19679    # Oops. Which didn't find the executable.
19680    # The splitting of arguments from the executable at a space might have been incorrect,
19681    # since paths with space are more likely in Windows. Give it another try with the whole
19682    # argument.
19683    path="$complete"
19684    arguments="EOL"
19685    new_path=`$CYGPATH -u "$path"`
19686    new_path=`$WHICH "$new_path" 2> /dev/null`
19687    # bat and cmd files are not always considered executable in cygwin causing which
19688    # to not find them
19689    if test "x$new_path" = x \
19690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19692      new_path=`$CYGPATH -u "$path"`
19693    fi
19694    if test "x$new_path" = x; then
19695      # It's still not found. Now this is an unrecoverable error.
19696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19698      has_space=`$ECHO "$complete" | $GREP " "`
19699      if test "x$has_space" != x; then
19700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19702      fi
19703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19704    fi
19705  fi
19706
19707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19710  # "foo.exe" is OK but "foo" is an error.
19711  #
19712  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19713  # It is also a way to make sure we got the proper file name for the real test later on.
19714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19715  if test "x$test_shortpath" = x; then
19716    # Short path failed, file does not exist as specified.
19717    # Try adding .exe or .cmd
19718    if test -f "${new_path}.exe"; then
19719      input_to_shortpath="${new_path}.exe"
19720    elif test -f "${new_path}.cmd"; then
19721      input_to_shortpath="${new_path}.cmd"
19722    else
19723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19727      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19728    fi
19729  else
19730    input_to_shortpath="$new_path"
19731  fi
19732
19733  # Call helper function which possibly converts this using DOS-style short mode.
19734  # If so, the updated path is stored in $new_path.
19735  new_path="$input_to_shortpath"
19736
19737  input_path="$input_to_shortpath"
19738  # Check if we need to convert this using DOS-style short mode. If the path
19739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19740  # take no chances and rewrite it.
19741  # Note: m4 eats our [], so we need to use [ and ] instead.
19742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19743  if test "x$has_forbidden_chars" != x; then
19744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19748      # Going to short mode and back again did indeed matter. Since short mode is
19749      # case insensitive, let's make it lowercase to improve readability.
19750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19751      # Now convert it back to Unix-style (cygpath)
19752      input_path=`$CYGPATH -u "$shortmode_path"`
19753      new_path="$input_path"
19754    fi
19755  fi
19756
19757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19758  if test "x$test_cygdrive_prefix" = x; then
19759    # As a simple fix, exclude /usr/bin since it's not a real path.
19760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19762      # a path prefixed by /cygdrive for fixpath to work.
19763      new_path="$CYGWIN_ROOT_PATH$input_path"
19764    fi
19765  fi
19766
19767  # remove trailing .exe if any
19768  new_path="${new_path/%.exe/}"
19769
19770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19771
19772  # First separate the path from the arguments. This will split at the first
19773  # space.
19774  complete="$FOUND_MAKE"
19775  path="${complete%% *}"
19776  tmp="$complete EOL"
19777  arguments="${tmp#* }"
19778
19779  # Input might be given as Windows format, start by converting to
19780  # unix format.
19781  new_path="$path"
19782
19783  windows_path="$new_path"
19784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19785    unix_path=`$CYGPATH -u "$windows_path"`
19786    new_path="$unix_path"
19787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19789    new_path="$unix_path"
19790  fi
19791
19792
19793  # Now try to locate executable using which
19794  new_path=`$WHICH "$new_path" 2> /dev/null`
19795
19796  if test "x$new_path" = x; then
19797    # Oops. Which didn't find the executable.
19798    # The splitting of arguments from the executable at a space might have been incorrect,
19799    # since paths with space are more likely in Windows. Give it another try with the whole
19800    # argument.
19801    path="$complete"
19802    arguments="EOL"
19803    new_path="$path"
19804
19805  windows_path="$new_path"
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    unix_path=`$CYGPATH -u "$windows_path"`
19808    new_path="$unix_path"
19809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19811    new_path="$unix_path"
19812  fi
19813
19814
19815    new_path=`$WHICH "$new_path" 2> /dev/null`
19816    # bat and cmd files are not always considered executable in MSYS causing which
19817    # to not find them
19818    if test "x$new_path" = x \
19819        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19820        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19821      new_path="$path"
19822
19823  windows_path="$new_path"
19824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19825    unix_path=`$CYGPATH -u "$windows_path"`
19826    new_path="$unix_path"
19827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19829    new_path="$unix_path"
19830  fi
19831
19832    fi
19833
19834    if test "x$new_path" = x; then
19835      # It's still not found. Now this is an unrecoverable error.
19836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19837$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19838      has_space=`$ECHO "$complete" | $GREP " "`
19839      if test "x$has_space" != x; then
19840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19842      fi
19843      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19844    fi
19845  fi
19846
19847  # Now new_path has a complete unix path to the binary
19848  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19849    # Keep paths in /bin as-is, but remove trailing .exe if any
19850    new_path="${new_path/%.exe/}"
19851    # Do not save /bin paths to all_fixpath_prefixes!
19852  else
19853    # Not in mixed or Windows style, start by that.
19854    new_path=`cmd //c echo $new_path`
19855
19856  input_path="$new_path"
19857  # Check if we need to convert this using DOS-style short mode. If the path
19858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19859  # take no chances and rewrite it.
19860  # Note: m4 eats our [], so we need to use [ and ] instead.
19861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19862  if test "x$has_forbidden_chars" != x; then
19863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19865  fi
19866
19867    # Output is in $new_path
19868
19869  windows_path="$new_path"
19870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19871    unix_path=`$CYGPATH -u "$windows_path"`
19872    new_path="$unix_path"
19873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19875    new_path="$unix_path"
19876  fi
19877
19878    # remove trailing .exe if any
19879    new_path="${new_path/%.exe/}"
19880
19881    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19882    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19883  fi
19884
19885    else
19886      # We're on a unix platform. Hooray! :)
19887      # First separate the path from the arguments. This will split at the first
19888      # space.
19889      complete="$FOUND_MAKE"
19890      path="${complete%% *}"
19891      tmp="$complete EOL"
19892      arguments="${tmp#* }"
19893
19894      # Cannot rely on the command "which" here since it doesn't always work.
19895      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19896      if test -z "$is_absolute_path"; then
19897        # Path to executable is not absolute. Find it.
19898        IFS_save="$IFS"
19899        IFS=:
19900        for p in $PATH; do
19901          if test -f "$p/$path" && test -x "$p/$path"; then
19902            new_path="$p/$path"
19903            break
19904          fi
19905        done
19906        IFS="$IFS_save"
19907      else
19908        # This is an absolute path, we can use it without further modifications.
19909        new_path="$path"
19910      fi
19911
19912      if test "x$new_path" = x; then
19913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19914$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19915        has_space=`$ECHO "$complete" | $GREP " "`
19916        if test "x$has_space" != x; then
19917          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19918$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19919        fi
19920        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19921      fi
19922    fi
19923
19924    # Now join together the path and the arguments once again
19925    if test "x$arguments" != xEOL; then
19926      new_complete="$new_path ${arguments% *}"
19927    else
19928      new_complete="$new_path"
19929    fi
19930
19931    if test "x$complete" != "x$new_complete"; then
19932      FOUND_MAKE="$new_complete"
19933      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19934$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19935    fi
19936  fi
19937
19938        fi
19939      fi
19940    fi
19941  fi
19942
19943    fi
19944
19945    if test "x$FOUND_MAKE" = x; then
19946      if test "x$TOOLCHAIN_PATH" != x; then
19947        # We have a toolchain path, check that as well before giving up.
19948        OLD_PATH=$PATH
19949        PATH=$TOOLCHAIN_PATH:$PATH
19950        for ac_prog in gmake
19951do
19952  # Extract the first word of "$ac_prog", so it can be a program name with args.
19953set dummy $ac_prog; ac_word=$2
19954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19955$as_echo_n "checking for $ac_word... " >&6; }
19956if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19957  $as_echo_n "(cached) " >&6
19958else
19959  case $CHECK_TOOLSDIR_GMAKE in
19960  [\\/]* | ?:[\\/]*)
19961  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19962  ;;
19963  *)
19964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19965for as_dir in $PATH
19966do
19967  IFS=$as_save_IFS
19968  test -z "$as_dir" && as_dir=.
19969    for ac_exec_ext in '' $ac_executable_extensions; do
19970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19971    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19973    break 2
19974  fi
19975done
19976  done
19977IFS=$as_save_IFS
19978
19979  ;;
19980esac
19981fi
19982CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19983if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19985$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19986else
19987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19988$as_echo "no" >&6; }
19989fi
19990
19991
19992  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19993done
19994
19995
19996  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19997  DESCRIPTION="gmake in tools-dir"
19998
19999  # On Cygwin, we require a newer version of make than on other platforms
20000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20001    MAKE_VERSION_EXPR="-e 4\."
20002    MAKE_REQUIRED_VERSION="4.0"
20003   else
20004    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20005    MAKE_REQUIRED_VERSION="3.81"
20006  fi
20007
20008  if test "x$MAKE_CANDIDATE" != x; then
20009    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20010$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20011    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20012    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20013    if test "x$IS_GNU_MAKE" = x; then
20014      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20015$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20016    else
20017      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20018      if test "x$IS_MODERN_MAKE" = x; then
20019        { $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
20020$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;}
20021      else
20022        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20023          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20024            MAKE_EXPECTED_ENV='cygwin'
20025          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20026            MAKE_EXPECTED_ENV='msys'
20027          else
20028            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20029          fi
20030          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20031          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20032        else
20033          # Not relevant for non-Windows
20034          IS_MAKE_CORRECT_ENV=true
20035        fi
20036        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20037          { $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
20038$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;}
20039        else
20040          FOUND_MAKE=$MAKE_CANDIDATE
20041
20042  # Only process if variable expands to non-empty
20043
20044  if test "x$FOUND_MAKE" != x; then
20045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20046
20047  # First separate the path from the arguments. This will split at the first
20048  # space.
20049  complete="$FOUND_MAKE"
20050  path="${complete%% *}"
20051  tmp="$complete EOL"
20052  arguments="${tmp#* }"
20053
20054  # Input might be given as Windows format, start by converting to
20055  # unix format.
20056  new_path=`$CYGPATH -u "$path"`
20057
20058  # Now try to locate executable using which
20059  new_path=`$WHICH "$new_path" 2> /dev/null`
20060  # bat and cmd files are not always considered executable in cygwin causing which
20061  # to not find them
20062  if test "x$new_path" = x \
20063      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20064      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20065    new_path=`$CYGPATH -u "$path"`
20066  fi
20067  if test "x$new_path" = x; then
20068    # Oops. Which didn't find the executable.
20069    # The splitting of arguments from the executable at a space might have been incorrect,
20070    # since paths with space are more likely in Windows. Give it another try with the whole
20071    # argument.
20072    path="$complete"
20073    arguments="EOL"
20074    new_path=`$CYGPATH -u "$path"`
20075    new_path=`$WHICH "$new_path" 2> /dev/null`
20076    # bat and cmd files are not always considered executable in cygwin causing which
20077    # to not find them
20078    if test "x$new_path" = x \
20079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20081      new_path=`$CYGPATH -u "$path"`
20082    fi
20083    if test "x$new_path" = x; then
20084      # It's still not found. Now this is an unrecoverable error.
20085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20086$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20087      has_space=`$ECHO "$complete" | $GREP " "`
20088      if test "x$has_space" != x; then
20089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20091      fi
20092      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20093    fi
20094  fi
20095
20096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20099  # "foo.exe" is OK but "foo" is an error.
20100  #
20101  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20102  # It is also a way to make sure we got the proper file name for the real test later on.
20103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20104  if test "x$test_shortpath" = x; then
20105    # Short path failed, file does not exist as specified.
20106    # Try adding .exe or .cmd
20107    if test -f "${new_path}.exe"; then
20108      input_to_shortpath="${new_path}.exe"
20109    elif test -f "${new_path}.cmd"; then
20110      input_to_shortpath="${new_path}.cmd"
20111    else
20112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20113$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20114      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20115$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20116      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20117    fi
20118  else
20119    input_to_shortpath="$new_path"
20120  fi
20121
20122  # Call helper function which possibly converts this using DOS-style short mode.
20123  # If so, the updated path is stored in $new_path.
20124  new_path="$input_to_shortpath"
20125
20126  input_path="$input_to_shortpath"
20127  # Check if we need to convert this using DOS-style short mode. If the path
20128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20129  # take no chances and rewrite it.
20130  # Note: m4 eats our [], so we need to use [ and ] instead.
20131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20132  if test "x$has_forbidden_chars" != x; then
20133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20137      # Going to short mode and back again did indeed matter. Since short mode is
20138      # case insensitive, let's make it lowercase to improve readability.
20139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20140      # Now convert it back to Unix-style (cygpath)
20141      input_path=`$CYGPATH -u "$shortmode_path"`
20142      new_path="$input_path"
20143    fi
20144  fi
20145
20146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20147  if test "x$test_cygdrive_prefix" = x; then
20148    # As a simple fix, exclude /usr/bin since it's not a real path.
20149    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20151      # a path prefixed by /cygdrive for fixpath to work.
20152      new_path="$CYGWIN_ROOT_PATH$input_path"
20153    fi
20154  fi
20155
20156  # remove trailing .exe if any
20157  new_path="${new_path/%.exe/}"
20158
20159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20160
20161  # First separate the path from the arguments. This will split at the first
20162  # space.
20163  complete="$FOUND_MAKE"
20164  path="${complete%% *}"
20165  tmp="$complete EOL"
20166  arguments="${tmp#* }"
20167
20168  # Input might be given as Windows format, start by converting to
20169  # unix format.
20170  new_path="$path"
20171
20172  windows_path="$new_path"
20173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20174    unix_path=`$CYGPATH -u "$windows_path"`
20175    new_path="$unix_path"
20176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20178    new_path="$unix_path"
20179  fi
20180
20181
20182  # Now try to locate executable using which
20183  new_path=`$WHICH "$new_path" 2> /dev/null`
20184
20185  if test "x$new_path" = x; then
20186    # Oops. Which didn't find the executable.
20187    # The splitting of arguments from the executable at a space might have been incorrect,
20188    # since paths with space are more likely in Windows. Give it another try with the whole
20189    # argument.
20190    path="$complete"
20191    arguments="EOL"
20192    new_path="$path"
20193
20194  windows_path="$new_path"
20195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20196    unix_path=`$CYGPATH -u "$windows_path"`
20197    new_path="$unix_path"
20198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20200    new_path="$unix_path"
20201  fi
20202
20203
20204    new_path=`$WHICH "$new_path" 2> /dev/null`
20205    # bat and cmd files are not always considered executable in MSYS causing which
20206    # to not find them
20207    if test "x$new_path" = x \
20208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20210      new_path="$path"
20211
20212  windows_path="$new_path"
20213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20214    unix_path=`$CYGPATH -u "$windows_path"`
20215    new_path="$unix_path"
20216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20218    new_path="$unix_path"
20219  fi
20220
20221    fi
20222
20223    if test "x$new_path" = x; then
20224      # It's still not found. Now this is an unrecoverable error.
20225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20227      has_space=`$ECHO "$complete" | $GREP " "`
20228      if test "x$has_space" != x; then
20229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20231      fi
20232      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20233    fi
20234  fi
20235
20236  # Now new_path has a complete unix path to the binary
20237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20238    # Keep paths in /bin as-is, but remove trailing .exe if any
20239    new_path="${new_path/%.exe/}"
20240    # Do not save /bin paths to all_fixpath_prefixes!
20241  else
20242    # Not in mixed or Windows style, start by that.
20243    new_path=`cmd //c echo $new_path`
20244
20245  input_path="$new_path"
20246  # Check if we need to convert this using DOS-style short mode. If the path
20247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20248  # take no chances and rewrite it.
20249  # Note: m4 eats our [], so we need to use [ and ] instead.
20250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20251  if test "x$has_forbidden_chars" != x; then
20252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20254  fi
20255
20256    # Output is in $new_path
20257
20258  windows_path="$new_path"
20259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20260    unix_path=`$CYGPATH -u "$windows_path"`
20261    new_path="$unix_path"
20262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20264    new_path="$unix_path"
20265  fi
20266
20267    # remove trailing .exe if any
20268    new_path="${new_path/%.exe/}"
20269
20270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20272  fi
20273
20274    else
20275      # We're on a unix platform. Hooray! :)
20276      # First separate the path from the arguments. This will split at the first
20277      # space.
20278      complete="$FOUND_MAKE"
20279      path="${complete%% *}"
20280      tmp="$complete EOL"
20281      arguments="${tmp#* }"
20282
20283      # Cannot rely on the command "which" here since it doesn't always work.
20284      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20285      if test -z "$is_absolute_path"; then
20286        # Path to executable is not absolute. Find it.
20287        IFS_save="$IFS"
20288        IFS=:
20289        for p in $PATH; do
20290          if test -f "$p/$path" && test -x "$p/$path"; then
20291            new_path="$p/$path"
20292            break
20293          fi
20294        done
20295        IFS="$IFS_save"
20296      else
20297        # This is an absolute path, we can use it without further modifications.
20298        new_path="$path"
20299      fi
20300
20301      if test "x$new_path" = x; then
20302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20304        has_space=`$ECHO "$complete" | $GREP " "`
20305        if test "x$has_space" != x; then
20306          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20308        fi
20309        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20310      fi
20311    fi
20312
20313    # Now join together the path and the arguments once again
20314    if test "x$arguments" != xEOL; then
20315      new_complete="$new_path ${arguments% *}"
20316    else
20317      new_complete="$new_path"
20318    fi
20319
20320    if test "x$complete" != "x$new_complete"; then
20321      FOUND_MAKE="$new_complete"
20322      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20323$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20324    fi
20325  fi
20326
20327        fi
20328      fi
20329    fi
20330  fi
20331
20332        if test "x$FOUND_MAKE" = x; then
20333          for ac_prog in make
20334do
20335  # Extract the first word of "$ac_prog", so it can be a program name with args.
20336set dummy $ac_prog; ac_word=$2
20337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20338$as_echo_n "checking for $ac_word... " >&6; }
20339if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20340  $as_echo_n "(cached) " >&6
20341else
20342  case $CHECK_TOOLSDIR_MAKE in
20343  [\\/]* | ?:[\\/]*)
20344  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20345  ;;
20346  *)
20347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20348for as_dir in $PATH
20349do
20350  IFS=$as_save_IFS
20351  test -z "$as_dir" && as_dir=.
20352    for ac_exec_ext in '' $ac_executable_extensions; do
20353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20354    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20356    break 2
20357  fi
20358done
20359  done
20360IFS=$as_save_IFS
20361
20362  ;;
20363esac
20364fi
20365CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20366if test -n "$CHECK_TOOLSDIR_MAKE"; then
20367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20368$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20369else
20370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20371$as_echo "no" >&6; }
20372fi
20373
20374
20375  test -n "$CHECK_TOOLSDIR_MAKE" && break
20376done
20377
20378
20379  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20380  DESCRIPTION="make in tools-dir"
20381
20382  # On Cygwin, we require a newer version of make than on other platforms
20383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20384    MAKE_VERSION_EXPR="-e 4\."
20385    MAKE_REQUIRED_VERSION="4.0"
20386   else
20387    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20388    MAKE_REQUIRED_VERSION="3.81"
20389  fi
20390
20391  if test "x$MAKE_CANDIDATE" != x; then
20392    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20393$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20394    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20395    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20396    if test "x$IS_GNU_MAKE" = x; then
20397      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20398$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20399    else
20400      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20401      if test "x$IS_MODERN_MAKE" = x; then
20402        { $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
20403$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;}
20404      else
20405        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20406          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20407            MAKE_EXPECTED_ENV='cygwin'
20408          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20409            MAKE_EXPECTED_ENV='msys'
20410          else
20411            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20412          fi
20413          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20414          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20415        else
20416          # Not relevant for non-Windows
20417          IS_MAKE_CORRECT_ENV=true
20418        fi
20419        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20420          { $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
20421$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;}
20422        else
20423          FOUND_MAKE=$MAKE_CANDIDATE
20424
20425  # Only process if variable expands to non-empty
20426
20427  if test "x$FOUND_MAKE" != x; then
20428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20429
20430  # First separate the path from the arguments. This will split at the first
20431  # space.
20432  complete="$FOUND_MAKE"
20433  path="${complete%% *}"
20434  tmp="$complete EOL"
20435  arguments="${tmp#* }"
20436
20437  # Input might be given as Windows format, start by converting to
20438  # unix format.
20439  new_path=`$CYGPATH -u "$path"`
20440
20441  # Now try to locate executable using which
20442  new_path=`$WHICH "$new_path" 2> /dev/null`
20443  # bat and cmd files are not always considered executable in cygwin causing which
20444  # to not find them
20445  if test "x$new_path" = x \
20446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20448    new_path=`$CYGPATH -u "$path"`
20449  fi
20450  if test "x$new_path" = x; then
20451    # Oops. Which didn't find the executable.
20452    # The splitting of arguments from the executable at a space might have been incorrect,
20453    # since paths with space are more likely in Windows. Give it another try with the whole
20454    # argument.
20455    path="$complete"
20456    arguments="EOL"
20457    new_path=`$CYGPATH -u "$path"`
20458    new_path=`$WHICH "$new_path" 2> /dev/null`
20459    # bat and cmd files are not always considered executable in cygwin causing which
20460    # to not find them
20461    if test "x$new_path" = x \
20462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20464      new_path=`$CYGPATH -u "$path"`
20465    fi
20466    if test "x$new_path" = x; then
20467      # It's still not found. Now this is an unrecoverable error.
20468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20469$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20470      has_space=`$ECHO "$complete" | $GREP " "`
20471      if test "x$has_space" != x; then
20472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20474      fi
20475      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20476    fi
20477  fi
20478
20479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20482  # "foo.exe" is OK but "foo" is an error.
20483  #
20484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20485  # It is also a way to make sure we got the proper file name for the real test later on.
20486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20487  if test "x$test_shortpath" = x; then
20488    # Short path failed, file does not exist as specified.
20489    # Try adding .exe or .cmd
20490    if test -f "${new_path}.exe"; then
20491      input_to_shortpath="${new_path}.exe"
20492    elif test -f "${new_path}.cmd"; then
20493      input_to_shortpath="${new_path}.cmd"
20494    else
20495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20499      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20500    fi
20501  else
20502    input_to_shortpath="$new_path"
20503  fi
20504
20505  # Call helper function which possibly converts this using DOS-style short mode.
20506  # If so, the updated path is stored in $new_path.
20507  new_path="$input_to_shortpath"
20508
20509  input_path="$input_to_shortpath"
20510  # Check if we need to convert this using DOS-style short mode. If the path
20511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20512  # take no chances and rewrite it.
20513  # Note: m4 eats our [], so we need to use [ and ] instead.
20514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20515  if test "x$has_forbidden_chars" != x; then
20516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20520      # Going to short mode and back again did indeed matter. Since short mode is
20521      # case insensitive, let's make it lowercase to improve readability.
20522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20523      # Now convert it back to Unix-style (cygpath)
20524      input_path=`$CYGPATH -u "$shortmode_path"`
20525      new_path="$input_path"
20526    fi
20527  fi
20528
20529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20530  if test "x$test_cygdrive_prefix" = x; then
20531    # As a simple fix, exclude /usr/bin since it's not a real path.
20532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20534      # a path prefixed by /cygdrive for fixpath to work.
20535      new_path="$CYGWIN_ROOT_PATH$input_path"
20536    fi
20537  fi
20538
20539  # remove trailing .exe if any
20540  new_path="${new_path/%.exe/}"
20541
20542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20543
20544  # First separate the path from the arguments. This will split at the first
20545  # space.
20546  complete="$FOUND_MAKE"
20547  path="${complete%% *}"
20548  tmp="$complete EOL"
20549  arguments="${tmp#* }"
20550
20551  # Input might be given as Windows format, start by converting to
20552  # unix format.
20553  new_path="$path"
20554
20555  windows_path="$new_path"
20556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20557    unix_path=`$CYGPATH -u "$windows_path"`
20558    new_path="$unix_path"
20559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20561    new_path="$unix_path"
20562  fi
20563
20564
20565  # Now try to locate executable using which
20566  new_path=`$WHICH "$new_path" 2> /dev/null`
20567
20568  if test "x$new_path" = x; then
20569    # Oops. Which didn't find the executable.
20570    # The splitting of arguments from the executable at a space might have been incorrect,
20571    # since paths with space are more likely in Windows. Give it another try with the whole
20572    # argument.
20573    path="$complete"
20574    arguments="EOL"
20575    new_path="$path"
20576
20577  windows_path="$new_path"
20578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20579    unix_path=`$CYGPATH -u "$windows_path"`
20580    new_path="$unix_path"
20581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20583    new_path="$unix_path"
20584  fi
20585
20586
20587    new_path=`$WHICH "$new_path" 2> /dev/null`
20588    # bat and cmd files are not always considered executable in MSYS causing which
20589    # to not find them
20590    if test "x$new_path" = x \
20591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20593      new_path="$path"
20594
20595  windows_path="$new_path"
20596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20597    unix_path=`$CYGPATH -u "$windows_path"`
20598    new_path="$unix_path"
20599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20601    new_path="$unix_path"
20602  fi
20603
20604    fi
20605
20606    if test "x$new_path" = x; then
20607      # It's still not found. Now this is an unrecoverable error.
20608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20610      has_space=`$ECHO "$complete" | $GREP " "`
20611      if test "x$has_space" != x; then
20612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20614      fi
20615      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20616    fi
20617  fi
20618
20619  # Now new_path has a complete unix path to the binary
20620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20621    # Keep paths in /bin as-is, but remove trailing .exe if any
20622    new_path="${new_path/%.exe/}"
20623    # Do not save /bin paths to all_fixpath_prefixes!
20624  else
20625    # Not in mixed or Windows style, start by that.
20626    new_path=`cmd //c echo $new_path`
20627
20628  input_path="$new_path"
20629  # Check if we need to convert this using DOS-style short mode. If the path
20630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20631  # take no chances and rewrite it.
20632  # Note: m4 eats our [], so we need to use [ and ] instead.
20633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20634  if test "x$has_forbidden_chars" != x; then
20635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20637  fi
20638
20639    # Output is in $new_path
20640
20641  windows_path="$new_path"
20642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20643    unix_path=`$CYGPATH -u "$windows_path"`
20644    new_path="$unix_path"
20645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20647    new_path="$unix_path"
20648  fi
20649
20650    # remove trailing .exe if any
20651    new_path="${new_path/%.exe/}"
20652
20653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20655  fi
20656
20657    else
20658      # We're on a unix platform. Hooray! :)
20659      # First separate the path from the arguments. This will split at the first
20660      # space.
20661      complete="$FOUND_MAKE"
20662      path="${complete%% *}"
20663      tmp="$complete EOL"
20664      arguments="${tmp#* }"
20665
20666      # Cannot rely on the command "which" here since it doesn't always work.
20667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20668      if test -z "$is_absolute_path"; then
20669        # Path to executable is not absolute. Find it.
20670        IFS_save="$IFS"
20671        IFS=:
20672        for p in $PATH; do
20673          if test -f "$p/$path" && test -x "$p/$path"; then
20674            new_path="$p/$path"
20675            break
20676          fi
20677        done
20678        IFS="$IFS_save"
20679      else
20680        # This is an absolute path, we can use it without further modifications.
20681        new_path="$path"
20682      fi
20683
20684      if test "x$new_path" = x; then
20685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20687        has_space=`$ECHO "$complete" | $GREP " "`
20688        if test "x$has_space" != x; then
20689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20691        fi
20692        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20693      fi
20694    fi
20695
20696    # Now join together the path and the arguments once again
20697    if test "x$arguments" != xEOL; then
20698      new_complete="$new_path ${arguments% *}"
20699    else
20700      new_complete="$new_path"
20701    fi
20702
20703    if test "x$complete" != "x$new_complete"; then
20704      FOUND_MAKE="$new_complete"
20705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20706$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20707    fi
20708  fi
20709
20710        fi
20711      fi
20712    fi
20713  fi
20714
20715        fi
20716        PATH=$OLD_PATH
20717      fi
20718    fi
20719
20720    if test "x$FOUND_MAKE" = x; then
20721      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
20722    fi
20723
20724    else
20725      # If it succeeded, then it was overridden by the user. We will use it
20726      # for the tool.
20727
20728      # First remove it from the list of overridden variables, so we can test
20729      # for unknown variables in the end.
20730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20731
20732      # Check if we try to supply an empty value
20733      if test "x$MAKE" = x; then
20734        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20735$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20737$as_echo_n "checking for MAKE... " >&6; }
20738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20739$as_echo "disabled" >&6; }
20740      else
20741        # Check if the provided tool contains a complete path.
20742        tool_specified="$MAKE"
20743        tool_basename="${tool_specified##*/}"
20744        if test "x$tool_basename" = "x$tool_specified"; then
20745          # A command without a complete path is provided, search $PATH.
20746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20747$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20748          # Extract the first word of "$tool_basename", so it can be a program name with args.
20749set dummy $tool_basename; ac_word=$2
20750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20751$as_echo_n "checking for $ac_word... " >&6; }
20752if ${ac_cv_path_MAKE+:} false; then :
20753  $as_echo_n "(cached) " >&6
20754else
20755  case $MAKE in
20756  [\\/]* | ?:[\\/]*)
20757  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20758  ;;
20759  *)
20760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20761for as_dir in $PATH
20762do
20763  IFS=$as_save_IFS
20764  test -z "$as_dir" && as_dir=.
20765    for ac_exec_ext in '' $ac_executable_extensions; do
20766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20767    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20769    break 2
20770  fi
20771done
20772  done
20773IFS=$as_save_IFS
20774
20775  ;;
20776esac
20777fi
20778MAKE=$ac_cv_path_MAKE
20779if test -n "$MAKE"; then
20780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20781$as_echo "$MAKE" >&6; }
20782else
20783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20784$as_echo "no" >&6; }
20785fi
20786
20787
20788          if test "x$MAKE" = x; then
20789            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20790          fi
20791        else
20792          # Otherwise we believe it is a complete path. Use it as it is.
20793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20794$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20795          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20796$as_echo_n "checking for MAKE... " >&6; }
20797          if test ! -x "$tool_specified"; then
20798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20799$as_echo "not found" >&6; }
20800            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20801          fi
20802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20803$as_echo "$tool_specified" >&6; }
20804        fi
20805      fi
20806    fi
20807
20808    # If MAKE was set by user, verify the version
20809
20810  MAKE_CANDIDATE=""$MAKE""
20811  DESCRIPTION="user supplied MAKE=$MAKE"
20812
20813  # On Cygwin, we require a newer version of make than on other platforms
20814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20815    MAKE_VERSION_EXPR="-e 4\."
20816    MAKE_REQUIRED_VERSION="4.0"
20817   else
20818    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20819    MAKE_REQUIRED_VERSION="3.81"
20820  fi
20821
20822  if test "x$MAKE_CANDIDATE" != x; then
20823    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20824$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20825    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20826    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20827    if test "x$IS_GNU_MAKE" = x; then
20828      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20829$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20830    else
20831      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20832      if test "x$IS_MODERN_MAKE" = x; then
20833        { $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
20834$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;}
20835      else
20836        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20837          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20838            MAKE_EXPECTED_ENV='cygwin'
20839          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20840            MAKE_EXPECTED_ENV='msys'
20841          else
20842            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20843          fi
20844          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20845          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20846        else
20847          # Not relevant for non-Windows
20848          IS_MAKE_CORRECT_ENV=true
20849        fi
20850        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20851          { $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
20852$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;}
20853        else
20854          FOUND_MAKE=$MAKE_CANDIDATE
20855
20856  # Only process if variable expands to non-empty
20857
20858  if test "x$FOUND_MAKE" != x; then
20859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20860
20861  # First separate the path from the arguments. This will split at the first
20862  # space.
20863  complete="$FOUND_MAKE"
20864  path="${complete%% *}"
20865  tmp="$complete EOL"
20866  arguments="${tmp#* }"
20867
20868  # Input might be given as Windows format, start by converting to
20869  # unix format.
20870  new_path=`$CYGPATH -u "$path"`
20871
20872  # Now try to locate executable using which
20873  new_path=`$WHICH "$new_path" 2> /dev/null`
20874  # bat and cmd files are not always considered executable in cygwin causing which
20875  # to not find them
20876  if test "x$new_path" = x \
20877      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20878      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20879    new_path=`$CYGPATH -u "$path"`
20880  fi
20881  if test "x$new_path" = x; then
20882    # Oops. Which didn't find the executable.
20883    # The splitting of arguments from the executable at a space might have been incorrect,
20884    # since paths with space are more likely in Windows. Give it another try with the whole
20885    # argument.
20886    path="$complete"
20887    arguments="EOL"
20888    new_path=`$CYGPATH -u "$path"`
20889    new_path=`$WHICH "$new_path" 2> /dev/null`
20890    # bat and cmd files are not always considered executable in cygwin causing which
20891    # to not find them
20892    if test "x$new_path" = x \
20893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20895      new_path=`$CYGPATH -u "$path"`
20896    fi
20897    if test "x$new_path" = x; then
20898      # It's still not found. Now this is an unrecoverable error.
20899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20900$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20901      has_space=`$ECHO "$complete" | $GREP " "`
20902      if test "x$has_space" != x; then
20903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20905      fi
20906      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20907    fi
20908  fi
20909
20910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20913  # "foo.exe" is OK but "foo" is an error.
20914  #
20915  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20916  # It is also a way to make sure we got the proper file name for the real test later on.
20917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20918  if test "x$test_shortpath" = x; then
20919    # Short path failed, file does not exist as specified.
20920    # Try adding .exe or .cmd
20921    if test -f "${new_path}.exe"; then
20922      input_to_shortpath="${new_path}.exe"
20923    elif test -f "${new_path}.cmd"; then
20924      input_to_shortpath="${new_path}.cmd"
20925    else
20926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20928      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20929$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20930      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20931    fi
20932  else
20933    input_to_shortpath="$new_path"
20934  fi
20935
20936  # Call helper function which possibly converts this using DOS-style short mode.
20937  # If so, the updated path is stored in $new_path.
20938  new_path="$input_to_shortpath"
20939
20940  input_path="$input_to_shortpath"
20941  # Check if we need to convert this using DOS-style short mode. If the path
20942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20943  # take no chances and rewrite it.
20944  # Note: m4 eats our [], so we need to use [ and ] instead.
20945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20946  if test "x$has_forbidden_chars" != x; then
20947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20951      # Going to short mode and back again did indeed matter. Since short mode is
20952      # case insensitive, let's make it lowercase to improve readability.
20953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20954      # Now convert it back to Unix-style (cygpath)
20955      input_path=`$CYGPATH -u "$shortmode_path"`
20956      new_path="$input_path"
20957    fi
20958  fi
20959
20960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20961  if test "x$test_cygdrive_prefix" = x; then
20962    # As a simple fix, exclude /usr/bin since it's not a real path.
20963    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20965      # a path prefixed by /cygdrive for fixpath to work.
20966      new_path="$CYGWIN_ROOT_PATH$input_path"
20967    fi
20968  fi
20969
20970  # remove trailing .exe if any
20971  new_path="${new_path/%.exe/}"
20972
20973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20974
20975  # First separate the path from the arguments. This will split at the first
20976  # space.
20977  complete="$FOUND_MAKE"
20978  path="${complete%% *}"
20979  tmp="$complete EOL"
20980  arguments="${tmp#* }"
20981
20982  # Input might be given as Windows format, start by converting to
20983  # unix format.
20984  new_path="$path"
20985
20986  windows_path="$new_path"
20987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20988    unix_path=`$CYGPATH -u "$windows_path"`
20989    new_path="$unix_path"
20990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20992    new_path="$unix_path"
20993  fi
20994
20995
20996  # Now try to locate executable using which
20997  new_path=`$WHICH "$new_path" 2> /dev/null`
20998
20999  if test "x$new_path" = x; then
21000    # Oops. Which didn't find the executable.
21001    # The splitting of arguments from the executable at a space might have been incorrect,
21002    # since paths with space are more likely in Windows. Give it another try with the whole
21003    # argument.
21004    path="$complete"
21005    arguments="EOL"
21006    new_path="$path"
21007
21008  windows_path="$new_path"
21009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21010    unix_path=`$CYGPATH -u "$windows_path"`
21011    new_path="$unix_path"
21012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21014    new_path="$unix_path"
21015  fi
21016
21017
21018    new_path=`$WHICH "$new_path" 2> /dev/null`
21019    # bat and cmd files are not always considered executable in MSYS causing which
21020    # to not find them
21021    if test "x$new_path" = x \
21022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21024      new_path="$path"
21025
21026  windows_path="$new_path"
21027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21028    unix_path=`$CYGPATH -u "$windows_path"`
21029    new_path="$unix_path"
21030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21032    new_path="$unix_path"
21033  fi
21034
21035    fi
21036
21037    if test "x$new_path" = x; then
21038      # It's still not found. Now this is an unrecoverable error.
21039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21041      has_space=`$ECHO "$complete" | $GREP " "`
21042      if test "x$has_space" != x; then
21043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21045      fi
21046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21047    fi
21048  fi
21049
21050  # Now new_path has a complete unix path to the binary
21051  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21052    # Keep paths in /bin as-is, but remove trailing .exe if any
21053    new_path="${new_path/%.exe/}"
21054    # Do not save /bin paths to all_fixpath_prefixes!
21055  else
21056    # Not in mixed or Windows style, start by that.
21057    new_path=`cmd //c echo $new_path`
21058
21059  input_path="$new_path"
21060  # Check if we need to convert this using DOS-style short mode. If the path
21061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21062  # take no chances and rewrite it.
21063  # Note: m4 eats our [], so we need to use [ and ] instead.
21064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21065  if test "x$has_forbidden_chars" != x; then
21066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21068  fi
21069
21070    # Output is in $new_path
21071
21072  windows_path="$new_path"
21073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21074    unix_path=`$CYGPATH -u "$windows_path"`
21075    new_path="$unix_path"
21076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21078    new_path="$unix_path"
21079  fi
21080
21081    # remove trailing .exe if any
21082    new_path="${new_path/%.exe/}"
21083
21084    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21085    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21086  fi
21087
21088    else
21089      # We're on a unix platform. Hooray! :)
21090      # First separate the path from the arguments. This will split at the first
21091      # space.
21092      complete="$FOUND_MAKE"
21093      path="${complete%% *}"
21094      tmp="$complete EOL"
21095      arguments="${tmp#* }"
21096
21097      # Cannot rely on the command "which" here since it doesn't always work.
21098      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21099      if test -z "$is_absolute_path"; then
21100        # Path to executable is not absolute. Find it.
21101        IFS_save="$IFS"
21102        IFS=:
21103        for p in $PATH; do
21104          if test -f "$p/$path" && test -x "$p/$path"; then
21105            new_path="$p/$path"
21106            break
21107          fi
21108        done
21109        IFS="$IFS_save"
21110      else
21111        # This is an absolute path, we can use it without further modifications.
21112        new_path="$path"
21113      fi
21114
21115      if test "x$new_path" = x; then
21116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21117$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21118        has_space=`$ECHO "$complete" | $GREP " "`
21119        if test "x$has_space" != x; then
21120          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21121$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21122        fi
21123        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21124      fi
21125    fi
21126
21127    # Now join together the path and the arguments once again
21128    if test "x$arguments" != xEOL; then
21129      new_complete="$new_path ${arguments% *}"
21130    else
21131      new_complete="$new_path"
21132    fi
21133
21134    if test "x$complete" != "x$new_complete"; then
21135      FOUND_MAKE="$new_complete"
21136      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21137$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21138    fi
21139  fi
21140
21141        fi
21142      fi
21143    fi
21144  fi
21145
21146    if test "x$FOUND_MAKE" = x; then
21147      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21148    fi
21149
21150  fi
21151
21152
21153  MAKE=$FOUND_MAKE
21154
21155  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21156$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21157
21158
21159  # Check if make supports the output sync option and if so, setup using it.
21160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21161$as_echo_n "checking if make --output-sync is supported... " >&6; }
21162  if $MAKE --version -O > /dev/null 2>&1; then
21163    OUTPUT_SYNC_SUPPORTED=true
21164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21165$as_echo "yes" >&6; }
21166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21167$as_echo_n "checking for output-sync value... " >&6; }
21168
21169# Check whether --with-output-sync was given.
21170if test "${with_output_sync+set}" = set; then :
21171  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21172fi
21173
21174    if test "x$OUTPUT_SYNC" = "x"; then
21175      OUTPUT_SYNC=none
21176    fi
21177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21178$as_echo "$OUTPUT_SYNC" >&6; }
21179    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21180      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21181    fi
21182  else
21183    OUTPUT_SYNC_SUPPORTED=false
21184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21185$as_echo "no" >&6; }
21186  fi
21187
21188
21189
21190
21191
21192
21193  # Test if find supports -delete
21194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21195$as_echo_n "checking if find supports -delete... " >&6; }
21196  FIND_DELETE="-delete"
21197
21198  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21199
21200  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21201
21202  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21203  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21204    # No, it does not.
21205    $RM $DELETEDIR/TestIfFindSupportsDelete
21206    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21207      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21208      FIND_DELETE="-print | $XARGS $RM"
21209    else
21210      FIND_DELETE="-exec $RM \{\} \+"
21211    fi
21212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21213$as_echo "no" >&6; }
21214  else
21215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21216$as_echo "yes" >&6; }
21217  fi
21218  $RMDIR $DELETEDIR
21219
21220
21221
21222  # Test which kind of tar was found
21223  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21224    TAR_TYPE="gnu"
21225  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21226    TAR_TYPE="bsd"
21227  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21228    TAR_TYPE="bsd"
21229  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21230    TAR_TYPE="solaris"
21231  fi
21232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21233$as_echo_n "checking what type of tar was found... " >&6; }
21234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21235$as_echo "$TAR_TYPE" >&6; }
21236
21237  TAR_CREATE_FILE_PARAM=""
21238
21239  if test "x$TAR_TYPE" = "xgnu"; then
21240    TAR_INCLUDE_PARAM="T"
21241    TAR_SUPPORTS_TRANSFORM="true"
21242    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21243      # When using gnu tar for Solaris targets, need to use compatibility mode
21244      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21245    fi
21246  else
21247    TAR_INCLUDE_PARAM="I"
21248    TAR_SUPPORTS_TRANSFORM="false"
21249  fi
21250
21251
21252
21253
21254
21255
21256  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21257  # This is a problem for the grep resident on AIX.
21258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21259$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21260  # Multiple subsequent spaces..
21261  STACK_SPACES='aaa   bbb   ccc'
21262  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21263  # patterns in it.
21264  STACK_LIST=${STACK_SPACES// /$'\n'}
21265  NEEDLE_SPACES='ccc bbb aaa'
21266  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21267  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21268  if test "x$RESULT" == "x"; then
21269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21270$as_echo "yes" >&6; }
21271  else
21272    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21273      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21274    fi
21275    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21276  fi
21277
21278
21279  # These tools might not be installed by default,
21280  # need hint on how to install them.
21281
21282
21283
21284  # Publish this variable in the help.
21285
21286
21287  if [ -z "${UNZIP+x}" ]; then
21288    # The variable is not set by user, try to locate tool using the code snippet
21289    for ac_prog in unzip
21290do
21291  # Extract the first word of "$ac_prog", so it can be a program name with args.
21292set dummy $ac_prog; ac_word=$2
21293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21294$as_echo_n "checking for $ac_word... " >&6; }
21295if ${ac_cv_path_UNZIP+:} false; then :
21296  $as_echo_n "(cached) " >&6
21297else
21298  case $UNZIP in
21299  [\\/]* | ?:[\\/]*)
21300  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21301  ;;
21302  *)
21303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21304for as_dir in $PATH
21305do
21306  IFS=$as_save_IFS
21307  test -z "$as_dir" && as_dir=.
21308    for ac_exec_ext in '' $ac_executable_extensions; do
21309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21310    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21312    break 2
21313  fi
21314done
21315  done
21316IFS=$as_save_IFS
21317
21318  ;;
21319esac
21320fi
21321UNZIP=$ac_cv_path_UNZIP
21322if test -n "$UNZIP"; then
21323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21324$as_echo "$UNZIP" >&6; }
21325else
21326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21327$as_echo "no" >&6; }
21328fi
21329
21330
21331  test -n "$UNZIP" && break
21332done
21333
21334  else
21335    # The variable is set, but is it from the command line or the environment?
21336
21337    # Try to remove the string !UNZIP! from our list.
21338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21340      # If it failed, the variable was not from the command line. Ignore it,
21341      # but warn the user (except for BASH, which is always set by the calling BASH).
21342      if test "xUNZIP" != xBASH; then
21343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21344$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21345      fi
21346      # Try to locate tool using the code snippet
21347      for ac_prog in unzip
21348do
21349  # Extract the first word of "$ac_prog", so it can be a program name with args.
21350set dummy $ac_prog; ac_word=$2
21351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21352$as_echo_n "checking for $ac_word... " >&6; }
21353if ${ac_cv_path_UNZIP+:} false; then :
21354  $as_echo_n "(cached) " >&6
21355else
21356  case $UNZIP in
21357  [\\/]* | ?:[\\/]*)
21358  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21359  ;;
21360  *)
21361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21362for as_dir in $PATH
21363do
21364  IFS=$as_save_IFS
21365  test -z "$as_dir" && as_dir=.
21366    for ac_exec_ext in '' $ac_executable_extensions; do
21367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21368    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21370    break 2
21371  fi
21372done
21373  done
21374IFS=$as_save_IFS
21375
21376  ;;
21377esac
21378fi
21379UNZIP=$ac_cv_path_UNZIP
21380if test -n "$UNZIP"; then
21381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21382$as_echo "$UNZIP" >&6; }
21383else
21384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21385$as_echo "no" >&6; }
21386fi
21387
21388
21389  test -n "$UNZIP" && break
21390done
21391
21392    else
21393      # If it succeeded, then it was overridden by the user. We will use it
21394      # for the tool.
21395
21396      # First remove it from the list of overridden variables, so we can test
21397      # for unknown variables in the end.
21398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21399
21400      # Check if we try to supply an empty value
21401      if test "x$UNZIP" = x; then
21402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21403$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21405$as_echo_n "checking for UNZIP... " >&6; }
21406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21407$as_echo "disabled" >&6; }
21408      else
21409        # Check if the provided tool contains a complete path.
21410        tool_specified="$UNZIP"
21411        tool_basename="${tool_specified##*/}"
21412        if test "x$tool_basename" = "x$tool_specified"; then
21413          # A command without a complete path is provided, search $PATH.
21414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21415$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21416          # Extract the first word of "$tool_basename", so it can be a program name with args.
21417set dummy $tool_basename; ac_word=$2
21418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21419$as_echo_n "checking for $ac_word... " >&6; }
21420if ${ac_cv_path_UNZIP+:} false; then :
21421  $as_echo_n "(cached) " >&6
21422else
21423  case $UNZIP in
21424  [\\/]* | ?:[\\/]*)
21425  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21426  ;;
21427  *)
21428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21429for as_dir in $PATH
21430do
21431  IFS=$as_save_IFS
21432  test -z "$as_dir" && as_dir=.
21433    for ac_exec_ext in '' $ac_executable_extensions; do
21434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21435    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21437    break 2
21438  fi
21439done
21440  done
21441IFS=$as_save_IFS
21442
21443  ;;
21444esac
21445fi
21446UNZIP=$ac_cv_path_UNZIP
21447if test -n "$UNZIP"; then
21448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21449$as_echo "$UNZIP" >&6; }
21450else
21451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21452$as_echo "no" >&6; }
21453fi
21454
21455
21456          if test "x$UNZIP" = x; then
21457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21458          fi
21459        else
21460          # Otherwise we believe it is a complete path. Use it as it is.
21461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21462$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21464$as_echo_n "checking for UNZIP... " >&6; }
21465          if test ! -x "$tool_specified"; then
21466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21467$as_echo "not found" >&6; }
21468            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21469          fi
21470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21471$as_echo "$tool_specified" >&6; }
21472        fi
21473      fi
21474    fi
21475
21476  fi
21477
21478
21479
21480  if test "x$UNZIP" = x; then
21481    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21482  fi
21483
21484
21485  # Since zip uses "ZIP" as a environment variable for passing options, we need
21486  # to name our variable differently, hence ZIPEXE.
21487
21488
21489
21490  # Publish this variable in the help.
21491
21492
21493  if [ -z "${ZIPEXE+x}" ]; then
21494    # The variable is not set by user, try to locate tool using the code snippet
21495    for ac_prog in zip
21496do
21497  # Extract the first word of "$ac_prog", so it can be a program name with args.
21498set dummy $ac_prog; ac_word=$2
21499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21500$as_echo_n "checking for $ac_word... " >&6; }
21501if ${ac_cv_path_ZIPEXE+:} false; then :
21502  $as_echo_n "(cached) " >&6
21503else
21504  case $ZIPEXE in
21505  [\\/]* | ?:[\\/]*)
21506  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21507  ;;
21508  *)
21509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21510for as_dir in $PATH
21511do
21512  IFS=$as_save_IFS
21513  test -z "$as_dir" && as_dir=.
21514    for ac_exec_ext in '' $ac_executable_extensions; do
21515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21516    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21518    break 2
21519  fi
21520done
21521  done
21522IFS=$as_save_IFS
21523
21524  ;;
21525esac
21526fi
21527ZIPEXE=$ac_cv_path_ZIPEXE
21528if test -n "$ZIPEXE"; then
21529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21530$as_echo "$ZIPEXE" >&6; }
21531else
21532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21533$as_echo "no" >&6; }
21534fi
21535
21536
21537  test -n "$ZIPEXE" && break
21538done
21539
21540  else
21541    # The variable is set, but is it from the command line or the environment?
21542
21543    # Try to remove the string !ZIPEXE! from our list.
21544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21546      # If it failed, the variable was not from the command line. Ignore it,
21547      # but warn the user (except for BASH, which is always set by the calling BASH).
21548      if test "xZIPEXE" != xBASH; then
21549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21550$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21551      fi
21552      # Try to locate tool using the code snippet
21553      for ac_prog in zip
21554do
21555  # Extract the first word of "$ac_prog", so it can be a program name with args.
21556set dummy $ac_prog; ac_word=$2
21557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21558$as_echo_n "checking for $ac_word... " >&6; }
21559if ${ac_cv_path_ZIPEXE+:} false; then :
21560  $as_echo_n "(cached) " >&6
21561else
21562  case $ZIPEXE in
21563  [\\/]* | ?:[\\/]*)
21564  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21565  ;;
21566  *)
21567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21568for as_dir in $PATH
21569do
21570  IFS=$as_save_IFS
21571  test -z "$as_dir" && as_dir=.
21572    for ac_exec_ext in '' $ac_executable_extensions; do
21573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21574    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21576    break 2
21577  fi
21578done
21579  done
21580IFS=$as_save_IFS
21581
21582  ;;
21583esac
21584fi
21585ZIPEXE=$ac_cv_path_ZIPEXE
21586if test -n "$ZIPEXE"; then
21587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21588$as_echo "$ZIPEXE" >&6; }
21589else
21590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21591$as_echo "no" >&6; }
21592fi
21593
21594
21595  test -n "$ZIPEXE" && break
21596done
21597
21598    else
21599      # If it succeeded, then it was overridden by the user. We will use it
21600      # for the tool.
21601
21602      # First remove it from the list of overridden variables, so we can test
21603      # for unknown variables in the end.
21604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21605
21606      # Check if we try to supply an empty value
21607      if test "x$ZIPEXE" = x; then
21608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21609$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21611$as_echo_n "checking for ZIPEXE... " >&6; }
21612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21613$as_echo "disabled" >&6; }
21614      else
21615        # Check if the provided tool contains a complete path.
21616        tool_specified="$ZIPEXE"
21617        tool_basename="${tool_specified##*/}"
21618        if test "x$tool_basename" = "x$tool_specified"; then
21619          # A command without a complete path is provided, search $PATH.
21620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21621$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21622          # Extract the first word of "$tool_basename", so it can be a program name with args.
21623set dummy $tool_basename; ac_word=$2
21624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21625$as_echo_n "checking for $ac_word... " >&6; }
21626if ${ac_cv_path_ZIPEXE+:} false; then :
21627  $as_echo_n "(cached) " >&6
21628else
21629  case $ZIPEXE in
21630  [\\/]* | ?:[\\/]*)
21631  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21632  ;;
21633  *)
21634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21635for as_dir in $PATH
21636do
21637  IFS=$as_save_IFS
21638  test -z "$as_dir" && as_dir=.
21639    for ac_exec_ext in '' $ac_executable_extensions; do
21640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21641    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21643    break 2
21644  fi
21645done
21646  done
21647IFS=$as_save_IFS
21648
21649  ;;
21650esac
21651fi
21652ZIPEXE=$ac_cv_path_ZIPEXE
21653if test -n "$ZIPEXE"; then
21654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21655$as_echo "$ZIPEXE" >&6; }
21656else
21657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21658$as_echo "no" >&6; }
21659fi
21660
21661
21662          if test "x$ZIPEXE" = x; then
21663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21664          fi
21665        else
21666          # Otherwise we believe it is a complete path. Use it as it is.
21667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21668$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21670$as_echo_n "checking for ZIPEXE... " >&6; }
21671          if test ! -x "$tool_specified"; then
21672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21673$as_echo "not found" >&6; }
21674            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21675          fi
21676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21677$as_echo "$tool_specified" >&6; }
21678        fi
21679      fi
21680    fi
21681
21682  fi
21683
21684
21685
21686  if test "x$ZIPEXE" = x; then
21687    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21688  fi
21689
21690
21691
21692  # Non-required basic tools
21693
21694
21695
21696  # Publish this variable in the help.
21697
21698
21699  if [ -z "${LDD+x}" ]; then
21700    # The variable is not set by user, try to locate tool using the code snippet
21701    for ac_prog in ldd
21702do
21703  # Extract the first word of "$ac_prog", so it can be a program name with args.
21704set dummy $ac_prog; ac_word=$2
21705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21706$as_echo_n "checking for $ac_word... " >&6; }
21707if ${ac_cv_path_LDD+:} false; then :
21708  $as_echo_n "(cached) " >&6
21709else
21710  case $LDD in
21711  [\\/]* | ?:[\\/]*)
21712  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21713  ;;
21714  *)
21715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21716for as_dir in $PATH
21717do
21718  IFS=$as_save_IFS
21719  test -z "$as_dir" && as_dir=.
21720    for ac_exec_ext in '' $ac_executable_extensions; do
21721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21722    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21724    break 2
21725  fi
21726done
21727  done
21728IFS=$as_save_IFS
21729
21730  ;;
21731esac
21732fi
21733LDD=$ac_cv_path_LDD
21734if test -n "$LDD"; then
21735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21736$as_echo "$LDD" >&6; }
21737else
21738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21739$as_echo "no" >&6; }
21740fi
21741
21742
21743  test -n "$LDD" && break
21744done
21745
21746  else
21747    # The variable is set, but is it from the command line or the environment?
21748
21749    # Try to remove the string !LDD! from our list.
21750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21752      # If it failed, the variable was not from the command line. Ignore it,
21753      # but warn the user (except for BASH, which is always set by the calling BASH).
21754      if test "xLDD" != xBASH; then
21755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21756$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21757      fi
21758      # Try to locate tool using the code snippet
21759      for ac_prog in ldd
21760do
21761  # Extract the first word of "$ac_prog", so it can be a program name with args.
21762set dummy $ac_prog; ac_word=$2
21763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21764$as_echo_n "checking for $ac_word... " >&6; }
21765if ${ac_cv_path_LDD+:} false; then :
21766  $as_echo_n "(cached) " >&6
21767else
21768  case $LDD in
21769  [\\/]* | ?:[\\/]*)
21770  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21771  ;;
21772  *)
21773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21774for as_dir in $PATH
21775do
21776  IFS=$as_save_IFS
21777  test -z "$as_dir" && as_dir=.
21778    for ac_exec_ext in '' $ac_executable_extensions; do
21779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21780    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21782    break 2
21783  fi
21784done
21785  done
21786IFS=$as_save_IFS
21787
21788  ;;
21789esac
21790fi
21791LDD=$ac_cv_path_LDD
21792if test -n "$LDD"; then
21793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21794$as_echo "$LDD" >&6; }
21795else
21796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21797$as_echo "no" >&6; }
21798fi
21799
21800
21801  test -n "$LDD" && break
21802done
21803
21804    else
21805      # If it succeeded, then it was overridden by the user. We will use it
21806      # for the tool.
21807
21808      # First remove it from the list of overridden variables, so we can test
21809      # for unknown variables in the end.
21810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21811
21812      # Check if we try to supply an empty value
21813      if test "x$LDD" = x; then
21814        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21815$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21817$as_echo_n "checking for LDD... " >&6; }
21818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21819$as_echo "disabled" >&6; }
21820      else
21821        # Check if the provided tool contains a complete path.
21822        tool_specified="$LDD"
21823        tool_basename="${tool_specified##*/}"
21824        if test "x$tool_basename" = "x$tool_specified"; then
21825          # A command without a complete path is provided, search $PATH.
21826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21827$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21828          # Extract the first word of "$tool_basename", so it can be a program name with args.
21829set dummy $tool_basename; ac_word=$2
21830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21831$as_echo_n "checking for $ac_word... " >&6; }
21832if ${ac_cv_path_LDD+:} false; then :
21833  $as_echo_n "(cached) " >&6
21834else
21835  case $LDD in
21836  [\\/]* | ?:[\\/]*)
21837  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21838  ;;
21839  *)
21840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21841for as_dir in $PATH
21842do
21843  IFS=$as_save_IFS
21844  test -z "$as_dir" && as_dir=.
21845    for ac_exec_ext in '' $ac_executable_extensions; do
21846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21847    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21849    break 2
21850  fi
21851done
21852  done
21853IFS=$as_save_IFS
21854
21855  ;;
21856esac
21857fi
21858LDD=$ac_cv_path_LDD
21859if test -n "$LDD"; then
21860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21861$as_echo "$LDD" >&6; }
21862else
21863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21864$as_echo "no" >&6; }
21865fi
21866
21867
21868          if test "x$LDD" = x; then
21869            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21870          fi
21871        else
21872          # Otherwise we believe it is a complete path. Use it as it is.
21873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21874$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21875          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21876$as_echo_n "checking for LDD... " >&6; }
21877          if test ! -x "$tool_specified"; then
21878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21879$as_echo "not found" >&6; }
21880            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21881          fi
21882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21883$as_echo "$tool_specified" >&6; }
21884        fi
21885      fi
21886    fi
21887
21888  fi
21889
21890
21891  if test "x$LDD" = "x"; then
21892    # List shared lib dependencies is used for
21893    # debug output and checking for forbidden dependencies.
21894    # We can build without it.
21895    LDD="true"
21896  fi
21897
21898
21899  # Publish this variable in the help.
21900
21901
21902  if [ -z "${OTOOL+x}" ]; then
21903    # The variable is not set by user, try to locate tool using the code snippet
21904    for ac_prog in otool
21905do
21906  # Extract the first word of "$ac_prog", so it can be a program name with args.
21907set dummy $ac_prog; ac_word=$2
21908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21909$as_echo_n "checking for $ac_word... " >&6; }
21910if ${ac_cv_path_OTOOL+:} false; then :
21911  $as_echo_n "(cached) " >&6
21912else
21913  case $OTOOL in
21914  [\\/]* | ?:[\\/]*)
21915  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21916  ;;
21917  *)
21918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21919for as_dir in $PATH
21920do
21921  IFS=$as_save_IFS
21922  test -z "$as_dir" && as_dir=.
21923    for ac_exec_ext in '' $ac_executable_extensions; do
21924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21925    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21927    break 2
21928  fi
21929done
21930  done
21931IFS=$as_save_IFS
21932
21933  ;;
21934esac
21935fi
21936OTOOL=$ac_cv_path_OTOOL
21937if test -n "$OTOOL"; then
21938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21939$as_echo "$OTOOL" >&6; }
21940else
21941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21942$as_echo "no" >&6; }
21943fi
21944
21945
21946  test -n "$OTOOL" && break
21947done
21948
21949  else
21950    # The variable is set, but is it from the command line or the environment?
21951
21952    # Try to remove the string !OTOOL! from our list.
21953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21955      # If it failed, the variable was not from the command line. Ignore it,
21956      # but warn the user (except for BASH, which is always set by the calling BASH).
21957      if test "xOTOOL" != xBASH; then
21958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21959$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21960      fi
21961      # Try to locate tool using the code snippet
21962      for ac_prog in otool
21963do
21964  # Extract the first word of "$ac_prog", so it can be a program name with args.
21965set dummy $ac_prog; ac_word=$2
21966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21967$as_echo_n "checking for $ac_word... " >&6; }
21968if ${ac_cv_path_OTOOL+:} false; then :
21969  $as_echo_n "(cached) " >&6
21970else
21971  case $OTOOL in
21972  [\\/]* | ?:[\\/]*)
21973  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21974  ;;
21975  *)
21976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21977for as_dir in $PATH
21978do
21979  IFS=$as_save_IFS
21980  test -z "$as_dir" && as_dir=.
21981    for ac_exec_ext in '' $ac_executable_extensions; do
21982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21983    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21985    break 2
21986  fi
21987done
21988  done
21989IFS=$as_save_IFS
21990
21991  ;;
21992esac
21993fi
21994OTOOL=$ac_cv_path_OTOOL
21995if test -n "$OTOOL"; then
21996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21997$as_echo "$OTOOL" >&6; }
21998else
21999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22000$as_echo "no" >&6; }
22001fi
22002
22003
22004  test -n "$OTOOL" && break
22005done
22006
22007    else
22008      # If it succeeded, then it was overridden by the user. We will use it
22009      # for the tool.
22010
22011      # First remove it from the list of overridden variables, so we can test
22012      # for unknown variables in the end.
22013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22014
22015      # Check if we try to supply an empty value
22016      if test "x$OTOOL" = x; then
22017        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22018$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22020$as_echo_n "checking for OTOOL... " >&6; }
22021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22022$as_echo "disabled" >&6; }
22023      else
22024        # Check if the provided tool contains a complete path.
22025        tool_specified="$OTOOL"
22026        tool_basename="${tool_specified##*/}"
22027        if test "x$tool_basename" = "x$tool_specified"; then
22028          # A command without a complete path is provided, search $PATH.
22029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22030$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22031          # Extract the first word of "$tool_basename", so it can be a program name with args.
22032set dummy $tool_basename; ac_word=$2
22033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22034$as_echo_n "checking for $ac_word... " >&6; }
22035if ${ac_cv_path_OTOOL+:} false; then :
22036  $as_echo_n "(cached) " >&6
22037else
22038  case $OTOOL in
22039  [\\/]* | ?:[\\/]*)
22040  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22041  ;;
22042  *)
22043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22044for as_dir in $PATH
22045do
22046  IFS=$as_save_IFS
22047  test -z "$as_dir" && as_dir=.
22048    for ac_exec_ext in '' $ac_executable_extensions; do
22049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22050    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22052    break 2
22053  fi
22054done
22055  done
22056IFS=$as_save_IFS
22057
22058  ;;
22059esac
22060fi
22061OTOOL=$ac_cv_path_OTOOL
22062if test -n "$OTOOL"; then
22063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22064$as_echo "$OTOOL" >&6; }
22065else
22066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22067$as_echo "no" >&6; }
22068fi
22069
22070
22071          if test "x$OTOOL" = x; then
22072            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22073          fi
22074        else
22075          # Otherwise we believe it is a complete path. Use it as it is.
22076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22077$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22078          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22079$as_echo_n "checking for OTOOL... " >&6; }
22080          if test ! -x "$tool_specified"; then
22081            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22082$as_echo "not found" >&6; }
22083            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22084          fi
22085          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22086$as_echo "$tool_specified" >&6; }
22087        fi
22088      fi
22089    fi
22090
22091  fi
22092
22093
22094  if test "x$OTOOL" = "x"; then
22095    OTOOL="true"
22096  fi
22097
22098
22099  # Publish this variable in the help.
22100
22101
22102  if [ -z "${READELF+x}" ]; then
22103    # The variable is not set by user, try to locate tool using the code snippet
22104    for ac_prog in greadelf readelf
22105do
22106  # Extract the first word of "$ac_prog", so it can be a program name with args.
22107set dummy $ac_prog; ac_word=$2
22108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22109$as_echo_n "checking for $ac_word... " >&6; }
22110if ${ac_cv_path_READELF+:} false; then :
22111  $as_echo_n "(cached) " >&6
22112else
22113  case $READELF in
22114  [\\/]* | ?:[\\/]*)
22115  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22116  ;;
22117  *)
22118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22119for as_dir in $PATH
22120do
22121  IFS=$as_save_IFS
22122  test -z "$as_dir" && as_dir=.
22123    for ac_exec_ext in '' $ac_executable_extensions; do
22124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22125    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22127    break 2
22128  fi
22129done
22130  done
22131IFS=$as_save_IFS
22132
22133  ;;
22134esac
22135fi
22136READELF=$ac_cv_path_READELF
22137if test -n "$READELF"; then
22138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22139$as_echo "$READELF" >&6; }
22140else
22141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22142$as_echo "no" >&6; }
22143fi
22144
22145
22146  test -n "$READELF" && break
22147done
22148
22149  else
22150    # The variable is set, but is it from the command line or the environment?
22151
22152    # Try to remove the string !READELF! from our list.
22153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22155      # If it failed, the variable was not from the command line. Ignore it,
22156      # but warn the user (except for BASH, which is always set by the calling BASH).
22157      if test "xREADELF" != xBASH; then
22158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22159$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22160      fi
22161      # Try to locate tool using the code snippet
22162      for ac_prog in greadelf readelf
22163do
22164  # Extract the first word of "$ac_prog", so it can be a program name with args.
22165set dummy $ac_prog; ac_word=$2
22166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22167$as_echo_n "checking for $ac_word... " >&6; }
22168if ${ac_cv_path_READELF+:} false; then :
22169  $as_echo_n "(cached) " >&6
22170else
22171  case $READELF in
22172  [\\/]* | ?:[\\/]*)
22173  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22174  ;;
22175  *)
22176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22177for as_dir in $PATH
22178do
22179  IFS=$as_save_IFS
22180  test -z "$as_dir" && as_dir=.
22181    for ac_exec_ext in '' $ac_executable_extensions; do
22182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22183    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22185    break 2
22186  fi
22187done
22188  done
22189IFS=$as_save_IFS
22190
22191  ;;
22192esac
22193fi
22194READELF=$ac_cv_path_READELF
22195if test -n "$READELF"; then
22196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22197$as_echo "$READELF" >&6; }
22198else
22199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22200$as_echo "no" >&6; }
22201fi
22202
22203
22204  test -n "$READELF" && break
22205done
22206
22207    else
22208      # If it succeeded, then it was overridden by the user. We will use it
22209      # for the tool.
22210
22211      # First remove it from the list of overridden variables, so we can test
22212      # for unknown variables in the end.
22213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22214
22215      # Check if we try to supply an empty value
22216      if test "x$READELF" = x; then
22217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22218$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22220$as_echo_n "checking for READELF... " >&6; }
22221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22222$as_echo "disabled" >&6; }
22223      else
22224        # Check if the provided tool contains a complete path.
22225        tool_specified="$READELF"
22226        tool_basename="${tool_specified##*/}"
22227        if test "x$tool_basename" = "x$tool_specified"; then
22228          # A command without a complete path is provided, search $PATH.
22229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22230$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22231          # Extract the first word of "$tool_basename", so it can be a program name with args.
22232set dummy $tool_basename; ac_word=$2
22233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22234$as_echo_n "checking for $ac_word... " >&6; }
22235if ${ac_cv_path_READELF+:} false; then :
22236  $as_echo_n "(cached) " >&6
22237else
22238  case $READELF in
22239  [\\/]* | ?:[\\/]*)
22240  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22241  ;;
22242  *)
22243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22244for as_dir in $PATH
22245do
22246  IFS=$as_save_IFS
22247  test -z "$as_dir" && as_dir=.
22248    for ac_exec_ext in '' $ac_executable_extensions; do
22249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22250    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22252    break 2
22253  fi
22254done
22255  done
22256IFS=$as_save_IFS
22257
22258  ;;
22259esac
22260fi
22261READELF=$ac_cv_path_READELF
22262if test -n "$READELF"; then
22263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22264$as_echo "$READELF" >&6; }
22265else
22266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22267$as_echo "no" >&6; }
22268fi
22269
22270
22271          if test "x$READELF" = x; then
22272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22273          fi
22274        else
22275          # Otherwise we believe it is a complete path. Use it as it is.
22276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22277$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22279$as_echo_n "checking for READELF... " >&6; }
22280          if test ! -x "$tool_specified"; then
22281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22282$as_echo "not found" >&6; }
22283            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22284          fi
22285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22286$as_echo "$tool_specified" >&6; }
22287        fi
22288      fi
22289    fi
22290
22291  fi
22292
22293
22294
22295
22296  # Publish this variable in the help.
22297
22298
22299  if [ -z "${HG+x}" ]; then
22300    # The variable is not set by user, try to locate tool using the code snippet
22301    for ac_prog in hg
22302do
22303  # Extract the first word of "$ac_prog", so it can be a program name with args.
22304set dummy $ac_prog; ac_word=$2
22305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22306$as_echo_n "checking for $ac_word... " >&6; }
22307if ${ac_cv_path_HG+:} false; then :
22308  $as_echo_n "(cached) " >&6
22309else
22310  case $HG in
22311  [\\/]* | ?:[\\/]*)
22312  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22313  ;;
22314  *)
22315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22316for as_dir in $PATH
22317do
22318  IFS=$as_save_IFS
22319  test -z "$as_dir" && as_dir=.
22320    for ac_exec_ext in '' $ac_executable_extensions; do
22321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22322    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22324    break 2
22325  fi
22326done
22327  done
22328IFS=$as_save_IFS
22329
22330  ;;
22331esac
22332fi
22333HG=$ac_cv_path_HG
22334if test -n "$HG"; then
22335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22336$as_echo "$HG" >&6; }
22337else
22338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22339$as_echo "no" >&6; }
22340fi
22341
22342
22343  test -n "$HG" && break
22344done
22345
22346  else
22347    # The variable is set, but is it from the command line or the environment?
22348
22349    # Try to remove the string !HG! from our list.
22350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22352      # If it failed, the variable was not from the command line. Ignore it,
22353      # but warn the user (except for BASH, which is always set by the calling BASH).
22354      if test "xHG" != xBASH; then
22355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22356$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22357      fi
22358      # Try to locate tool using the code snippet
22359      for ac_prog in hg
22360do
22361  # Extract the first word of "$ac_prog", so it can be a program name with args.
22362set dummy $ac_prog; ac_word=$2
22363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22364$as_echo_n "checking for $ac_word... " >&6; }
22365if ${ac_cv_path_HG+:} false; then :
22366  $as_echo_n "(cached) " >&6
22367else
22368  case $HG in
22369  [\\/]* | ?:[\\/]*)
22370  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22371  ;;
22372  *)
22373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22374for as_dir in $PATH
22375do
22376  IFS=$as_save_IFS
22377  test -z "$as_dir" && as_dir=.
22378    for ac_exec_ext in '' $ac_executable_extensions; do
22379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22380    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22382    break 2
22383  fi
22384done
22385  done
22386IFS=$as_save_IFS
22387
22388  ;;
22389esac
22390fi
22391HG=$ac_cv_path_HG
22392if test -n "$HG"; then
22393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22394$as_echo "$HG" >&6; }
22395else
22396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22397$as_echo "no" >&6; }
22398fi
22399
22400
22401  test -n "$HG" && break
22402done
22403
22404    else
22405      # If it succeeded, then it was overridden by the user. We will use it
22406      # for the tool.
22407
22408      # First remove it from the list of overridden variables, so we can test
22409      # for unknown variables in the end.
22410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22411
22412      # Check if we try to supply an empty value
22413      if test "x$HG" = x; then
22414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22415$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22417$as_echo_n "checking for HG... " >&6; }
22418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22419$as_echo "disabled" >&6; }
22420      else
22421        # Check if the provided tool contains a complete path.
22422        tool_specified="$HG"
22423        tool_basename="${tool_specified##*/}"
22424        if test "x$tool_basename" = "x$tool_specified"; then
22425          # A command without a complete path is provided, search $PATH.
22426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22427$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22428          # Extract the first word of "$tool_basename", so it can be a program name with args.
22429set dummy $tool_basename; ac_word=$2
22430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22431$as_echo_n "checking for $ac_word... " >&6; }
22432if ${ac_cv_path_HG+:} false; then :
22433  $as_echo_n "(cached) " >&6
22434else
22435  case $HG in
22436  [\\/]* | ?:[\\/]*)
22437  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22438  ;;
22439  *)
22440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22441for as_dir in $PATH
22442do
22443  IFS=$as_save_IFS
22444  test -z "$as_dir" && as_dir=.
22445    for ac_exec_ext in '' $ac_executable_extensions; do
22446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22447    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22449    break 2
22450  fi
22451done
22452  done
22453IFS=$as_save_IFS
22454
22455  ;;
22456esac
22457fi
22458HG=$ac_cv_path_HG
22459if test -n "$HG"; then
22460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22461$as_echo "$HG" >&6; }
22462else
22463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22464$as_echo "no" >&6; }
22465fi
22466
22467
22468          if test "x$HG" = x; then
22469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22470          fi
22471        else
22472          # Otherwise we believe it is a complete path. Use it as it is.
22473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22474$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22476$as_echo_n "checking for HG... " >&6; }
22477          if test ! -x "$tool_specified"; then
22478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22479$as_echo "not found" >&6; }
22480            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22481          fi
22482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22483$as_echo "$tool_specified" >&6; }
22484        fi
22485      fi
22486    fi
22487
22488  fi
22489
22490
22491
22492
22493  # Publish this variable in the help.
22494
22495
22496  if [ -z "${STAT+x}" ]; then
22497    # The variable is not set by user, try to locate tool using the code snippet
22498    for ac_prog in stat
22499do
22500  # Extract the first word of "$ac_prog", so it can be a program name with args.
22501set dummy $ac_prog; ac_word=$2
22502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22503$as_echo_n "checking for $ac_word... " >&6; }
22504if ${ac_cv_path_STAT+:} false; then :
22505  $as_echo_n "(cached) " >&6
22506else
22507  case $STAT in
22508  [\\/]* | ?:[\\/]*)
22509  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22510  ;;
22511  *)
22512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22513for as_dir in $PATH
22514do
22515  IFS=$as_save_IFS
22516  test -z "$as_dir" && as_dir=.
22517    for ac_exec_ext in '' $ac_executable_extensions; do
22518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22519    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22521    break 2
22522  fi
22523done
22524  done
22525IFS=$as_save_IFS
22526
22527  ;;
22528esac
22529fi
22530STAT=$ac_cv_path_STAT
22531if test -n "$STAT"; then
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22533$as_echo "$STAT" >&6; }
22534else
22535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22536$as_echo "no" >&6; }
22537fi
22538
22539
22540  test -n "$STAT" && break
22541done
22542
22543  else
22544    # The variable is set, but is it from the command line or the environment?
22545
22546    # Try to remove the string !STAT! from our list.
22547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22549      # If it failed, the variable was not from the command line. Ignore it,
22550      # but warn the user (except for BASH, which is always set by the calling BASH).
22551      if test "xSTAT" != xBASH; then
22552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22553$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22554      fi
22555      # Try to locate tool using the code snippet
22556      for ac_prog in stat
22557do
22558  # Extract the first word of "$ac_prog", so it can be a program name with args.
22559set dummy $ac_prog; ac_word=$2
22560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22561$as_echo_n "checking for $ac_word... " >&6; }
22562if ${ac_cv_path_STAT+:} false; then :
22563  $as_echo_n "(cached) " >&6
22564else
22565  case $STAT in
22566  [\\/]* | ?:[\\/]*)
22567  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22568  ;;
22569  *)
22570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22571for as_dir in $PATH
22572do
22573  IFS=$as_save_IFS
22574  test -z "$as_dir" && as_dir=.
22575    for ac_exec_ext in '' $ac_executable_extensions; do
22576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22577    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22579    break 2
22580  fi
22581done
22582  done
22583IFS=$as_save_IFS
22584
22585  ;;
22586esac
22587fi
22588STAT=$ac_cv_path_STAT
22589if test -n "$STAT"; then
22590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22591$as_echo "$STAT" >&6; }
22592else
22593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22594$as_echo "no" >&6; }
22595fi
22596
22597
22598  test -n "$STAT" && break
22599done
22600
22601    else
22602      # If it succeeded, then it was overridden by the user. We will use it
22603      # for the tool.
22604
22605      # First remove it from the list of overridden variables, so we can test
22606      # for unknown variables in the end.
22607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22608
22609      # Check if we try to supply an empty value
22610      if test "x$STAT" = x; then
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22612$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22614$as_echo_n "checking for STAT... " >&6; }
22615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22616$as_echo "disabled" >&6; }
22617      else
22618        # Check if the provided tool contains a complete path.
22619        tool_specified="$STAT"
22620        tool_basename="${tool_specified##*/}"
22621        if test "x$tool_basename" = "x$tool_specified"; then
22622          # A command without a complete path is provided, search $PATH.
22623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22624$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22625          # Extract the first word of "$tool_basename", so it can be a program name with args.
22626set dummy $tool_basename; ac_word=$2
22627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22628$as_echo_n "checking for $ac_word... " >&6; }
22629if ${ac_cv_path_STAT+:} false; then :
22630  $as_echo_n "(cached) " >&6
22631else
22632  case $STAT in
22633  [\\/]* | ?:[\\/]*)
22634  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22635  ;;
22636  *)
22637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22638for as_dir in $PATH
22639do
22640  IFS=$as_save_IFS
22641  test -z "$as_dir" && as_dir=.
22642    for ac_exec_ext in '' $ac_executable_extensions; do
22643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22644    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22646    break 2
22647  fi
22648done
22649  done
22650IFS=$as_save_IFS
22651
22652  ;;
22653esac
22654fi
22655STAT=$ac_cv_path_STAT
22656if test -n "$STAT"; then
22657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22658$as_echo "$STAT" >&6; }
22659else
22660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22661$as_echo "no" >&6; }
22662fi
22663
22664
22665          if test "x$STAT" = x; then
22666            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22667          fi
22668        else
22669          # Otherwise we believe it is a complete path. Use it as it is.
22670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22671$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22672          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22673$as_echo_n "checking for STAT... " >&6; }
22674          if test ! -x "$tool_specified"; then
22675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22676$as_echo "not found" >&6; }
22677            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22678          fi
22679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22680$as_echo "$tool_specified" >&6; }
22681        fi
22682      fi
22683    fi
22684
22685  fi
22686
22687
22688
22689
22690  # Publish this variable in the help.
22691
22692
22693  if [ -z "${TIME+x}" ]; then
22694    # The variable is not set by user, try to locate tool using the code snippet
22695    for ac_prog in time
22696do
22697  # Extract the first word of "$ac_prog", so it can be a program name with args.
22698set dummy $ac_prog; ac_word=$2
22699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22700$as_echo_n "checking for $ac_word... " >&6; }
22701if ${ac_cv_path_TIME+:} false; then :
22702  $as_echo_n "(cached) " >&6
22703else
22704  case $TIME in
22705  [\\/]* | ?:[\\/]*)
22706  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22707  ;;
22708  *)
22709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22710for as_dir in $PATH
22711do
22712  IFS=$as_save_IFS
22713  test -z "$as_dir" && as_dir=.
22714    for ac_exec_ext in '' $ac_executable_extensions; do
22715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22716    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22718    break 2
22719  fi
22720done
22721  done
22722IFS=$as_save_IFS
22723
22724  ;;
22725esac
22726fi
22727TIME=$ac_cv_path_TIME
22728if test -n "$TIME"; then
22729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22730$as_echo "$TIME" >&6; }
22731else
22732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22733$as_echo "no" >&6; }
22734fi
22735
22736
22737  test -n "$TIME" && break
22738done
22739
22740  else
22741    # The variable is set, but is it from the command line or the environment?
22742
22743    # Try to remove the string !TIME! from our list.
22744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22746      # If it failed, the variable was not from the command line. Ignore it,
22747      # but warn the user (except for BASH, which is always set by the calling BASH).
22748      if test "xTIME" != xBASH; then
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22750$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22751      fi
22752      # Try to locate tool using the code snippet
22753      for ac_prog in time
22754do
22755  # Extract the first word of "$ac_prog", so it can be a program name with args.
22756set dummy $ac_prog; ac_word=$2
22757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22758$as_echo_n "checking for $ac_word... " >&6; }
22759if ${ac_cv_path_TIME+:} false; then :
22760  $as_echo_n "(cached) " >&6
22761else
22762  case $TIME in
22763  [\\/]* | ?:[\\/]*)
22764  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22765  ;;
22766  *)
22767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22768for as_dir in $PATH
22769do
22770  IFS=$as_save_IFS
22771  test -z "$as_dir" && as_dir=.
22772    for ac_exec_ext in '' $ac_executable_extensions; do
22773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22774    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22776    break 2
22777  fi
22778done
22779  done
22780IFS=$as_save_IFS
22781
22782  ;;
22783esac
22784fi
22785TIME=$ac_cv_path_TIME
22786if test -n "$TIME"; then
22787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22788$as_echo "$TIME" >&6; }
22789else
22790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22791$as_echo "no" >&6; }
22792fi
22793
22794
22795  test -n "$TIME" && break
22796done
22797
22798    else
22799      # If it succeeded, then it was overridden by the user. We will use it
22800      # for the tool.
22801
22802      # First remove it from the list of overridden variables, so we can test
22803      # for unknown variables in the end.
22804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22805
22806      # Check if we try to supply an empty value
22807      if test "x$TIME" = x; then
22808        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22809$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22811$as_echo_n "checking for TIME... " >&6; }
22812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22813$as_echo "disabled" >&6; }
22814      else
22815        # Check if the provided tool contains a complete path.
22816        tool_specified="$TIME"
22817        tool_basename="${tool_specified##*/}"
22818        if test "x$tool_basename" = "x$tool_specified"; then
22819          # A command without a complete path is provided, search $PATH.
22820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22821$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22822          # Extract the first word of "$tool_basename", so it can be a program name with args.
22823set dummy $tool_basename; ac_word=$2
22824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22825$as_echo_n "checking for $ac_word... " >&6; }
22826if ${ac_cv_path_TIME+:} false; then :
22827  $as_echo_n "(cached) " >&6
22828else
22829  case $TIME in
22830  [\\/]* | ?:[\\/]*)
22831  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22832  ;;
22833  *)
22834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22835for as_dir in $PATH
22836do
22837  IFS=$as_save_IFS
22838  test -z "$as_dir" && as_dir=.
22839    for ac_exec_ext in '' $ac_executable_extensions; do
22840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22841    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22843    break 2
22844  fi
22845done
22846  done
22847IFS=$as_save_IFS
22848
22849  ;;
22850esac
22851fi
22852TIME=$ac_cv_path_TIME
22853if test -n "$TIME"; then
22854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22855$as_echo "$TIME" >&6; }
22856else
22857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22858$as_echo "no" >&6; }
22859fi
22860
22861
22862          if test "x$TIME" = x; then
22863            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22864          fi
22865        else
22866          # Otherwise we believe it is a complete path. Use it as it is.
22867          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22868$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22869          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22870$as_echo_n "checking for TIME... " >&6; }
22871          if test ! -x "$tool_specified"; then
22872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22873$as_echo "not found" >&6; }
22874            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22875          fi
22876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22877$as_echo "$tool_specified" >&6; }
22878        fi
22879      fi
22880    fi
22881
22882  fi
22883
22884
22885  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22886  # be in the user path.
22887
22888
22889  # Publish this variable in the help.
22890
22891
22892  if [ -z "${DTRACE+x}" ]; then
22893    # The variable is not set by user, try to locate tool using the code snippet
22894    for ac_prog in dtrace
22895do
22896  # Extract the first word of "$ac_prog", so it can be a program name with args.
22897set dummy $ac_prog; ac_word=$2
22898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22899$as_echo_n "checking for $ac_word... " >&6; }
22900if ${ac_cv_path_DTRACE+:} false; then :
22901  $as_echo_n "(cached) " >&6
22902else
22903  case $DTRACE in
22904  [\\/]* | ?:[\\/]*)
22905  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22906  ;;
22907  *)
22908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22909as_dummy="$PATH:/usr/sbin"
22910for as_dir in $as_dummy
22911do
22912  IFS=$as_save_IFS
22913  test -z "$as_dir" && as_dir=.
22914    for ac_exec_ext in '' $ac_executable_extensions; do
22915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22916    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22918    break 2
22919  fi
22920done
22921  done
22922IFS=$as_save_IFS
22923
22924  ;;
22925esac
22926fi
22927DTRACE=$ac_cv_path_DTRACE
22928if test -n "$DTRACE"; then
22929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22930$as_echo "$DTRACE" >&6; }
22931else
22932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22933$as_echo "no" >&6; }
22934fi
22935
22936
22937  test -n "$DTRACE" && break
22938done
22939
22940  else
22941    # The variable is set, but is it from the command line or the environment?
22942
22943    # Try to remove the string !DTRACE! from our list.
22944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22946      # If it failed, the variable was not from the command line. Ignore it,
22947      # but warn the user (except for BASH, which is always set by the calling BASH).
22948      if test "xDTRACE" != xBASH; then
22949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22950$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22951      fi
22952      # Try to locate tool using the code snippet
22953      for ac_prog in dtrace
22954do
22955  # Extract the first word of "$ac_prog", so it can be a program name with args.
22956set dummy $ac_prog; ac_word=$2
22957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22958$as_echo_n "checking for $ac_word... " >&6; }
22959if ${ac_cv_path_DTRACE+:} false; then :
22960  $as_echo_n "(cached) " >&6
22961else
22962  case $DTRACE in
22963  [\\/]* | ?:[\\/]*)
22964  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22965  ;;
22966  *)
22967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22968as_dummy="$PATH:/usr/sbin"
22969for as_dir in $as_dummy
22970do
22971  IFS=$as_save_IFS
22972  test -z "$as_dir" && as_dir=.
22973    for ac_exec_ext in '' $ac_executable_extensions; do
22974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22975    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22977    break 2
22978  fi
22979done
22980  done
22981IFS=$as_save_IFS
22982
22983  ;;
22984esac
22985fi
22986DTRACE=$ac_cv_path_DTRACE
22987if test -n "$DTRACE"; then
22988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22989$as_echo "$DTRACE" >&6; }
22990else
22991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22992$as_echo "no" >&6; }
22993fi
22994
22995
22996  test -n "$DTRACE" && break
22997done
22998
22999    else
23000      # If it succeeded, then it was overridden by the user. We will use it
23001      # for the tool.
23002
23003      # First remove it from the list of overridden variables, so we can test
23004      # for unknown variables in the end.
23005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23006
23007      # Check if we try to supply an empty value
23008      if test "x$DTRACE" = x; then
23009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23010$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23012$as_echo_n "checking for DTRACE... " >&6; }
23013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23014$as_echo "disabled" >&6; }
23015      else
23016        # Check if the provided tool contains a complete path.
23017        tool_specified="$DTRACE"
23018        tool_basename="${tool_specified##*/}"
23019        if test "x$tool_basename" = "x$tool_specified"; then
23020          # A command without a complete path is provided, search $PATH.
23021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23022$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23023          # Extract the first word of "$tool_basename", so it can be a program name with args.
23024set dummy $tool_basename; ac_word=$2
23025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23026$as_echo_n "checking for $ac_word... " >&6; }
23027if ${ac_cv_path_DTRACE+:} false; then :
23028  $as_echo_n "(cached) " >&6
23029else
23030  case $DTRACE in
23031  [\\/]* | ?:[\\/]*)
23032  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23033  ;;
23034  *)
23035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23036for as_dir in $PATH
23037do
23038  IFS=$as_save_IFS
23039  test -z "$as_dir" && as_dir=.
23040    for ac_exec_ext in '' $ac_executable_extensions; do
23041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23042    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23044    break 2
23045  fi
23046done
23047  done
23048IFS=$as_save_IFS
23049
23050  ;;
23051esac
23052fi
23053DTRACE=$ac_cv_path_DTRACE
23054if test -n "$DTRACE"; then
23055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23056$as_echo "$DTRACE" >&6; }
23057else
23058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23059$as_echo "no" >&6; }
23060fi
23061
23062
23063          if test "x$DTRACE" = x; then
23064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23065          fi
23066        else
23067          # Otherwise we believe it is a complete path. Use it as it is.
23068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23069$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23071$as_echo_n "checking for DTRACE... " >&6; }
23072          if test ! -x "$tool_specified"; then
23073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23074$as_echo "not found" >&6; }
23075            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23076          fi
23077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23078$as_echo "$tool_specified" >&6; }
23079        fi
23080      fi
23081    fi
23082
23083  fi
23084
23085
23086
23087
23088  # Publish this variable in the help.
23089
23090
23091  if [ -z "${PATCH+x}" ]; then
23092    # The variable is not set by user, try to locate tool using the code snippet
23093    for ac_prog in gpatch patch
23094do
23095  # Extract the first word of "$ac_prog", so it can be a program name with args.
23096set dummy $ac_prog; ac_word=$2
23097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23098$as_echo_n "checking for $ac_word... " >&6; }
23099if ${ac_cv_path_PATCH+:} false; then :
23100  $as_echo_n "(cached) " >&6
23101else
23102  case $PATCH in
23103  [\\/]* | ?:[\\/]*)
23104  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23105  ;;
23106  *)
23107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23108for as_dir in $PATH
23109do
23110  IFS=$as_save_IFS
23111  test -z "$as_dir" && as_dir=.
23112    for ac_exec_ext in '' $ac_executable_extensions; do
23113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23114    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23116    break 2
23117  fi
23118done
23119  done
23120IFS=$as_save_IFS
23121
23122  ;;
23123esac
23124fi
23125PATCH=$ac_cv_path_PATCH
23126if test -n "$PATCH"; then
23127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23128$as_echo "$PATCH" >&6; }
23129else
23130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23131$as_echo "no" >&6; }
23132fi
23133
23134
23135  test -n "$PATCH" && break
23136done
23137
23138  else
23139    # The variable is set, but is it from the command line or the environment?
23140
23141    # Try to remove the string !PATCH! from our list.
23142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23144      # If it failed, the variable was not from the command line. Ignore it,
23145      # but warn the user (except for BASH, which is always set by the calling BASH).
23146      if test "xPATCH" != xBASH; then
23147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23148$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23149      fi
23150      # Try to locate tool using the code snippet
23151      for ac_prog in gpatch patch
23152do
23153  # Extract the first word of "$ac_prog", so it can be a program name with args.
23154set dummy $ac_prog; ac_word=$2
23155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23156$as_echo_n "checking for $ac_word... " >&6; }
23157if ${ac_cv_path_PATCH+:} false; then :
23158  $as_echo_n "(cached) " >&6
23159else
23160  case $PATCH in
23161  [\\/]* | ?:[\\/]*)
23162  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23163  ;;
23164  *)
23165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23166for as_dir in $PATH
23167do
23168  IFS=$as_save_IFS
23169  test -z "$as_dir" && as_dir=.
23170    for ac_exec_ext in '' $ac_executable_extensions; do
23171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23172    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23174    break 2
23175  fi
23176done
23177  done
23178IFS=$as_save_IFS
23179
23180  ;;
23181esac
23182fi
23183PATCH=$ac_cv_path_PATCH
23184if test -n "$PATCH"; then
23185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23186$as_echo "$PATCH" >&6; }
23187else
23188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23189$as_echo "no" >&6; }
23190fi
23191
23192
23193  test -n "$PATCH" && break
23194done
23195
23196    else
23197      # If it succeeded, then it was overridden by the user. We will use it
23198      # for the tool.
23199
23200      # First remove it from the list of overridden variables, so we can test
23201      # for unknown variables in the end.
23202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23203
23204      # Check if we try to supply an empty value
23205      if test "x$PATCH" = x; then
23206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23207$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23209$as_echo_n "checking for PATCH... " >&6; }
23210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23211$as_echo "disabled" >&6; }
23212      else
23213        # Check if the provided tool contains a complete path.
23214        tool_specified="$PATCH"
23215        tool_basename="${tool_specified##*/}"
23216        if test "x$tool_basename" = "x$tool_specified"; then
23217          # A command without a complete path is provided, search $PATH.
23218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23219$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23220          # Extract the first word of "$tool_basename", so it can be a program name with args.
23221set dummy $tool_basename; ac_word=$2
23222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23223$as_echo_n "checking for $ac_word... " >&6; }
23224if ${ac_cv_path_PATCH+:} false; then :
23225  $as_echo_n "(cached) " >&6
23226else
23227  case $PATCH in
23228  [\\/]* | ?:[\\/]*)
23229  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23230  ;;
23231  *)
23232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23233for as_dir in $PATH
23234do
23235  IFS=$as_save_IFS
23236  test -z "$as_dir" && as_dir=.
23237    for ac_exec_ext in '' $ac_executable_extensions; do
23238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23239    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23241    break 2
23242  fi
23243done
23244  done
23245IFS=$as_save_IFS
23246
23247  ;;
23248esac
23249fi
23250PATCH=$ac_cv_path_PATCH
23251if test -n "$PATCH"; then
23252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23253$as_echo "$PATCH" >&6; }
23254else
23255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23256$as_echo "no" >&6; }
23257fi
23258
23259
23260          if test "x$PATCH" = x; then
23261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23262          fi
23263        else
23264          # Otherwise we believe it is a complete path. Use it as it is.
23265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23266$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23268$as_echo_n "checking for PATCH... " >&6; }
23269          if test ! -x "$tool_specified"; then
23270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23271$as_echo "not found" >&6; }
23272            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23273          fi
23274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23275$as_echo "$tool_specified" >&6; }
23276        fi
23277      fi
23278    fi
23279
23280  fi
23281
23282
23283  # Check if it's GNU time
23284  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23285  if test "x$IS_GNU_TIME" != x; then
23286    IS_GNU_TIME=yes
23287  else
23288    IS_GNU_TIME=no
23289  fi
23290
23291
23292  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23293
23294
23295
23296  # Publish this variable in the help.
23297
23298
23299  if [ -z "${DSYMUTIL+x}" ]; then
23300    # The variable is not set by user, try to locate tool using the code snippet
23301    for ac_prog in dsymutil
23302do
23303  # Extract the first word of "$ac_prog", so it can be a program name with args.
23304set dummy $ac_prog; ac_word=$2
23305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23306$as_echo_n "checking for $ac_word... " >&6; }
23307if ${ac_cv_path_DSYMUTIL+:} false; then :
23308  $as_echo_n "(cached) " >&6
23309else
23310  case $DSYMUTIL in
23311  [\\/]* | ?:[\\/]*)
23312  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23313  ;;
23314  *)
23315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23316for as_dir in $PATH
23317do
23318  IFS=$as_save_IFS
23319  test -z "$as_dir" && as_dir=.
23320    for ac_exec_ext in '' $ac_executable_extensions; do
23321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23322    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23324    break 2
23325  fi
23326done
23327  done
23328IFS=$as_save_IFS
23329
23330  ;;
23331esac
23332fi
23333DSYMUTIL=$ac_cv_path_DSYMUTIL
23334if test -n "$DSYMUTIL"; then
23335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23336$as_echo "$DSYMUTIL" >&6; }
23337else
23338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23339$as_echo "no" >&6; }
23340fi
23341
23342
23343  test -n "$DSYMUTIL" && break
23344done
23345
23346  else
23347    # The variable is set, but is it from the command line or the environment?
23348
23349    # Try to remove the string !DSYMUTIL! from our list.
23350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23352      # If it failed, the variable was not from the command line. Ignore it,
23353      # but warn the user (except for BASH, which is always set by the calling BASH).
23354      if test "xDSYMUTIL" != xBASH; then
23355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23356$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23357      fi
23358      # Try to locate tool using the code snippet
23359      for ac_prog in dsymutil
23360do
23361  # Extract the first word of "$ac_prog", so it can be a program name with args.
23362set dummy $ac_prog; ac_word=$2
23363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23364$as_echo_n "checking for $ac_word... " >&6; }
23365if ${ac_cv_path_DSYMUTIL+:} false; then :
23366  $as_echo_n "(cached) " >&6
23367else
23368  case $DSYMUTIL in
23369  [\\/]* | ?:[\\/]*)
23370  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23371  ;;
23372  *)
23373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23374for as_dir in $PATH
23375do
23376  IFS=$as_save_IFS
23377  test -z "$as_dir" && as_dir=.
23378    for ac_exec_ext in '' $ac_executable_extensions; do
23379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23380    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23382    break 2
23383  fi
23384done
23385  done
23386IFS=$as_save_IFS
23387
23388  ;;
23389esac
23390fi
23391DSYMUTIL=$ac_cv_path_DSYMUTIL
23392if test -n "$DSYMUTIL"; then
23393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23394$as_echo "$DSYMUTIL" >&6; }
23395else
23396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23397$as_echo "no" >&6; }
23398fi
23399
23400
23401  test -n "$DSYMUTIL" && break
23402done
23403
23404    else
23405      # If it succeeded, then it was overridden by the user. We will use it
23406      # for the tool.
23407
23408      # First remove it from the list of overridden variables, so we can test
23409      # for unknown variables in the end.
23410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23411
23412      # Check if we try to supply an empty value
23413      if test "x$DSYMUTIL" = x; then
23414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23415$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23417$as_echo_n "checking for DSYMUTIL... " >&6; }
23418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23419$as_echo "disabled" >&6; }
23420      else
23421        # Check if the provided tool contains a complete path.
23422        tool_specified="$DSYMUTIL"
23423        tool_basename="${tool_specified##*/}"
23424        if test "x$tool_basename" = "x$tool_specified"; then
23425          # A command without a complete path is provided, search $PATH.
23426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23427$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23428          # Extract the first word of "$tool_basename", so it can be a program name with args.
23429set dummy $tool_basename; ac_word=$2
23430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23431$as_echo_n "checking for $ac_word... " >&6; }
23432if ${ac_cv_path_DSYMUTIL+:} false; then :
23433  $as_echo_n "(cached) " >&6
23434else
23435  case $DSYMUTIL in
23436  [\\/]* | ?:[\\/]*)
23437  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23438  ;;
23439  *)
23440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23441for as_dir in $PATH
23442do
23443  IFS=$as_save_IFS
23444  test -z "$as_dir" && as_dir=.
23445    for ac_exec_ext in '' $ac_executable_extensions; do
23446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23447    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23449    break 2
23450  fi
23451done
23452  done
23453IFS=$as_save_IFS
23454
23455  ;;
23456esac
23457fi
23458DSYMUTIL=$ac_cv_path_DSYMUTIL
23459if test -n "$DSYMUTIL"; then
23460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23461$as_echo "$DSYMUTIL" >&6; }
23462else
23463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23464$as_echo "no" >&6; }
23465fi
23466
23467
23468          if test "x$DSYMUTIL" = x; then
23469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23470          fi
23471        else
23472          # Otherwise we believe it is a complete path. Use it as it is.
23473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23474$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23476$as_echo_n "checking for DSYMUTIL... " >&6; }
23477          if test ! -x "$tool_specified"; then
23478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23479$as_echo "not found" >&6; }
23480            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23481          fi
23482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23483$as_echo "$tool_specified" >&6; }
23484        fi
23485      fi
23486    fi
23487
23488  fi
23489
23490
23491
23492  if test "x$DSYMUTIL" = x; then
23493    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23494  fi
23495
23496
23497
23498
23499
23500  # Publish this variable in the help.
23501
23502
23503  if [ -z "${XATTR+x}" ]; then
23504    # The variable is not set by user, try to locate tool using the code snippet
23505    for ac_prog in xattr
23506do
23507  # Extract the first word of "$ac_prog", so it can be a program name with args.
23508set dummy $ac_prog; ac_word=$2
23509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23510$as_echo_n "checking for $ac_word... " >&6; }
23511if ${ac_cv_path_XATTR+:} false; then :
23512  $as_echo_n "(cached) " >&6
23513else
23514  case $XATTR in
23515  [\\/]* | ?:[\\/]*)
23516  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23517  ;;
23518  *)
23519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23520for as_dir in $PATH
23521do
23522  IFS=$as_save_IFS
23523  test -z "$as_dir" && as_dir=.
23524    for ac_exec_ext in '' $ac_executable_extensions; do
23525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23526    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23528    break 2
23529  fi
23530done
23531  done
23532IFS=$as_save_IFS
23533
23534  ;;
23535esac
23536fi
23537XATTR=$ac_cv_path_XATTR
23538if test -n "$XATTR"; then
23539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23540$as_echo "$XATTR" >&6; }
23541else
23542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23543$as_echo "no" >&6; }
23544fi
23545
23546
23547  test -n "$XATTR" && break
23548done
23549
23550  else
23551    # The variable is set, but is it from the command line or the environment?
23552
23553    # Try to remove the string !XATTR! from our list.
23554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23556      # If it failed, the variable was not from the command line. Ignore it,
23557      # but warn the user (except for BASH, which is always set by the calling BASH).
23558      if test "xXATTR" != xBASH; then
23559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23560$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23561      fi
23562      # Try to locate tool using the code snippet
23563      for ac_prog in xattr
23564do
23565  # Extract the first word of "$ac_prog", so it can be a program name with args.
23566set dummy $ac_prog; ac_word=$2
23567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23568$as_echo_n "checking for $ac_word... " >&6; }
23569if ${ac_cv_path_XATTR+:} false; then :
23570  $as_echo_n "(cached) " >&6
23571else
23572  case $XATTR in
23573  [\\/]* | ?:[\\/]*)
23574  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23575  ;;
23576  *)
23577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23578for as_dir in $PATH
23579do
23580  IFS=$as_save_IFS
23581  test -z "$as_dir" && as_dir=.
23582    for ac_exec_ext in '' $ac_executable_extensions; do
23583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23584    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23586    break 2
23587  fi
23588done
23589  done
23590IFS=$as_save_IFS
23591
23592  ;;
23593esac
23594fi
23595XATTR=$ac_cv_path_XATTR
23596if test -n "$XATTR"; then
23597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23598$as_echo "$XATTR" >&6; }
23599else
23600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23601$as_echo "no" >&6; }
23602fi
23603
23604
23605  test -n "$XATTR" && break
23606done
23607
23608    else
23609      # If it succeeded, then it was overridden by the user. We will use it
23610      # for the tool.
23611
23612      # First remove it from the list of overridden variables, so we can test
23613      # for unknown variables in the end.
23614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23615
23616      # Check if we try to supply an empty value
23617      if test "x$XATTR" = x; then
23618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23619$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23621$as_echo_n "checking for XATTR... " >&6; }
23622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23623$as_echo "disabled" >&6; }
23624      else
23625        # Check if the provided tool contains a complete path.
23626        tool_specified="$XATTR"
23627        tool_basename="${tool_specified##*/}"
23628        if test "x$tool_basename" = "x$tool_specified"; then
23629          # A command without a complete path is provided, search $PATH.
23630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23631$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23632          # Extract the first word of "$tool_basename", so it can be a program name with args.
23633set dummy $tool_basename; ac_word=$2
23634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23635$as_echo_n "checking for $ac_word... " >&6; }
23636if ${ac_cv_path_XATTR+:} false; then :
23637  $as_echo_n "(cached) " >&6
23638else
23639  case $XATTR in
23640  [\\/]* | ?:[\\/]*)
23641  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23642  ;;
23643  *)
23644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23645for as_dir in $PATH
23646do
23647  IFS=$as_save_IFS
23648  test -z "$as_dir" && as_dir=.
23649    for ac_exec_ext in '' $ac_executable_extensions; do
23650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23651    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23653    break 2
23654  fi
23655done
23656  done
23657IFS=$as_save_IFS
23658
23659  ;;
23660esac
23661fi
23662XATTR=$ac_cv_path_XATTR
23663if test -n "$XATTR"; then
23664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23665$as_echo "$XATTR" >&6; }
23666else
23667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23668$as_echo "no" >&6; }
23669fi
23670
23671
23672          if test "x$XATTR" = x; then
23673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23674          fi
23675        else
23676          # Otherwise we believe it is a complete path. Use it as it is.
23677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23678$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23680$as_echo_n "checking for XATTR... " >&6; }
23681          if test ! -x "$tool_specified"; then
23682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23683$as_echo "not found" >&6; }
23684            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23685          fi
23686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23687$as_echo "$tool_specified" >&6; }
23688        fi
23689      fi
23690    fi
23691
23692  fi
23693
23694
23695
23696  if test "x$XATTR" = x; then
23697    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23698  fi
23699
23700
23701
23702
23703  # Publish this variable in the help.
23704
23705
23706  if [ -z "${CODESIGN+x}" ]; then
23707    # The variable is not set by user, try to locate tool using the code snippet
23708    for ac_prog in codesign
23709do
23710  # Extract the first word of "$ac_prog", so it can be a program name with args.
23711set dummy $ac_prog; ac_word=$2
23712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23713$as_echo_n "checking for $ac_word... " >&6; }
23714if ${ac_cv_path_CODESIGN+:} false; then :
23715  $as_echo_n "(cached) " >&6
23716else
23717  case $CODESIGN in
23718  [\\/]* | ?:[\\/]*)
23719  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23720  ;;
23721  *)
23722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23723for as_dir in $PATH
23724do
23725  IFS=$as_save_IFS
23726  test -z "$as_dir" && as_dir=.
23727    for ac_exec_ext in '' $ac_executable_extensions; do
23728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23729    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23731    break 2
23732  fi
23733done
23734  done
23735IFS=$as_save_IFS
23736
23737  ;;
23738esac
23739fi
23740CODESIGN=$ac_cv_path_CODESIGN
23741if test -n "$CODESIGN"; then
23742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23743$as_echo "$CODESIGN" >&6; }
23744else
23745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23746$as_echo "no" >&6; }
23747fi
23748
23749
23750  test -n "$CODESIGN" && break
23751done
23752
23753  else
23754    # The variable is set, but is it from the command line or the environment?
23755
23756    # Try to remove the string !CODESIGN! from our list.
23757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23759      # If it failed, the variable was not from the command line. Ignore it,
23760      # but warn the user (except for BASH, which is always set by the calling BASH).
23761      if test "xCODESIGN" != xBASH; then
23762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23763$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23764      fi
23765      # Try to locate tool using the code snippet
23766      for ac_prog in codesign
23767do
23768  # Extract the first word of "$ac_prog", so it can be a program name with args.
23769set dummy $ac_prog; ac_word=$2
23770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23771$as_echo_n "checking for $ac_word... " >&6; }
23772if ${ac_cv_path_CODESIGN+:} false; then :
23773  $as_echo_n "(cached) " >&6
23774else
23775  case $CODESIGN in
23776  [\\/]* | ?:[\\/]*)
23777  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23778  ;;
23779  *)
23780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23781for as_dir in $PATH
23782do
23783  IFS=$as_save_IFS
23784  test -z "$as_dir" && as_dir=.
23785    for ac_exec_ext in '' $ac_executable_extensions; do
23786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23787    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23789    break 2
23790  fi
23791done
23792  done
23793IFS=$as_save_IFS
23794
23795  ;;
23796esac
23797fi
23798CODESIGN=$ac_cv_path_CODESIGN
23799if test -n "$CODESIGN"; then
23800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23801$as_echo "$CODESIGN" >&6; }
23802else
23803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23804$as_echo "no" >&6; }
23805fi
23806
23807
23808  test -n "$CODESIGN" && break
23809done
23810
23811    else
23812      # If it succeeded, then it was overridden by the user. We will use it
23813      # for the tool.
23814
23815      # First remove it from the list of overridden variables, so we can test
23816      # for unknown variables in the end.
23817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23818
23819      # Check if we try to supply an empty value
23820      if test "x$CODESIGN" = x; then
23821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23822$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23824$as_echo_n "checking for CODESIGN... " >&6; }
23825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23826$as_echo "disabled" >&6; }
23827      else
23828        # Check if the provided tool contains a complete path.
23829        tool_specified="$CODESIGN"
23830        tool_basename="${tool_specified##*/}"
23831        if test "x$tool_basename" = "x$tool_specified"; then
23832          # A command without a complete path is provided, search $PATH.
23833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23834$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23835          # Extract the first word of "$tool_basename", so it can be a program name with args.
23836set dummy $tool_basename; ac_word=$2
23837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23838$as_echo_n "checking for $ac_word... " >&6; }
23839if ${ac_cv_path_CODESIGN+:} false; then :
23840  $as_echo_n "(cached) " >&6
23841else
23842  case $CODESIGN in
23843  [\\/]* | ?:[\\/]*)
23844  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23845  ;;
23846  *)
23847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23848for as_dir in $PATH
23849do
23850  IFS=$as_save_IFS
23851  test -z "$as_dir" && as_dir=.
23852    for ac_exec_ext in '' $ac_executable_extensions; do
23853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23854    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23856    break 2
23857  fi
23858done
23859  done
23860IFS=$as_save_IFS
23861
23862  ;;
23863esac
23864fi
23865CODESIGN=$ac_cv_path_CODESIGN
23866if test -n "$CODESIGN"; then
23867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23868$as_echo "$CODESIGN" >&6; }
23869else
23870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23871$as_echo "no" >&6; }
23872fi
23873
23874
23875          if test "x$CODESIGN" = x; then
23876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23877          fi
23878        else
23879          # Otherwise we believe it is a complete path. Use it as it is.
23880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23881$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23883$as_echo_n "checking for CODESIGN... " >&6; }
23884          if test ! -x "$tool_specified"; then
23885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23886$as_echo "not found" >&6; }
23887            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23888          fi
23889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23890$as_echo "$tool_specified" >&6; }
23891        fi
23892      fi
23893    fi
23894
23895  fi
23896
23897
23898    if test "x$CODESIGN" != "x"; then
23899      # Verify that the openjdk_codesign certificate is present
23900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23901$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23902      $RM codesign-testfile
23903      $TOUCH codesign-testfile
23904      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23905      $RM codesign-testfile
23906      if test "x$CODESIGN" = x; then
23907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23908$as_echo "no" >&6; }
23909      else
23910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23911$as_echo "yes" >&6; }
23912      fi
23913    fi
23914
23915
23916
23917  # Publish this variable in the help.
23918
23919
23920  if [ -z "${SETFILE+x}" ]; then
23921    # The variable is not set by user, try to locate tool using the code snippet
23922    for ac_prog in SetFile
23923do
23924  # Extract the first word of "$ac_prog", so it can be a program name with args.
23925set dummy $ac_prog; ac_word=$2
23926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23927$as_echo_n "checking for $ac_word... " >&6; }
23928if ${ac_cv_path_SETFILE+:} false; then :
23929  $as_echo_n "(cached) " >&6
23930else
23931  case $SETFILE in
23932  [\\/]* | ?:[\\/]*)
23933  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23934  ;;
23935  *)
23936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23937for as_dir in $PATH
23938do
23939  IFS=$as_save_IFS
23940  test -z "$as_dir" && as_dir=.
23941    for ac_exec_ext in '' $ac_executable_extensions; do
23942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23943    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23945    break 2
23946  fi
23947done
23948  done
23949IFS=$as_save_IFS
23950
23951  ;;
23952esac
23953fi
23954SETFILE=$ac_cv_path_SETFILE
23955if test -n "$SETFILE"; then
23956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23957$as_echo "$SETFILE" >&6; }
23958else
23959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23960$as_echo "no" >&6; }
23961fi
23962
23963
23964  test -n "$SETFILE" && break
23965done
23966
23967  else
23968    # The variable is set, but is it from the command line or the environment?
23969
23970    # Try to remove the string !SETFILE! from our list.
23971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23973      # If it failed, the variable was not from the command line. Ignore it,
23974      # but warn the user (except for BASH, which is always set by the calling BASH).
23975      if test "xSETFILE" != xBASH; then
23976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23977$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23978      fi
23979      # Try to locate tool using the code snippet
23980      for ac_prog in SetFile
23981do
23982  # Extract the first word of "$ac_prog", so it can be a program name with args.
23983set dummy $ac_prog; ac_word=$2
23984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23985$as_echo_n "checking for $ac_word... " >&6; }
23986if ${ac_cv_path_SETFILE+:} false; then :
23987  $as_echo_n "(cached) " >&6
23988else
23989  case $SETFILE in
23990  [\\/]* | ?:[\\/]*)
23991  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23992  ;;
23993  *)
23994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23995for as_dir in $PATH
23996do
23997  IFS=$as_save_IFS
23998  test -z "$as_dir" && as_dir=.
23999    for ac_exec_ext in '' $ac_executable_extensions; do
24000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24001    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24003    break 2
24004  fi
24005done
24006  done
24007IFS=$as_save_IFS
24008
24009  ;;
24010esac
24011fi
24012SETFILE=$ac_cv_path_SETFILE
24013if test -n "$SETFILE"; then
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24015$as_echo "$SETFILE" >&6; }
24016else
24017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24018$as_echo "no" >&6; }
24019fi
24020
24021
24022  test -n "$SETFILE" && break
24023done
24024
24025    else
24026      # If it succeeded, then it was overridden by the user. We will use it
24027      # for the tool.
24028
24029      # First remove it from the list of overridden variables, so we can test
24030      # for unknown variables in the end.
24031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24032
24033      # Check if we try to supply an empty value
24034      if test "x$SETFILE" = x; then
24035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24036$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24038$as_echo_n "checking for SETFILE... " >&6; }
24039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24040$as_echo "disabled" >&6; }
24041      else
24042        # Check if the provided tool contains a complete path.
24043        tool_specified="$SETFILE"
24044        tool_basename="${tool_specified##*/}"
24045        if test "x$tool_basename" = "x$tool_specified"; then
24046          # A command without a complete path is provided, search $PATH.
24047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24048$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24049          # Extract the first word of "$tool_basename", so it can be a program name with args.
24050set dummy $tool_basename; ac_word=$2
24051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24052$as_echo_n "checking for $ac_word... " >&6; }
24053if ${ac_cv_path_SETFILE+:} false; then :
24054  $as_echo_n "(cached) " >&6
24055else
24056  case $SETFILE in
24057  [\\/]* | ?:[\\/]*)
24058  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24059  ;;
24060  *)
24061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24062for as_dir in $PATH
24063do
24064  IFS=$as_save_IFS
24065  test -z "$as_dir" && as_dir=.
24066    for ac_exec_ext in '' $ac_executable_extensions; do
24067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24068    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24070    break 2
24071  fi
24072done
24073  done
24074IFS=$as_save_IFS
24075
24076  ;;
24077esac
24078fi
24079SETFILE=$ac_cv_path_SETFILE
24080if test -n "$SETFILE"; then
24081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24082$as_echo "$SETFILE" >&6; }
24083else
24084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24085$as_echo "no" >&6; }
24086fi
24087
24088
24089          if test "x$SETFILE" = x; then
24090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24091          fi
24092        else
24093          # Otherwise we believe it is a complete path. Use it as it is.
24094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24095$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24097$as_echo_n "checking for SETFILE... " >&6; }
24098          if test ! -x "$tool_specified"; then
24099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24100$as_echo "not found" >&6; }
24101            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24102          fi
24103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24104$as_echo "$tool_specified" >&6; }
24105        fi
24106      fi
24107    fi
24108
24109  fi
24110
24111
24112
24113  if test "x$SETFILE" = x; then
24114    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24115  fi
24116
24117
24118  fi
24119
24120
24121  # Test if bash supports pipefail.
24122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24123$as_echo_n "checking if bash supports pipefail... " >&6; }
24124  if ${BASH} -c 'set -o pipefail'; then
24125    BASH_ARGS="$BASH_ARGS -o pipefail"
24126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24127$as_echo "yes" >&6; }
24128  else
24129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24130$as_echo "no" >&6; }
24131  fi
24132
24133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24134$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24135  if ${BASH} -e -c 'true'; then
24136    BASH_ARGS="$BASH_ARGS -e"
24137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24138$as_echo "yes" >&6; }
24139  else
24140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24141$as_echo "no" >&6; }
24142  fi
24143
24144
24145
24146
24147# Check if pkg-config is available.
24148
24149
24150if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24151	if test -n "$ac_tool_prefix"; then
24152  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24153set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24155$as_echo_n "checking for $ac_word... " >&6; }
24156if ${ac_cv_path_PKG_CONFIG+:} false; then :
24157  $as_echo_n "(cached) " >&6
24158else
24159  case $PKG_CONFIG in
24160  [\\/]* | ?:[\\/]*)
24161  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24162  ;;
24163  *)
24164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24165for as_dir in $PATH
24166do
24167  IFS=$as_save_IFS
24168  test -z "$as_dir" && as_dir=.
24169    for ac_exec_ext in '' $ac_executable_extensions; do
24170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24171    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24173    break 2
24174  fi
24175done
24176  done
24177IFS=$as_save_IFS
24178
24179  ;;
24180esac
24181fi
24182PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24183if test -n "$PKG_CONFIG"; then
24184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24185$as_echo "$PKG_CONFIG" >&6; }
24186else
24187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24188$as_echo "no" >&6; }
24189fi
24190
24191
24192fi
24193if test -z "$ac_cv_path_PKG_CONFIG"; then
24194  ac_pt_PKG_CONFIG=$PKG_CONFIG
24195  # Extract the first word of "pkg-config", so it can be a program name with args.
24196set dummy pkg-config; ac_word=$2
24197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24198$as_echo_n "checking for $ac_word... " >&6; }
24199if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24200  $as_echo_n "(cached) " >&6
24201else
24202  case $ac_pt_PKG_CONFIG in
24203  [\\/]* | ?:[\\/]*)
24204  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24205  ;;
24206  *)
24207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24208for as_dir in $PATH
24209do
24210  IFS=$as_save_IFS
24211  test -z "$as_dir" && as_dir=.
24212    for ac_exec_ext in '' $ac_executable_extensions; do
24213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24214    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24216    break 2
24217  fi
24218done
24219  done
24220IFS=$as_save_IFS
24221
24222  ;;
24223esac
24224fi
24225ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24226if test -n "$ac_pt_PKG_CONFIG"; then
24227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24228$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24229else
24230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24231$as_echo "no" >&6; }
24232fi
24233
24234  if test "x$ac_pt_PKG_CONFIG" = x; then
24235    PKG_CONFIG=""
24236  else
24237    case $cross_compiling:$ac_tool_warned in
24238yes:)
24239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24241ac_tool_warned=yes ;;
24242esac
24243    PKG_CONFIG=$ac_pt_PKG_CONFIG
24244  fi
24245else
24246  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24247fi
24248
24249fi
24250if test -n "$PKG_CONFIG"; then
24251	_pkg_min_version=0.9.0
24252	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24253$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24254	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24255		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24256$as_echo "yes" >&6; }
24257	else
24258		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24259$as_echo "no" >&6; }
24260		PKG_CONFIG=""
24261	fi
24262
24263fi
24264
24265# After basic tools have been setup, we can check build os specific details.
24266
24267  ###############################################################################
24268
24269  # Note that this is the build platform OS version!
24270
24271  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24272  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24273  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24274  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24275
24276
24277
24278
24279
24280# Misc basic settings
24281
24282
24283# Check whether --with-default-make-target was given.
24284if test "${with_default_make_target+set}" = set; then :
24285  withval=$with_default_make_target;
24286fi
24287
24288  if test "x$with_default_make_target" = "x" \
24289      || test "x$with_default_make_target" = "xyes"; then
24290    DEFAULT_MAKE_TARGET="exploded-image"
24291  elif test "x$with_default_make_target" = "xno"; then
24292    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24293  else
24294    DEFAULT_MAKE_TARGET="$with_default_make_target"
24295  fi
24296
24297
24298
24299
24300###############################################################################
24301#
24302# Determine OpenJDK variants, options and version numbers.
24303#
24304###############################################################################
24305
24306# We need build & target for this.
24307
24308  # Should we build a JDK without a graphical UI?
24309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24310$as_echo_n "checking headless only... " >&6; }
24311  # Check whether --enable-headless-only was given.
24312if test "${enable_headless_only+set}" = set; then :
24313  enableval=$enable_headless_only;
24314fi
24315
24316
24317  if test "x$enable_headless_only" = "xyes"; then
24318    ENABLE_HEADLESS_ONLY="true"
24319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24320$as_echo "yes" >&6; }
24321  elif test "x$enable_headless_only" = "xno"; then
24322    ENABLE_HEADLESS_ONLY="false"
24323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24324$as_echo "no" >&6; }
24325  elif test "x$enable_headless_only" = "x"; then
24326    ENABLE_HEADLESS_ONLY="false"
24327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24328$as_echo "no" >&6; }
24329  else
24330    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24331  fi
24332
24333
24334
24335  # Choose cacerts source file
24336
24337# Check whether --with-cacerts-file was given.
24338if test "${with_cacerts_file+set}" = set; then :
24339  withval=$with_cacerts_file;
24340fi
24341
24342  if test "x$with_cacerts_file" != x; then
24343    CACERTS_FILE=$with_cacerts_file
24344  fi
24345
24346
24347  # Enable or disable unlimited crypto
24348  # Check whether --enable-unlimited-crypto was given.
24349if test "${enable_unlimited_crypto+set}" = set; then :
24350  enableval=$enable_unlimited_crypto;
24351else
24352  enable_unlimited_crypto=yes
24353fi
24354
24355  if test "x$enable_unlimited_crypto" = "xyes"; then
24356    UNLIMITED_CRYPTO=true
24357  else
24358    UNLIMITED_CRYPTO=false
24359  fi
24360
24361
24362  # Should we build the serviceability agent (SA)?
24363  INCLUDE_SA=true
24364  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24365    INCLUDE_SA=false
24366  fi
24367  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24368    INCLUDE_SA=false
24369  fi
24370
24371
24372  # Compress jars
24373  COMPRESS_JARS=false
24374
24375
24376
24377  # Setup default copyright year. Mostly overridden when building close to a new year.
24378
24379# Check whether --with-copyright-year was given.
24380if test "${with_copyright_year+set}" = set; then :
24381  withval=$with_copyright_year;
24382fi
24383
24384  if test "x$with_copyright_year" = xyes; then
24385    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24386  elif test "x$with_copyright_year" != x; then
24387    COPYRIGHT_YEAR="$with_copyright_year"
24388  else
24389    COPYRIGHT_YEAR=`$DATE +'%Y'`
24390  fi
24391
24392
24393
24394  # Check whether --enable-keep-packaged-modules was given.
24395if test "${enable_keep_packaged_modules+set}" = set; then :
24396  enableval=$enable_keep_packaged_modules;
24397fi
24398
24399
24400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24401$as_echo_n "checking if packaged modules are kept... " >&6; }
24402  if test "x$enable_keep_packaged_modules" = "xyes"; then
24403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24404$as_echo "yes" >&6; }
24405    JLINK_KEEP_PACKAGED_MODULES=true
24406  elif test "x$enable_keep_packaged_modules" = "xno"; then
24407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24408$as_echo "no" >&6; }
24409    JLINK_KEEP_PACKAGED_MODULES=false
24410  elif test "x$enable_keep_packaged_modules" = "x"; then
24411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24412$as_echo "yes (default)" >&6; }
24413    JLINK_KEEP_PACKAGED_MODULES=true
24414  else
24415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24416$as_echo "error" >&6; }
24417    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24418  fi
24419
24420
24421
24422
24423  # Warn user that old version arguments are deprecated.
24424
24425
24426# Check whether --with-milestone was given.
24427if test "${with_milestone+set}" = set; then :
24428  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24429$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24430fi
24431
24432
24433
24434
24435# Check whether --with-update-version was given.
24436if test "${with_update_version+set}" = set; then :
24437  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24438$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24439fi
24440
24441
24442
24443
24444# Check whether --with-user-release-suffix was given.
24445if test "${with_user_release_suffix+set}" = set; then :
24446  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
24447$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24448fi
24449
24450
24451
24452
24453# Check whether --with-build-number was given.
24454if test "${with_build_number+set}" = set; then :
24455  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24456$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24457fi
24458
24459
24460
24461  # Source the version numbers file
24462  . $AUTOCONF_DIR/version-numbers
24463
24464  # Some non-version number information is set in that file
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474  # Override version from arguments
24475
24476  # If --with-version-string is set, process it first. It is possible to
24477  # override parts with more specific flags, since these are processed later.
24478
24479# Check whether --with-version-string was given.
24480if test "${with_version_string+set}" = set; then :
24481  withval=$with_version_string;
24482fi
24483
24484  if test "x$with_version_string" = xyes; then
24485    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24486  elif test "x$with_version_string" != x; then
24487    # Additional [] needed to keep m4 from mangling shell constructs.
24488    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24489      VERSION_MAJOR=${BASH_REMATCH[1]}
24490      VERSION_MINOR=${BASH_REMATCH[3]}
24491      VERSION_SECURITY=${BASH_REMATCH[5]}
24492      VERSION_PATCH=${BASH_REMATCH[7]}
24493      VERSION_PRE=${BASH_REMATCH[9]}
24494      version_plus_separator=${BASH_REMATCH[11]}
24495      VERSION_BUILD=${BASH_REMATCH[12]}
24496      VERSION_OPT=${BASH_REMATCH[14]}
24497      # Unspecified numerical fields are interpreted as 0.
24498      if test "x$VERSION_MINOR" = x; then
24499        VERSION_MINOR=0
24500      fi
24501      if test "x$VERSION_SECURITY" = x; then
24502        VERSION_SECURITY=0
24503      fi
24504      if test "x$VERSION_PATCH" = x; then
24505        VERSION_PATCH=0
24506      fi
24507      if test "x$version_plus_separator" != x \
24508          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24509        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24510      fi
24511      # Stop the version part process from setting default values.
24512      # We still allow them to explicitly override though.
24513      NO_DEFAULT_VERSION_PARTS=true
24514    else
24515      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24516    fi
24517  fi
24518
24519
24520# Check whether --with-version-pre was given.
24521if test "${with_version_pre+set}" = set; then :
24522  withval=$with_version_pre; with_version_pre_present=true
24523else
24524  with_version_pre_present=false
24525fi
24526
24527
24528  if test "x$with_version_pre_present" = xtrue; then
24529    if test "x$with_version_pre" = xyes; then
24530      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24531    elif test "x$with_version_pre" = xno; then
24532      # Interpret --without-* as empty string instead of the literal "no"
24533      VERSION_PRE=
24534    else
24535      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24536       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24537      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24539$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24540      fi
24541    fi
24542  else
24543    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24544      # Default is to use "internal" as pre
24545      VERSION_PRE="internal"
24546    fi
24547  fi
24548
24549
24550# Check whether --with-version-opt was given.
24551if test "${with_version_opt+set}" = set; then :
24552  withval=$with_version_opt; with_version_opt_present=true
24553else
24554  with_version_opt_present=false
24555fi
24556
24557
24558  if test "x$with_version_opt_present" = xtrue; then
24559    if test "x$with_version_opt" = xyes; then
24560      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24561    elif test "x$with_version_opt" = xno; then
24562      # Interpret --without-* as empty string instead of the literal "no"
24563      VERSION_OPT=
24564    else
24565      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24566       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24567      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24569$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24570      fi
24571    fi
24572  else
24573    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24574      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24575      # Outer [ ] to quote m4.
24576       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24577      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24578    fi
24579  fi
24580
24581
24582# Check whether --with-version-build was given.
24583if test "${with_version_build+set}" = set; then :
24584  withval=$with_version_build; with_version_build_present=true
24585else
24586  with_version_build_present=false
24587fi
24588
24589
24590  if test "x$with_version_build_present" = xtrue; then
24591    if test "x$with_version_build" = xyes; then
24592      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24593    elif test "x$with_version_build" = xno; then
24594      # Interpret --without-* as empty string instead of the literal "no"
24595      VERSION_BUILD=
24596    elif test "x$with_version_build" = x; then
24597      VERSION_BUILD=
24598    else
24599
24600  # Additional [] needed to keep m4 from mangling shell constructs.
24601  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24602    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24603  fi
24604  # Extract the version number without leading zeros.
24605  cleaned_value=${BASH_REMATCH[1]}
24606  if test "x$cleaned_value" = x; then
24607    # Special case for zero
24608    cleaned_value=${BASH_REMATCH[2]}
24609  fi
24610
24611  if test $cleaned_value -gt 255; then
24612    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24613  fi
24614  if test "x$cleaned_value" != "x$with_version_build"; then
24615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24616$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24617  fi
24618  VERSION_BUILD=$cleaned_value
24619
24620    fi
24621  else
24622    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24623      # Default is to not have a build number.
24624      VERSION_BUILD=""
24625      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24626      VERSION_BUILD=0
24627    fi
24628  fi
24629
24630
24631# Check whether --with-version-major was given.
24632if test "${with_version_major+set}" = set; then :
24633  withval=$with_version_major; with_version_major_present=true
24634else
24635  with_version_major_present=false
24636fi
24637
24638
24639  if test "x$with_version_major_present" = xtrue; then
24640    if test "x$with_version_major" = xyes; then
24641      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24642    else
24643
24644  # Additional [] needed to keep m4 from mangling shell constructs.
24645  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24646    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24647  fi
24648  # Extract the version number without leading zeros.
24649  cleaned_value=${BASH_REMATCH[1]}
24650  if test "x$cleaned_value" = x; then
24651    # Special case for zero
24652    cleaned_value=${BASH_REMATCH[2]}
24653  fi
24654
24655  if test $cleaned_value -gt 255; then
24656    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24657  fi
24658  if test "x$cleaned_value" != "x$with_version_major"; then
24659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24660$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24661  fi
24662  VERSION_MAJOR=$cleaned_value
24663
24664    fi
24665  else
24666    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24667      # Default is to get value from version-numbers
24668      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24669    fi
24670  fi
24671
24672
24673# Check whether --with-version-minor was given.
24674if test "${with_version_minor+set}" = set; then :
24675  withval=$with_version_minor; with_version_minor_present=true
24676else
24677  with_version_minor_present=false
24678fi
24679
24680
24681  if test "x$with_version_minor_present" = xtrue; then
24682    if test "x$with_version_minor" = xyes; then
24683      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24684    elif test "x$with_version_minor" = xno; then
24685      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24686      VERSION_MINOR=0
24687    elif test "x$with_version_minor" = x; then
24688      VERSION_MINOR=0
24689    else
24690
24691  # Additional [] needed to keep m4 from mangling shell constructs.
24692  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24693    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24694  fi
24695  # Extract the version number without leading zeros.
24696  cleaned_value=${BASH_REMATCH[1]}
24697  if test "x$cleaned_value" = x; then
24698    # Special case for zero
24699    cleaned_value=${BASH_REMATCH[2]}
24700  fi
24701
24702  if test $cleaned_value -gt 255; then
24703    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24704  fi
24705  if test "x$cleaned_value" != "x$with_version_minor"; then
24706    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24707$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24708  fi
24709  VERSION_MINOR=$cleaned_value
24710
24711    fi
24712  else
24713    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24714      # Default is 0, if unspecified
24715      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24716    fi
24717  fi
24718
24719
24720# Check whether --with-version-security was given.
24721if test "${with_version_security+set}" = set; then :
24722  withval=$with_version_security; with_version_security_present=true
24723else
24724  with_version_security_present=false
24725fi
24726
24727
24728  if test "x$with_version_security_present" = xtrue; then
24729    if test "x$with_version_security" = xyes; then
24730      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24731    elif test "x$with_version_security" = xno; then
24732      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24733      VERSION_SECURITY=0
24734    elif test "x$with_version_security" = x; then
24735      VERSION_SECURITY=0
24736    else
24737
24738  # Additional [] needed to keep m4 from mangling shell constructs.
24739  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24740    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24741  fi
24742  # Extract the version number without leading zeros.
24743  cleaned_value=${BASH_REMATCH[1]}
24744  if test "x$cleaned_value" = x; then
24745    # Special case for zero
24746    cleaned_value=${BASH_REMATCH[2]}
24747  fi
24748
24749  if test $cleaned_value -gt 255; then
24750    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24751  fi
24752  if test "x$cleaned_value" != "x$with_version_security"; then
24753    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24754$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24755  fi
24756  VERSION_SECURITY=$cleaned_value
24757
24758    fi
24759  else
24760    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24761      # Default is 0, if unspecified
24762      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24763    fi
24764  fi
24765
24766
24767# Check whether --with-version-patch was given.
24768if test "${with_version_patch+set}" = set; then :
24769  withval=$with_version_patch; with_version_patch_present=true
24770else
24771  with_version_patch_present=false
24772fi
24773
24774
24775  if test "x$with_version_patch_present" = xtrue; then
24776    if test "x$with_version_patch" = xyes; then
24777      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24778    elif test "x$with_version_patch" = xno; then
24779      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24780      VERSION_PATCH=0
24781    elif test "x$with_version_patch" = x; then
24782      VERSION_PATCH=0
24783    else
24784
24785  # Additional [] needed to keep m4 from mangling shell constructs.
24786  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24787    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24788  fi
24789  # Extract the version number without leading zeros.
24790  cleaned_value=${BASH_REMATCH[1]}
24791  if test "x$cleaned_value" = x; then
24792    # Special case for zero
24793    cleaned_value=${BASH_REMATCH[2]}
24794  fi
24795
24796  if test $cleaned_value -gt 255; then
24797    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24798  fi
24799  if test "x$cleaned_value" != "x$with_version_patch"; then
24800    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24801$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24802  fi
24803  VERSION_PATCH=$cleaned_value
24804
24805    fi
24806  else
24807    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24808      # Default is 0, if unspecified
24809      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24810    fi
24811  fi
24812
24813  # Calculate derived version properties
24814
24815  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24816  if test "x$VERSION_PRE" = x; then
24817    VERSION_IS_GA=true
24818  else
24819    VERSION_IS_GA=false
24820  fi
24821
24822  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24823  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24824
24825  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24826  # Strip trailing zeroes from stripped_version_number
24827  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24828  VERSION_NUMBER=$stripped_version_number
24829
24830  # The complete version string, with additional build information
24831  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24832    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24833  else
24834    # If either build or opt is set, we need a + separator
24835    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24836  fi
24837
24838  # The short version string, just VERSION_NUMBER and PRE, if present.
24839  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24840
24841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24842$as_echo_n "checking for version string... " >&6; }
24843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24844$as_echo "$VERSION_STRING" >&6; }
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860###############################################################################
24861#
24862# Setup BootJDK, used to bootstrap the build.
24863#
24864###############################################################################
24865
24866
24867  BOOT_JDK_FOUND=no
24868
24869# Check whether --with-boot-jdk was given.
24870if test "${with_boot_jdk+set}" = set; then :
24871  withval=$with_boot_jdk;
24872fi
24873
24874
24875  # We look for the Boot JDK through various means, going from more certain to
24876  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24877  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24878  # must check if this is indeed valid; otherwise we'll continue looking.
24879
24880  # Test: Is bootjdk explicitly set by command line arguments?
24881
24882  if test "x$BOOT_JDK_FOUND" = xno; then
24883    # Now execute the test
24884
24885  if test "x$with_boot_jdk" != x; then
24886    BOOT_JDK=$with_boot_jdk
24887    BOOT_JDK_FOUND=maybe
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24889$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24890  fi
24891
24892
24893    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24894    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24895      # Do we have a bin/java?
24896      if test ! -x "$BOOT_JDK/bin/java"; then
24897        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24899        BOOT_JDK_FOUND=no
24900      else
24901        # Do we have a bin/javac?
24902        if test ! -x "$BOOT_JDK/bin/javac"; then
24903          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24905          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24906$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24907          BOOT_JDK_FOUND=no
24908        else
24909          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24910          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24911
24912          # Extra M4 quote needed to protect [] in grep expression.
24913          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24914          if test "x$FOUND_CORRECT_VERSION" = x; then
24915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24917            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24918$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24919            BOOT_JDK_FOUND=no
24920          else
24921            # We're done! :-)
24922            BOOT_JDK_FOUND=yes
24923
24924  # Only process if variable expands to non-empty
24925
24926  if test "x$BOOT_JDK" != x; then
24927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24928
24929  # Input might be given as Windows format, start by converting to
24930  # unix format.
24931  path="$BOOT_JDK"
24932  new_path=`$CYGPATH -u "$path"`
24933
24934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24937  # "foo.exe" is OK but "foo" is an error.
24938  #
24939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24940  # It is also a way to make sure we got the proper file name for the real test later on.
24941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24942  if test "x$test_shortpath" = x; then
24943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24946  fi
24947
24948  # Call helper function which possibly converts this using DOS-style short mode.
24949  # If so, the updated path is stored in $new_path.
24950
24951  input_path="$new_path"
24952  # Check if we need to convert this using DOS-style short mode. If the path
24953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24954  # take no chances and rewrite it.
24955  # Note: m4 eats our [], so we need to use [ and ] instead.
24956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24957  if test "x$has_forbidden_chars" != x; then
24958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24962      # Going to short mode and back again did indeed matter. Since short mode is
24963      # case insensitive, let's make it lowercase to improve readability.
24964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24965      # Now convert it back to Unix-style (cygpath)
24966      input_path=`$CYGPATH -u "$shortmode_path"`
24967      new_path="$input_path"
24968    fi
24969  fi
24970
24971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24972  if test "x$test_cygdrive_prefix" = x; then
24973    # As a simple fix, exclude /usr/bin since it's not a real path.
24974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24976      # a path prefixed by /cygdrive for fixpath to work.
24977      new_path="$CYGWIN_ROOT_PATH$input_path"
24978    fi
24979  fi
24980
24981
24982  if test "x$path" != "x$new_path"; then
24983    BOOT_JDK="$new_path"
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24986  fi
24987
24988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24989
24990  path="$BOOT_JDK"
24991  has_colon=`$ECHO $path | $GREP ^.:`
24992  new_path="$path"
24993  if test "x$has_colon" = x; then
24994    # Not in mixed or Windows style, start by that.
24995    new_path=`cmd //c echo $path`
24996  fi
24997
24998
24999  input_path="$new_path"
25000  # Check if we need to convert this using DOS-style short mode. If the path
25001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25002  # take no chances and rewrite it.
25003  # Note: m4 eats our [], so we need to use [ and ] instead.
25004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25005  if test "x$has_forbidden_chars" != x; then
25006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25008  fi
25009
25010
25011  windows_path="$new_path"
25012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25013    unix_path=`$CYGPATH -u "$windows_path"`
25014    new_path="$unix_path"
25015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25017    new_path="$unix_path"
25018  fi
25019
25020  if test "x$path" != "x$new_path"; then
25021    BOOT_JDK="$new_path"
25022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25024  fi
25025
25026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25028
25029    else
25030      # We're on a unix platform. Hooray! :)
25031      path="$BOOT_JDK"
25032      has_space=`$ECHO "$path" | $GREP " "`
25033      if test "x$has_space" != x; then
25034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25037      fi
25038
25039      # Use eval to expand a potential ~
25040      eval path="$path"
25041      if test ! -f "$path" && test ! -d "$path"; then
25042        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25043      fi
25044
25045      if test -d "$path"; then
25046        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25047      else
25048        dir="`$DIRNAME "$path"`"
25049        base="`$BASENAME "$path"`"
25050        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25051      fi
25052    fi
25053  fi
25054
25055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25056$as_echo_n "checking for Boot JDK... " >&6; }
25057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25058$as_echo "$BOOT_JDK" >&6; }
25059            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25060$as_echo_n "checking Boot JDK version... " >&6; }
25061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25063$as_echo "$BOOT_JDK_VERSION" >&6; }
25064          fi # end check jdk version
25065        fi # end check javac
25066      fi # end check java
25067    fi # end check boot jdk found
25068  fi
25069
25070  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25071    # Having specified an argument which is incorrect will produce an instant failure;
25072    # we should not go on looking
25073    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25074  fi
25075
25076  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25077
25078  if test "x$BOOT_JDK_FOUND" = xno; then
25079    # Now execute the test
25080
25081  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25082    # First check at user selected default
25083
25084  if test "x$BOOT_JDK_FOUND" = xno; then
25085    # Now execute the test
25086
25087  if test -x /usr/libexec/java_home; then
25088    BOOT_JDK=`/usr/libexec/java_home `
25089    BOOT_JDK_FOUND=maybe
25090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25091$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25092  fi
25093
25094
25095    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25096    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25097      # Do we have a bin/java?
25098      if test ! -x "$BOOT_JDK/bin/java"; then
25099        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25101        BOOT_JDK_FOUND=no
25102      else
25103        # Do we have a bin/javac?
25104        if test ! -x "$BOOT_JDK/bin/javac"; then
25105          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25107          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25108$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25109          BOOT_JDK_FOUND=no
25110        else
25111          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25112          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25113
25114          # Extra M4 quote needed to protect [] in grep expression.
25115          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25116          if test "x$FOUND_CORRECT_VERSION" = x; then
25117            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25119            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25120$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25121            BOOT_JDK_FOUND=no
25122          else
25123            # We're done! :-)
25124            BOOT_JDK_FOUND=yes
25125
25126  # Only process if variable expands to non-empty
25127
25128  if test "x$BOOT_JDK" != x; then
25129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25130
25131  # Input might be given as Windows format, start by converting to
25132  # unix format.
25133  path="$BOOT_JDK"
25134  new_path=`$CYGPATH -u "$path"`
25135
25136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25139  # "foo.exe" is OK but "foo" is an error.
25140  #
25141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25142  # It is also a way to make sure we got the proper file name for the real test later on.
25143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25144  if test "x$test_shortpath" = x; then
25145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25146$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25147    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25148  fi
25149
25150  # Call helper function which possibly converts this using DOS-style short mode.
25151  # If so, the updated path is stored in $new_path.
25152
25153  input_path="$new_path"
25154  # Check if we need to convert this using DOS-style short mode. If the path
25155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25156  # take no chances and rewrite it.
25157  # Note: m4 eats our [], so we need to use [ and ] instead.
25158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25159  if test "x$has_forbidden_chars" != x; then
25160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25164      # Going to short mode and back again did indeed matter. Since short mode is
25165      # case insensitive, let's make it lowercase to improve readability.
25166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25167      # Now convert it back to Unix-style (cygpath)
25168      input_path=`$CYGPATH -u "$shortmode_path"`
25169      new_path="$input_path"
25170    fi
25171  fi
25172
25173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25174  if test "x$test_cygdrive_prefix" = x; then
25175    # As a simple fix, exclude /usr/bin since it's not a real path.
25176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25178      # a path prefixed by /cygdrive for fixpath to work.
25179      new_path="$CYGWIN_ROOT_PATH$input_path"
25180    fi
25181  fi
25182
25183
25184  if test "x$path" != "x$new_path"; then
25185    BOOT_JDK="$new_path"
25186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25187$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25188  fi
25189
25190    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25191
25192  path="$BOOT_JDK"
25193  has_colon=`$ECHO $path | $GREP ^.:`
25194  new_path="$path"
25195  if test "x$has_colon" = x; then
25196    # Not in mixed or Windows style, start by that.
25197    new_path=`cmd //c echo $path`
25198  fi
25199
25200
25201  input_path="$new_path"
25202  # Check if we need to convert this using DOS-style short mode. If the path
25203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25204  # take no chances and rewrite it.
25205  # Note: m4 eats our [], so we need to use [ and ] instead.
25206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25207  if test "x$has_forbidden_chars" != x; then
25208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25210  fi
25211
25212
25213  windows_path="$new_path"
25214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25215    unix_path=`$CYGPATH -u "$windows_path"`
25216    new_path="$unix_path"
25217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25219    new_path="$unix_path"
25220  fi
25221
25222  if test "x$path" != "x$new_path"; then
25223    BOOT_JDK="$new_path"
25224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25225$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25226  fi
25227
25228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25230
25231    else
25232      # We're on a unix platform. Hooray! :)
25233      path="$BOOT_JDK"
25234      has_space=`$ECHO "$path" | $GREP " "`
25235      if test "x$has_space" != x; then
25236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25237$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25238        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25239      fi
25240
25241      # Use eval to expand a potential ~
25242      eval path="$path"
25243      if test ! -f "$path" && test ! -d "$path"; then
25244        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25245      fi
25246
25247      if test -d "$path"; then
25248        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25249      else
25250        dir="`$DIRNAME "$path"`"
25251        base="`$BASENAME "$path"`"
25252        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25253      fi
25254    fi
25255  fi
25256
25257            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25258$as_echo_n "checking for Boot JDK... " >&6; }
25259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25260$as_echo "$BOOT_JDK" >&6; }
25261            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25262$as_echo_n "checking Boot JDK version... " >&6; }
25263            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25265$as_echo "$BOOT_JDK_VERSION" >&6; }
25266          fi # end check jdk version
25267        fi # end check javac
25268      fi # end check java
25269    fi # end check boot jdk found
25270  fi
25271
25272    # If that did not work out (e.g. too old), try explicit versions instead
25273
25274  if test "x$BOOT_JDK_FOUND" = xno; then
25275    # Now execute the test
25276
25277  if test -x /usr/libexec/java_home; then
25278    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25279    BOOT_JDK_FOUND=maybe
25280    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25281$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25282  fi
25283
25284
25285    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25286    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25287      # Do we have a bin/java?
25288      if test ! -x "$BOOT_JDK/bin/java"; then
25289        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25291        BOOT_JDK_FOUND=no
25292      else
25293        # Do we have a bin/javac?
25294        if test ! -x "$BOOT_JDK/bin/javac"; then
25295          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25297          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25298$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25299          BOOT_JDK_FOUND=no
25300        else
25301          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25302          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25303
25304          # Extra M4 quote needed to protect [] in grep expression.
25305          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25306          if test "x$FOUND_CORRECT_VERSION" = x; then
25307            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25309            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25310$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25311            BOOT_JDK_FOUND=no
25312          else
25313            # We're done! :-)
25314            BOOT_JDK_FOUND=yes
25315
25316  # Only process if variable expands to non-empty
25317
25318  if test "x$BOOT_JDK" != x; then
25319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25320
25321  # Input might be given as Windows format, start by converting to
25322  # unix format.
25323  path="$BOOT_JDK"
25324  new_path=`$CYGPATH -u "$path"`
25325
25326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25329  # "foo.exe" is OK but "foo" is an error.
25330  #
25331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25332  # It is also a way to make sure we got the proper file name for the real test later on.
25333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25334  if test "x$test_shortpath" = x; then
25335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25337    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25338  fi
25339
25340  # Call helper function which possibly converts this using DOS-style short mode.
25341  # If so, the updated path is stored in $new_path.
25342
25343  input_path="$new_path"
25344  # Check if we need to convert this using DOS-style short mode. If the path
25345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25346  # take no chances and rewrite it.
25347  # Note: m4 eats our [], so we need to use [ and ] instead.
25348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25349  if test "x$has_forbidden_chars" != x; then
25350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25354      # Going to short mode and back again did indeed matter. Since short mode is
25355      # case insensitive, let's make it lowercase to improve readability.
25356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25357      # Now convert it back to Unix-style (cygpath)
25358      input_path=`$CYGPATH -u "$shortmode_path"`
25359      new_path="$input_path"
25360    fi
25361  fi
25362
25363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25364  if test "x$test_cygdrive_prefix" = x; then
25365    # As a simple fix, exclude /usr/bin since it's not a real path.
25366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25368      # a path prefixed by /cygdrive for fixpath to work.
25369      new_path="$CYGWIN_ROOT_PATH$input_path"
25370    fi
25371  fi
25372
25373
25374  if test "x$path" != "x$new_path"; then
25375    BOOT_JDK="$new_path"
25376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25377$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25378  fi
25379
25380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25381
25382  path="$BOOT_JDK"
25383  has_colon=`$ECHO $path | $GREP ^.:`
25384  new_path="$path"
25385  if test "x$has_colon" = x; then
25386    # Not in mixed or Windows style, start by that.
25387    new_path=`cmd //c echo $path`
25388  fi
25389
25390
25391  input_path="$new_path"
25392  # Check if we need to convert this using DOS-style short mode. If the path
25393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25394  # take no chances and rewrite it.
25395  # Note: m4 eats our [], so we need to use [ and ] instead.
25396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25397  if test "x$has_forbidden_chars" != x; then
25398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25400  fi
25401
25402
25403  windows_path="$new_path"
25404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25405    unix_path=`$CYGPATH -u "$windows_path"`
25406    new_path="$unix_path"
25407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25409    new_path="$unix_path"
25410  fi
25411
25412  if test "x$path" != "x$new_path"; then
25413    BOOT_JDK="$new_path"
25414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25415$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25416  fi
25417
25418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25420
25421    else
25422      # We're on a unix platform. Hooray! :)
25423      path="$BOOT_JDK"
25424      has_space=`$ECHO "$path" | $GREP " "`
25425      if test "x$has_space" != x; then
25426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25429      fi
25430
25431      # Use eval to expand a potential ~
25432      eval path="$path"
25433      if test ! -f "$path" && test ! -d "$path"; then
25434        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25435      fi
25436
25437      if test -d "$path"; then
25438        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25439      else
25440        dir="`$DIRNAME "$path"`"
25441        base="`$BASENAME "$path"`"
25442        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25443      fi
25444    fi
25445  fi
25446
25447            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25448$as_echo_n "checking for Boot JDK... " >&6; }
25449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25450$as_echo "$BOOT_JDK" >&6; }
25451            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25452$as_echo_n "checking Boot JDK version... " >&6; }
25453            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25455$as_echo "$BOOT_JDK_VERSION" >&6; }
25456          fi # end check jdk version
25457        fi # end check javac
25458      fi # end check java
25459    fi # end check boot jdk found
25460  fi
25461
25462
25463  if test "x$BOOT_JDK_FOUND" = xno; then
25464    # Now execute the test
25465
25466  if test -x /usr/libexec/java_home; then
25467    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25468    BOOT_JDK_FOUND=maybe
25469    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25470$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25471  fi
25472
25473
25474    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25475    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25476      # Do we have a bin/java?
25477      if test ! -x "$BOOT_JDK/bin/java"; then
25478        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25479$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25480        BOOT_JDK_FOUND=no
25481      else
25482        # Do we have a bin/javac?
25483        if test ! -x "$BOOT_JDK/bin/javac"; then
25484          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25486          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25487$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25488          BOOT_JDK_FOUND=no
25489        else
25490          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25491          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25492
25493          # Extra M4 quote needed to protect [] in grep expression.
25494          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25495          if test "x$FOUND_CORRECT_VERSION" = x; then
25496            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25498            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25499$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25500            BOOT_JDK_FOUND=no
25501          else
25502            # We're done! :-)
25503            BOOT_JDK_FOUND=yes
25504
25505  # Only process if variable expands to non-empty
25506
25507  if test "x$BOOT_JDK" != x; then
25508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25509
25510  # Input might be given as Windows format, start by converting to
25511  # unix format.
25512  path="$BOOT_JDK"
25513  new_path=`$CYGPATH -u "$path"`
25514
25515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25518  # "foo.exe" is OK but "foo" is an error.
25519  #
25520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25521  # It is also a way to make sure we got the proper file name for the real test later on.
25522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25523  if test "x$test_shortpath" = x; then
25524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25526    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25527  fi
25528
25529  # Call helper function which possibly converts this using DOS-style short mode.
25530  # If so, the updated path is stored in $new_path.
25531
25532  input_path="$new_path"
25533  # Check if we need to convert this using DOS-style short mode. If the path
25534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25535  # take no chances and rewrite it.
25536  # Note: m4 eats our [], so we need to use [ and ] instead.
25537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25538  if test "x$has_forbidden_chars" != x; then
25539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25543      # Going to short mode and back again did indeed matter. Since short mode is
25544      # case insensitive, let's make it lowercase to improve readability.
25545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25546      # Now convert it back to Unix-style (cygpath)
25547      input_path=`$CYGPATH -u "$shortmode_path"`
25548      new_path="$input_path"
25549    fi
25550  fi
25551
25552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25553  if test "x$test_cygdrive_prefix" = x; then
25554    # As a simple fix, exclude /usr/bin since it's not a real path.
25555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25557      # a path prefixed by /cygdrive for fixpath to work.
25558      new_path="$CYGWIN_ROOT_PATH$input_path"
25559    fi
25560  fi
25561
25562
25563  if test "x$path" != "x$new_path"; then
25564    BOOT_JDK="$new_path"
25565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25567  fi
25568
25569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25570
25571  path="$BOOT_JDK"
25572  has_colon=`$ECHO $path | $GREP ^.:`
25573  new_path="$path"
25574  if test "x$has_colon" = x; then
25575    # Not in mixed or Windows style, start by that.
25576    new_path=`cmd //c echo $path`
25577  fi
25578
25579
25580  input_path="$new_path"
25581  # Check if we need to convert this using DOS-style short mode. If the path
25582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25583  # take no chances and rewrite it.
25584  # Note: m4 eats our [], so we need to use [ and ] instead.
25585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25586  if test "x$has_forbidden_chars" != x; then
25587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25589  fi
25590
25591
25592  windows_path="$new_path"
25593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25594    unix_path=`$CYGPATH -u "$windows_path"`
25595    new_path="$unix_path"
25596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25598    new_path="$unix_path"
25599  fi
25600
25601  if test "x$path" != "x$new_path"; then
25602    BOOT_JDK="$new_path"
25603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25605  fi
25606
25607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25609
25610    else
25611      # We're on a unix platform. Hooray! :)
25612      path="$BOOT_JDK"
25613      has_space=`$ECHO "$path" | $GREP " "`
25614      if test "x$has_space" != x; then
25615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25618      fi
25619
25620      # Use eval to expand a potential ~
25621      eval path="$path"
25622      if test ! -f "$path" && test ! -d "$path"; then
25623        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25624      fi
25625
25626      if test -d "$path"; then
25627        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25628      else
25629        dir="`$DIRNAME "$path"`"
25630        base="`$BASENAME "$path"`"
25631        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25632      fi
25633    fi
25634  fi
25635
25636            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25637$as_echo_n "checking for Boot JDK... " >&6; }
25638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25639$as_echo "$BOOT_JDK" >&6; }
25640            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25641$as_echo_n "checking Boot JDK version... " >&6; }
25642            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25644$as_echo "$BOOT_JDK_VERSION" >&6; }
25645          fi # end check jdk version
25646        fi # end check javac
25647      fi # end check java
25648    fi # end check boot jdk found
25649  fi
25650
25651
25652  if test "x$BOOT_JDK_FOUND" = xno; then
25653    # Now execute the test
25654
25655  if test -x /usr/libexec/java_home; then
25656    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25657    BOOT_JDK_FOUND=maybe
25658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25659$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25660  fi
25661
25662
25663    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25664    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25665      # Do we have a bin/java?
25666      if test ! -x "$BOOT_JDK/bin/java"; then
25667        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25669        BOOT_JDK_FOUND=no
25670      else
25671        # Do we have a bin/javac?
25672        if test ! -x "$BOOT_JDK/bin/javac"; then
25673          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25675          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25676$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25677          BOOT_JDK_FOUND=no
25678        else
25679          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25680          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25681
25682          # Extra M4 quote needed to protect [] in grep expression.
25683          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25684          if test "x$FOUND_CORRECT_VERSION" = x; then
25685            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25687            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25688$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25689            BOOT_JDK_FOUND=no
25690          else
25691            # We're done! :-)
25692            BOOT_JDK_FOUND=yes
25693
25694  # Only process if variable expands to non-empty
25695
25696  if test "x$BOOT_JDK" != x; then
25697    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25698
25699  # Input might be given as Windows format, start by converting to
25700  # unix format.
25701  path="$BOOT_JDK"
25702  new_path=`$CYGPATH -u "$path"`
25703
25704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25707  # "foo.exe" is OK but "foo" is an error.
25708  #
25709  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25710  # It is also a way to make sure we got the proper file name for the real test later on.
25711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25712  if test "x$test_shortpath" = x; then
25713    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25715    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25716  fi
25717
25718  # Call helper function which possibly converts this using DOS-style short mode.
25719  # If so, the updated path is stored in $new_path.
25720
25721  input_path="$new_path"
25722  # Check if we need to convert this using DOS-style short mode. If the path
25723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25724  # take no chances and rewrite it.
25725  # Note: m4 eats our [], so we need to use [ and ] instead.
25726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25727  if test "x$has_forbidden_chars" != x; then
25728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25732      # Going to short mode and back again did indeed matter. Since short mode is
25733      # case insensitive, let's make it lowercase to improve readability.
25734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25735      # Now convert it back to Unix-style (cygpath)
25736      input_path=`$CYGPATH -u "$shortmode_path"`
25737      new_path="$input_path"
25738    fi
25739  fi
25740
25741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25742  if test "x$test_cygdrive_prefix" = x; then
25743    # As a simple fix, exclude /usr/bin since it's not a real path.
25744    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25746      # a path prefixed by /cygdrive for fixpath to work.
25747      new_path="$CYGWIN_ROOT_PATH$input_path"
25748    fi
25749  fi
25750
25751
25752  if test "x$path" != "x$new_path"; then
25753    BOOT_JDK="$new_path"
25754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25755$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25756  fi
25757
25758    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25759
25760  path="$BOOT_JDK"
25761  has_colon=`$ECHO $path | $GREP ^.:`
25762  new_path="$path"
25763  if test "x$has_colon" = x; then
25764    # Not in mixed or Windows style, start by that.
25765    new_path=`cmd //c echo $path`
25766  fi
25767
25768
25769  input_path="$new_path"
25770  # Check if we need to convert this using DOS-style short mode. If the path
25771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25772  # take no chances and rewrite it.
25773  # Note: m4 eats our [], so we need to use [ and ] instead.
25774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25775  if test "x$has_forbidden_chars" != x; then
25776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25778  fi
25779
25780
25781  windows_path="$new_path"
25782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25783    unix_path=`$CYGPATH -u "$windows_path"`
25784    new_path="$unix_path"
25785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25787    new_path="$unix_path"
25788  fi
25789
25790  if test "x$path" != "x$new_path"; then
25791    BOOT_JDK="$new_path"
25792    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25793$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25794  fi
25795
25796  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25797  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25798
25799    else
25800      # We're on a unix platform. Hooray! :)
25801      path="$BOOT_JDK"
25802      has_space=`$ECHO "$path" | $GREP " "`
25803      if test "x$has_space" != x; then
25804        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25806        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25807      fi
25808
25809      # Use eval to expand a potential ~
25810      eval path="$path"
25811      if test ! -f "$path" && test ! -d "$path"; then
25812        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25813      fi
25814
25815      if test -d "$path"; then
25816        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25817      else
25818        dir="`$DIRNAME "$path"`"
25819        base="`$BASENAME "$path"`"
25820        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25821      fi
25822    fi
25823  fi
25824
25825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25826$as_echo_n "checking for Boot JDK... " >&6; }
25827            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25828$as_echo "$BOOT_JDK" >&6; }
25829            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25830$as_echo_n "checking Boot JDK version... " >&6; }
25831            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25833$as_echo "$BOOT_JDK_VERSION" >&6; }
25834          fi # end check jdk version
25835        fi # end check javac
25836      fi # end check java
25837    fi # end check boot jdk found
25838  fi
25839
25840  fi
25841
25842
25843    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25844    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25845      # Do we have a bin/java?
25846      if test ! -x "$BOOT_JDK/bin/java"; then
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25849        BOOT_JDK_FOUND=no
25850      else
25851        # Do we have a bin/javac?
25852        if test ! -x "$BOOT_JDK/bin/javac"; then
25853          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25855          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25856$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25857          BOOT_JDK_FOUND=no
25858        else
25859          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25860          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25861
25862          # Extra M4 quote needed to protect [] in grep expression.
25863          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25864          if test "x$FOUND_CORRECT_VERSION" = x; then
25865            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25867            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25869            BOOT_JDK_FOUND=no
25870          else
25871            # We're done! :-)
25872            BOOT_JDK_FOUND=yes
25873
25874  # Only process if variable expands to non-empty
25875
25876  if test "x$BOOT_JDK" != x; then
25877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25878
25879  # Input might be given as Windows format, start by converting to
25880  # unix format.
25881  path="$BOOT_JDK"
25882  new_path=`$CYGPATH -u "$path"`
25883
25884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25887  # "foo.exe" is OK but "foo" is an error.
25888  #
25889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25890  # It is also a way to make sure we got the proper file name for the real test later on.
25891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25892  if test "x$test_shortpath" = x; then
25893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25896  fi
25897
25898  # Call helper function which possibly converts this using DOS-style short mode.
25899  # If so, the updated path is stored in $new_path.
25900
25901  input_path="$new_path"
25902  # Check if we need to convert this using DOS-style short mode. If the path
25903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25904  # take no chances and rewrite it.
25905  # Note: m4 eats our [], so we need to use [ and ] instead.
25906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25907  if test "x$has_forbidden_chars" != x; then
25908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25912      # Going to short mode and back again did indeed matter. Since short mode is
25913      # case insensitive, let's make it lowercase to improve readability.
25914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25915      # Now convert it back to Unix-style (cygpath)
25916      input_path=`$CYGPATH -u "$shortmode_path"`
25917      new_path="$input_path"
25918    fi
25919  fi
25920
25921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25922  if test "x$test_cygdrive_prefix" = x; then
25923    # As a simple fix, exclude /usr/bin since it's not a real path.
25924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25926      # a path prefixed by /cygdrive for fixpath to work.
25927      new_path="$CYGWIN_ROOT_PATH$input_path"
25928    fi
25929  fi
25930
25931
25932  if test "x$path" != "x$new_path"; then
25933    BOOT_JDK="$new_path"
25934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25936  fi
25937
25938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25939
25940  path="$BOOT_JDK"
25941  has_colon=`$ECHO $path | $GREP ^.:`
25942  new_path="$path"
25943  if test "x$has_colon" = x; then
25944    # Not in mixed or Windows style, start by that.
25945    new_path=`cmd //c echo $path`
25946  fi
25947
25948
25949  input_path="$new_path"
25950  # Check if we need to convert this using DOS-style short mode. If the path
25951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25952  # take no chances and rewrite it.
25953  # Note: m4 eats our [], so we need to use [ and ] instead.
25954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25955  if test "x$has_forbidden_chars" != x; then
25956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25958  fi
25959
25960
25961  windows_path="$new_path"
25962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25963    unix_path=`$CYGPATH -u "$windows_path"`
25964    new_path="$unix_path"
25965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25967    new_path="$unix_path"
25968  fi
25969
25970  if test "x$path" != "x$new_path"; then
25971    BOOT_JDK="$new_path"
25972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25974  fi
25975
25976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25978
25979    else
25980      # We're on a unix platform. Hooray! :)
25981      path="$BOOT_JDK"
25982      has_space=`$ECHO "$path" | $GREP " "`
25983      if test "x$has_space" != x; then
25984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25987      fi
25988
25989      # Use eval to expand a potential ~
25990      eval path="$path"
25991      if test ! -f "$path" && test ! -d "$path"; then
25992        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25993      fi
25994
25995      if test -d "$path"; then
25996        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25997      else
25998        dir="`$DIRNAME "$path"`"
25999        base="`$BASENAME "$path"`"
26000        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26001      fi
26002    fi
26003  fi
26004
26005            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26006$as_echo_n "checking for Boot JDK... " >&6; }
26007            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26008$as_echo "$BOOT_JDK" >&6; }
26009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26010$as_echo_n "checking Boot JDK version... " >&6; }
26011            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26013$as_echo "$BOOT_JDK_VERSION" >&6; }
26014          fi # end check jdk version
26015        fi # end check javac
26016      fi # end check java
26017    fi # end check boot jdk found
26018  fi
26019
26020
26021  # Test: Is $JAVA_HOME set?
26022
26023  if test "x$BOOT_JDK_FOUND" = xno; then
26024    # Now execute the test
26025
26026  if test "x$JAVA_HOME" != x; then
26027    JAVA_HOME_PROCESSED="$JAVA_HOME"
26028
26029  # Only process if variable expands to non-empty
26030
26031  if test "x$JAVA_HOME_PROCESSED" != x; then
26032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26033
26034  # Input might be given as Windows format, start by converting to
26035  # unix format.
26036  path="$JAVA_HOME_PROCESSED"
26037  new_path=`$CYGPATH -u "$path"`
26038
26039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26042  # "foo.exe" is OK but "foo" is an error.
26043  #
26044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26045  # It is also a way to make sure we got the proper file name for the real test later on.
26046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26047  if test "x$test_shortpath" = x; then
26048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26049$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26050    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26051  fi
26052
26053  # Call helper function which possibly converts this using DOS-style short mode.
26054  # If so, the updated path is stored in $new_path.
26055
26056  input_path="$new_path"
26057  # Check if we need to convert this using DOS-style short mode. If the path
26058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26059  # take no chances and rewrite it.
26060  # Note: m4 eats our [], so we need to use [ and ] instead.
26061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26062  if test "x$has_forbidden_chars" != x; then
26063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26067      # Going to short mode and back again did indeed matter. Since short mode is
26068      # case insensitive, let's make it lowercase to improve readability.
26069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26070      # Now convert it back to Unix-style (cygpath)
26071      input_path=`$CYGPATH -u "$shortmode_path"`
26072      new_path="$input_path"
26073    fi
26074  fi
26075
26076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26077  if test "x$test_cygdrive_prefix" = x; then
26078    # As a simple fix, exclude /usr/bin since it's not a real path.
26079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26081      # a path prefixed by /cygdrive for fixpath to work.
26082      new_path="$CYGWIN_ROOT_PATH$input_path"
26083    fi
26084  fi
26085
26086
26087  if test "x$path" != "x$new_path"; then
26088    JAVA_HOME_PROCESSED="$new_path"
26089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26090$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26091  fi
26092
26093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26094
26095  path="$JAVA_HOME_PROCESSED"
26096  has_colon=`$ECHO $path | $GREP ^.:`
26097  new_path="$path"
26098  if test "x$has_colon" = x; then
26099    # Not in mixed or Windows style, start by that.
26100    new_path=`cmd //c echo $path`
26101  fi
26102
26103
26104  input_path="$new_path"
26105  # Check if we need to convert this using DOS-style short mode. If the path
26106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26107  # take no chances and rewrite it.
26108  # Note: m4 eats our [], so we need to use [ and ] instead.
26109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26110  if test "x$has_forbidden_chars" != x; then
26111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26113  fi
26114
26115
26116  windows_path="$new_path"
26117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26118    unix_path=`$CYGPATH -u "$windows_path"`
26119    new_path="$unix_path"
26120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26122    new_path="$unix_path"
26123  fi
26124
26125  if test "x$path" != "x$new_path"; then
26126    JAVA_HOME_PROCESSED="$new_path"
26127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26128$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26129  fi
26130
26131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26133
26134    else
26135      # We're on a unix platform. Hooray! :)
26136      path="$JAVA_HOME_PROCESSED"
26137      has_space=`$ECHO "$path" | $GREP " "`
26138      if test "x$has_space" != x; then
26139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26140$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26142      fi
26143
26144      # Use eval to expand a potential ~
26145      eval path="$path"
26146      if test ! -f "$path" && test ! -d "$path"; then
26147        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26148      fi
26149
26150      if test -d "$path"; then
26151        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26152      else
26153        dir="`$DIRNAME "$path"`"
26154        base="`$BASENAME "$path"`"
26155        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26156      fi
26157    fi
26158  fi
26159
26160    if test ! -d "$JAVA_HOME_PROCESSED"; then
26161      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26162$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26163    else
26164      # Aha, the user has set a JAVA_HOME
26165      # let us use that as the Boot JDK.
26166      BOOT_JDK="$JAVA_HOME_PROCESSED"
26167      BOOT_JDK_FOUND=maybe
26168      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26169$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26170    fi
26171  fi
26172
26173
26174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26176      # Do we have a bin/java?
26177      if test ! -x "$BOOT_JDK/bin/java"; then
26178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26180        BOOT_JDK_FOUND=no
26181      else
26182        # Do we have a bin/javac?
26183        if test ! -x "$BOOT_JDK/bin/javac"; then
26184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26188          BOOT_JDK_FOUND=no
26189        else
26190          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26191          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26192
26193          # Extra M4 quote needed to protect [] in grep expression.
26194          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26195          if test "x$FOUND_CORRECT_VERSION" = x; then
26196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26198            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26200            BOOT_JDK_FOUND=no
26201          else
26202            # We're done! :-)
26203            BOOT_JDK_FOUND=yes
26204
26205  # Only process if variable expands to non-empty
26206
26207  if test "x$BOOT_JDK" != x; then
26208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26209
26210  # Input might be given as Windows format, start by converting to
26211  # unix format.
26212  path="$BOOT_JDK"
26213  new_path=`$CYGPATH -u "$path"`
26214
26215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26218  # "foo.exe" is OK but "foo" is an error.
26219  #
26220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26221  # It is also a way to make sure we got the proper file name for the real test later on.
26222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26223  if test "x$test_shortpath" = x; then
26224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26227  fi
26228
26229  # Call helper function which possibly converts this using DOS-style short mode.
26230  # If so, the updated path is stored in $new_path.
26231
26232  input_path="$new_path"
26233  # Check if we need to convert this using DOS-style short mode. If the path
26234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26235  # take no chances and rewrite it.
26236  # Note: m4 eats our [], so we need to use [ and ] instead.
26237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26238  if test "x$has_forbidden_chars" != x; then
26239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26243      # Going to short mode and back again did indeed matter. Since short mode is
26244      # case insensitive, let's make it lowercase to improve readability.
26245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26246      # Now convert it back to Unix-style (cygpath)
26247      input_path=`$CYGPATH -u "$shortmode_path"`
26248      new_path="$input_path"
26249    fi
26250  fi
26251
26252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26253  if test "x$test_cygdrive_prefix" = x; then
26254    # As a simple fix, exclude /usr/bin since it's not a real path.
26255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26257      # a path prefixed by /cygdrive for fixpath to work.
26258      new_path="$CYGWIN_ROOT_PATH$input_path"
26259    fi
26260  fi
26261
26262
26263  if test "x$path" != "x$new_path"; then
26264    BOOT_JDK="$new_path"
26265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26267  fi
26268
26269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26270
26271  path="$BOOT_JDK"
26272  has_colon=`$ECHO $path | $GREP ^.:`
26273  new_path="$path"
26274  if test "x$has_colon" = x; then
26275    # Not in mixed or Windows style, start by that.
26276    new_path=`cmd //c echo $path`
26277  fi
26278
26279
26280  input_path="$new_path"
26281  # Check if we need to convert this using DOS-style short mode. If the path
26282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26283  # take no chances and rewrite it.
26284  # Note: m4 eats our [], so we need to use [ and ] instead.
26285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26286  if test "x$has_forbidden_chars" != x; then
26287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26289  fi
26290
26291
26292  windows_path="$new_path"
26293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26294    unix_path=`$CYGPATH -u "$windows_path"`
26295    new_path="$unix_path"
26296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26298    new_path="$unix_path"
26299  fi
26300
26301  if test "x$path" != "x$new_path"; then
26302    BOOT_JDK="$new_path"
26303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26305  fi
26306
26307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26309
26310    else
26311      # We're on a unix platform. Hooray! :)
26312      path="$BOOT_JDK"
26313      has_space=`$ECHO "$path" | $GREP " "`
26314      if test "x$has_space" != x; then
26315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26318      fi
26319
26320      # Use eval to expand a potential ~
26321      eval path="$path"
26322      if test ! -f "$path" && test ! -d "$path"; then
26323        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26324      fi
26325
26326      if test -d "$path"; then
26327        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26328      else
26329        dir="`$DIRNAME "$path"`"
26330        base="`$BASENAME "$path"`"
26331        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26332      fi
26333    fi
26334  fi
26335
26336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26337$as_echo_n "checking for Boot JDK... " >&6; }
26338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26339$as_echo "$BOOT_JDK" >&6; }
26340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26341$as_echo_n "checking Boot JDK version... " >&6; }
26342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26344$as_echo "$BOOT_JDK_VERSION" >&6; }
26345          fi # end check jdk version
26346        fi # end check javac
26347      fi # end check java
26348    fi # end check boot jdk found
26349  fi
26350
26351
26352  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26353
26354  if test "x$BOOT_JDK_FOUND" = xno; then
26355    # Now execute the test
26356
26357  # Extract the first word of "javac", so it can be a program name with args.
26358set dummy javac; ac_word=$2
26359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26360$as_echo_n "checking for $ac_word... " >&6; }
26361if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26362  $as_echo_n "(cached) " >&6
26363else
26364  case $JAVAC_CHECK in
26365  [\\/]* | ?:[\\/]*)
26366  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26367  ;;
26368  *)
26369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26370for as_dir in $PATH
26371do
26372  IFS=$as_save_IFS
26373  test -z "$as_dir" && as_dir=.
26374    for ac_exec_ext in '' $ac_executable_extensions; do
26375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26376    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26378    break 2
26379  fi
26380done
26381  done
26382IFS=$as_save_IFS
26383
26384  ;;
26385esac
26386fi
26387JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26388if test -n "$JAVAC_CHECK"; then
26389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26390$as_echo "$JAVAC_CHECK" >&6; }
26391else
26392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26393$as_echo "no" >&6; }
26394fi
26395
26396
26397  # Extract the first word of "java", so it can be a program name with args.
26398set dummy java; ac_word=$2
26399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26400$as_echo_n "checking for $ac_word... " >&6; }
26401if ${ac_cv_path_JAVA_CHECK+:} false; then :
26402  $as_echo_n "(cached) " >&6
26403else
26404  case $JAVA_CHECK in
26405  [\\/]* | ?:[\\/]*)
26406  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26407  ;;
26408  *)
26409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26410for as_dir in $PATH
26411do
26412  IFS=$as_save_IFS
26413  test -z "$as_dir" && as_dir=.
26414    for ac_exec_ext in '' $ac_executable_extensions; do
26415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26416    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26418    break 2
26419  fi
26420done
26421  done
26422IFS=$as_save_IFS
26423
26424  ;;
26425esac
26426fi
26427JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26428if test -n "$JAVA_CHECK"; then
26429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26430$as_echo "$JAVA_CHECK" >&6; }
26431else
26432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26433$as_echo "no" >&6; }
26434fi
26435
26436
26437  BINARY="$JAVAC_CHECK"
26438  if test "x$JAVAC_CHECK" = x; then
26439    BINARY="$JAVA_CHECK"
26440  fi
26441  if test "x$BINARY" != x; then
26442    # So there is a java(c) binary, it might be part of a JDK.
26443    # Lets find the JDK/JRE directory by following symbolic links.
26444    # Linux/GNU systems often have links from /usr/bin/java to
26445    # /etc/alternatives/java to the real JDK binary.
26446
26447  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26448    # Follow a chain of symbolic links. Use readlink
26449    # where it exists, else fall back to horribly
26450    # complicated shell code.
26451    if test "x$READLINK_TESTED" != yes; then
26452      # On MacOSX there is a readlink tool with a different
26453      # purpose than the GNU readlink tool. Check the found readlink.
26454      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26455      if test "x$ISGNU" = x; then
26456        # A readlink that we do not know how to use.
26457        # Are there other non-GNU readlinks out there?
26458        READLINK_TESTED=yes
26459        READLINK=
26460      fi
26461    fi
26462
26463    if test "x$READLINK" != x; then
26464      BINARY=`$READLINK -f $BINARY`
26465    else
26466      # Save the current directory for restoring afterwards
26467      STARTDIR=$PWD
26468      COUNTER=0
26469      sym_link_dir=`$DIRNAME $BINARY`
26470      sym_link_file=`$BASENAME $BINARY`
26471      cd $sym_link_dir
26472      # Use -P flag to resolve symlinks in directories.
26473      cd `$THEPWDCMD -P`
26474      sym_link_dir=`$THEPWDCMD -P`
26475      # Resolve file symlinks
26476      while test $COUNTER -lt 20; do
26477        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26478        if test "x$ISLINK" == x; then
26479          # This is not a symbolic link! We are done!
26480          break
26481        fi
26482        # Again resolve directory symlinks since the target of the just found
26483        # link could be in a different directory
26484        cd `$DIRNAME $ISLINK`
26485        sym_link_dir=`$THEPWDCMD -P`
26486        sym_link_file=`$BASENAME $ISLINK`
26487        let COUNTER=COUNTER+1
26488      done
26489      cd $STARTDIR
26490      BINARY=$sym_link_dir/$sym_link_file
26491    fi
26492  fi
26493
26494    BOOT_JDK=`dirname "$BINARY"`
26495    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26496    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26497      # Looks like we found ourselves an JDK
26498      BOOT_JDK_FOUND=maybe
26499      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26500$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26501    fi
26502  fi
26503
26504
26505    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26506    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26507      # Do we have a bin/java?
26508      if test ! -x "$BOOT_JDK/bin/java"; then
26509        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26511        BOOT_JDK_FOUND=no
26512      else
26513        # Do we have a bin/javac?
26514        if test ! -x "$BOOT_JDK/bin/javac"; then
26515          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26517          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26518$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26519          BOOT_JDK_FOUND=no
26520        else
26521          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26522          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26523
26524          # Extra M4 quote needed to protect [] in grep expression.
26525          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26526          if test "x$FOUND_CORRECT_VERSION" = x; then
26527            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26529            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26530$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26531            BOOT_JDK_FOUND=no
26532          else
26533            # We're done! :-)
26534            BOOT_JDK_FOUND=yes
26535
26536  # Only process if variable expands to non-empty
26537
26538  if test "x$BOOT_JDK" != x; then
26539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26540
26541  # Input might be given as Windows format, start by converting to
26542  # unix format.
26543  path="$BOOT_JDK"
26544  new_path=`$CYGPATH -u "$path"`
26545
26546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26549  # "foo.exe" is OK but "foo" is an error.
26550  #
26551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26552  # It is also a way to make sure we got the proper file name for the real test later on.
26553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26554  if test "x$test_shortpath" = x; then
26555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26557    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26558  fi
26559
26560  # Call helper function which possibly converts this using DOS-style short mode.
26561  # If so, the updated path is stored in $new_path.
26562
26563  input_path="$new_path"
26564  # Check if we need to convert this using DOS-style short mode. If the path
26565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26566  # take no chances and rewrite it.
26567  # Note: m4 eats our [], so we need to use [ and ] instead.
26568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26569  if test "x$has_forbidden_chars" != x; then
26570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26574      # Going to short mode and back again did indeed matter. Since short mode is
26575      # case insensitive, let's make it lowercase to improve readability.
26576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26577      # Now convert it back to Unix-style (cygpath)
26578      input_path=`$CYGPATH -u "$shortmode_path"`
26579      new_path="$input_path"
26580    fi
26581  fi
26582
26583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26584  if test "x$test_cygdrive_prefix" = x; then
26585    # As a simple fix, exclude /usr/bin since it's not a real path.
26586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26588      # a path prefixed by /cygdrive for fixpath to work.
26589      new_path="$CYGWIN_ROOT_PATH$input_path"
26590    fi
26591  fi
26592
26593
26594  if test "x$path" != "x$new_path"; then
26595    BOOT_JDK="$new_path"
26596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26598  fi
26599
26600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26601
26602  path="$BOOT_JDK"
26603  has_colon=`$ECHO $path | $GREP ^.:`
26604  new_path="$path"
26605  if test "x$has_colon" = x; then
26606    # Not in mixed or Windows style, start by that.
26607    new_path=`cmd //c echo $path`
26608  fi
26609
26610
26611  input_path="$new_path"
26612  # Check if we need to convert this using DOS-style short mode. If the path
26613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26614  # take no chances and rewrite it.
26615  # Note: m4 eats our [], so we need to use [ and ] instead.
26616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26617  if test "x$has_forbidden_chars" != x; then
26618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26620  fi
26621
26622
26623  windows_path="$new_path"
26624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26625    unix_path=`$CYGPATH -u "$windows_path"`
26626    new_path="$unix_path"
26627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26629    new_path="$unix_path"
26630  fi
26631
26632  if test "x$path" != "x$new_path"; then
26633    BOOT_JDK="$new_path"
26634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26636  fi
26637
26638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26640
26641    else
26642      # We're on a unix platform. Hooray! :)
26643      path="$BOOT_JDK"
26644      has_space=`$ECHO "$path" | $GREP " "`
26645      if test "x$has_space" != x; then
26646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26649      fi
26650
26651      # Use eval to expand a potential ~
26652      eval path="$path"
26653      if test ! -f "$path" && test ! -d "$path"; then
26654        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26655      fi
26656
26657      if test -d "$path"; then
26658        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26659      else
26660        dir="`$DIRNAME "$path"`"
26661        base="`$BASENAME "$path"`"
26662        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26663      fi
26664    fi
26665  fi
26666
26667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26668$as_echo_n "checking for Boot JDK... " >&6; }
26669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26670$as_echo "$BOOT_JDK" >&6; }
26671            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26672$as_echo_n "checking Boot JDK version... " >&6; }
26673            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26675$as_echo "$BOOT_JDK_VERSION" >&6; }
26676          fi # end check jdk version
26677        fi # end check javac
26678      fi # end check java
26679    fi # end check boot jdk found
26680  fi
26681
26682
26683  # Test: Is there a JDK installed in default, well-known locations?
26684
26685  if test "x$BOOT_JDK_FOUND" = xno; then
26686    # Now execute the test
26687
26688  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26689
26690  if test "x$BOOT_JDK_FOUND" = xno; then
26691    # Now execute the test
26692
26693  if test "x$ProgramW6432" != x; then
26694    VIRTUAL_DIR="$ProgramW6432/Java"
26695
26696  windows_path="$VIRTUAL_DIR"
26697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26698    unix_path=`$CYGPATH -u "$windows_path"`
26699    VIRTUAL_DIR="$unix_path"
26700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26702    VIRTUAL_DIR="$unix_path"
26703  fi
26704
26705
26706  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26707  BOOT_JDK_SUFFIX=""
26708  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26709  if test "x$ALL_JDKS_FOUND" != x; then
26710    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26711
26712  if test "x$BOOT_JDK_FOUND" = xno; then
26713    # Now execute the test
26714
26715        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26716        if test -d "$BOOT_JDK"; then
26717          BOOT_JDK_FOUND=maybe
26718          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26719$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26720        fi
26721
26722
26723    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26724    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26725      # Do we have a bin/java?
26726      if test ! -x "$BOOT_JDK/bin/java"; then
26727        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26729        BOOT_JDK_FOUND=no
26730      else
26731        # Do we have a bin/javac?
26732        if test ! -x "$BOOT_JDK/bin/javac"; then
26733          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26735          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26736$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26737          BOOT_JDK_FOUND=no
26738        else
26739          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26740          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26741
26742          # Extra M4 quote needed to protect [] in grep expression.
26743          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26744          if test "x$FOUND_CORRECT_VERSION" = x; then
26745            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26747            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26748$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26749            BOOT_JDK_FOUND=no
26750          else
26751            # We're done! :-)
26752            BOOT_JDK_FOUND=yes
26753
26754  # Only process if variable expands to non-empty
26755
26756  if test "x$BOOT_JDK" != x; then
26757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26758
26759  # Input might be given as Windows format, start by converting to
26760  # unix format.
26761  path="$BOOT_JDK"
26762  new_path=`$CYGPATH -u "$path"`
26763
26764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26767  # "foo.exe" is OK but "foo" is an error.
26768  #
26769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26770  # It is also a way to make sure we got the proper file name for the real test later on.
26771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26772  if test "x$test_shortpath" = x; then
26773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26775    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26776  fi
26777
26778  # Call helper function which possibly converts this using DOS-style short mode.
26779  # If so, the updated path is stored in $new_path.
26780
26781  input_path="$new_path"
26782  # Check if we need to convert this using DOS-style short mode. If the path
26783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26784  # take no chances and rewrite it.
26785  # Note: m4 eats our [], so we need to use [ and ] instead.
26786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26787  if test "x$has_forbidden_chars" != x; then
26788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26792      # Going to short mode and back again did indeed matter. Since short mode is
26793      # case insensitive, let's make it lowercase to improve readability.
26794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26795      # Now convert it back to Unix-style (cygpath)
26796      input_path=`$CYGPATH -u "$shortmode_path"`
26797      new_path="$input_path"
26798    fi
26799  fi
26800
26801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26802  if test "x$test_cygdrive_prefix" = x; then
26803    # As a simple fix, exclude /usr/bin since it's not a real path.
26804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26806      # a path prefixed by /cygdrive for fixpath to work.
26807      new_path="$CYGWIN_ROOT_PATH$input_path"
26808    fi
26809  fi
26810
26811
26812  if test "x$path" != "x$new_path"; then
26813    BOOT_JDK="$new_path"
26814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26816  fi
26817
26818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26819
26820  path="$BOOT_JDK"
26821  has_colon=`$ECHO $path | $GREP ^.:`
26822  new_path="$path"
26823  if test "x$has_colon" = x; then
26824    # Not in mixed or Windows style, start by that.
26825    new_path=`cmd //c echo $path`
26826  fi
26827
26828
26829  input_path="$new_path"
26830  # Check if we need to convert this using DOS-style short mode. If the path
26831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26832  # take no chances and rewrite it.
26833  # Note: m4 eats our [], so we need to use [ and ] instead.
26834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26835  if test "x$has_forbidden_chars" != x; then
26836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26838  fi
26839
26840
26841  windows_path="$new_path"
26842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26843    unix_path=`$CYGPATH -u "$windows_path"`
26844    new_path="$unix_path"
26845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26847    new_path="$unix_path"
26848  fi
26849
26850  if test "x$path" != "x$new_path"; then
26851    BOOT_JDK="$new_path"
26852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26854  fi
26855
26856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26858
26859    else
26860      # We're on a unix platform. Hooray! :)
26861      path="$BOOT_JDK"
26862      has_space=`$ECHO "$path" | $GREP " "`
26863      if test "x$has_space" != x; then
26864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26865$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26866        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26867      fi
26868
26869      # Use eval to expand a potential ~
26870      eval path="$path"
26871      if test ! -f "$path" && test ! -d "$path"; then
26872        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26873      fi
26874
26875      if test -d "$path"; then
26876        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26877      else
26878        dir="`$DIRNAME "$path"`"
26879        base="`$BASENAME "$path"`"
26880        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26881      fi
26882    fi
26883  fi
26884
26885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26886$as_echo_n "checking for Boot JDK... " >&6; }
26887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26888$as_echo "$BOOT_JDK" >&6; }
26889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26890$as_echo_n "checking Boot JDK version... " >&6; }
26891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26893$as_echo "$BOOT_JDK_VERSION" >&6; }
26894          fi # end check jdk version
26895        fi # end check javac
26896      fi # end check java
26897    fi # end check boot jdk found
26898  fi
26899
26900    done
26901  fi
26902
26903  fi
26904
26905
26906    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26907    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26908      # Do we have a bin/java?
26909      if test ! -x "$BOOT_JDK/bin/java"; then
26910        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26912        BOOT_JDK_FOUND=no
26913      else
26914        # Do we have a bin/javac?
26915        if test ! -x "$BOOT_JDK/bin/javac"; then
26916          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26918          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26919$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26920          BOOT_JDK_FOUND=no
26921        else
26922          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26923          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26924
26925          # Extra M4 quote needed to protect [] in grep expression.
26926          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26927          if test "x$FOUND_CORRECT_VERSION" = x; then
26928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26930            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26931$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26932            BOOT_JDK_FOUND=no
26933          else
26934            # We're done! :-)
26935            BOOT_JDK_FOUND=yes
26936
26937  # Only process if variable expands to non-empty
26938
26939  if test "x$BOOT_JDK" != x; then
26940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941
26942  # Input might be given as Windows format, start by converting to
26943  # unix format.
26944  path="$BOOT_JDK"
26945  new_path=`$CYGPATH -u "$path"`
26946
26947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26950  # "foo.exe" is OK but "foo" is an error.
26951  #
26952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26953  # It is also a way to make sure we got the proper file name for the real test later on.
26954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26955  if test "x$test_shortpath" = x; then
26956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26958    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26959  fi
26960
26961  # Call helper function which possibly converts this using DOS-style short mode.
26962  # If so, the updated path is stored in $new_path.
26963
26964  input_path="$new_path"
26965  # Check if we need to convert this using DOS-style short mode. If the path
26966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26967  # take no chances and rewrite it.
26968  # Note: m4 eats our [], so we need to use [ and ] instead.
26969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26970  if test "x$has_forbidden_chars" != x; then
26971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26975      # Going to short mode and back again did indeed matter. Since short mode is
26976      # case insensitive, let's make it lowercase to improve readability.
26977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26978      # Now convert it back to Unix-style (cygpath)
26979      input_path=`$CYGPATH -u "$shortmode_path"`
26980      new_path="$input_path"
26981    fi
26982  fi
26983
26984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26985  if test "x$test_cygdrive_prefix" = x; then
26986    # As a simple fix, exclude /usr/bin since it's not a real path.
26987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26989      # a path prefixed by /cygdrive for fixpath to work.
26990      new_path="$CYGWIN_ROOT_PATH$input_path"
26991    fi
26992  fi
26993
26994
26995  if test "x$path" != "x$new_path"; then
26996    BOOT_JDK="$new_path"
26997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26999  fi
27000
27001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002
27003  path="$BOOT_JDK"
27004  has_colon=`$ECHO $path | $GREP ^.:`
27005  new_path="$path"
27006  if test "x$has_colon" = x; then
27007    # Not in mixed or Windows style, start by that.
27008    new_path=`cmd //c echo $path`
27009  fi
27010
27011
27012  input_path="$new_path"
27013  # Check if we need to convert this using DOS-style short mode. If the path
27014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27015  # take no chances and rewrite it.
27016  # Note: m4 eats our [], so we need to use [ and ] instead.
27017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27018  if test "x$has_forbidden_chars" != x; then
27019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27021  fi
27022
27023
27024  windows_path="$new_path"
27025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27026    unix_path=`$CYGPATH -u "$windows_path"`
27027    new_path="$unix_path"
27028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27030    new_path="$unix_path"
27031  fi
27032
27033  if test "x$path" != "x$new_path"; then
27034    BOOT_JDK="$new_path"
27035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27037  fi
27038
27039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27041
27042    else
27043      # We're on a unix platform. Hooray! :)
27044      path="$BOOT_JDK"
27045      has_space=`$ECHO "$path" | $GREP " "`
27046      if test "x$has_space" != x; then
27047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27050      fi
27051
27052      # Use eval to expand a potential ~
27053      eval path="$path"
27054      if test ! -f "$path" && test ! -d "$path"; then
27055        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27056      fi
27057
27058      if test -d "$path"; then
27059        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27060      else
27061        dir="`$DIRNAME "$path"`"
27062        base="`$BASENAME "$path"`"
27063        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27064      fi
27065    fi
27066  fi
27067
27068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27069$as_echo_n "checking for Boot JDK... " >&6; }
27070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27071$as_echo "$BOOT_JDK" >&6; }
27072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27073$as_echo_n "checking Boot JDK version... " >&6; }
27074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27076$as_echo "$BOOT_JDK_VERSION" >&6; }
27077          fi # end check jdk version
27078        fi # end check javac
27079      fi # end check java
27080    fi # end check boot jdk found
27081  fi
27082
27083
27084  if test "x$BOOT_JDK_FOUND" = xno; then
27085    # Now execute the test
27086
27087  if test "x$PROGRAMW6432" != x; then
27088    VIRTUAL_DIR="$PROGRAMW6432/Java"
27089
27090  windows_path="$VIRTUAL_DIR"
27091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27092    unix_path=`$CYGPATH -u "$windows_path"`
27093    VIRTUAL_DIR="$unix_path"
27094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27096    VIRTUAL_DIR="$unix_path"
27097  fi
27098
27099
27100  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27101  BOOT_JDK_SUFFIX=""
27102  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27103  if test "x$ALL_JDKS_FOUND" != x; then
27104    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27105
27106  if test "x$BOOT_JDK_FOUND" = xno; then
27107    # Now execute the test
27108
27109        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27110        if test -d "$BOOT_JDK"; then
27111          BOOT_JDK_FOUND=maybe
27112          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27113$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27114        fi
27115
27116
27117    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27118    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27119      # Do we have a bin/java?
27120      if test ! -x "$BOOT_JDK/bin/java"; then
27121        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27123        BOOT_JDK_FOUND=no
27124      else
27125        # Do we have a bin/javac?
27126        if test ! -x "$BOOT_JDK/bin/javac"; then
27127          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27129          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27130$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27131          BOOT_JDK_FOUND=no
27132        else
27133          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27134          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27135
27136          # Extra M4 quote needed to protect [] in grep expression.
27137          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27138          if test "x$FOUND_CORRECT_VERSION" = x; then
27139            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27141            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27142$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27143            BOOT_JDK_FOUND=no
27144          else
27145            # We're done! :-)
27146            BOOT_JDK_FOUND=yes
27147
27148  # Only process if variable expands to non-empty
27149
27150  if test "x$BOOT_JDK" != x; then
27151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27152
27153  # Input might be given as Windows format, start by converting to
27154  # unix format.
27155  path="$BOOT_JDK"
27156  new_path=`$CYGPATH -u "$path"`
27157
27158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27161  # "foo.exe" is OK but "foo" is an error.
27162  #
27163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27164  # It is also a way to make sure we got the proper file name for the real test later on.
27165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27166  if test "x$test_shortpath" = x; then
27167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27169    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27170  fi
27171
27172  # Call helper function which possibly converts this using DOS-style short mode.
27173  # If so, the updated path is stored in $new_path.
27174
27175  input_path="$new_path"
27176  # Check if we need to convert this using DOS-style short mode. If the path
27177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27178  # take no chances and rewrite it.
27179  # Note: m4 eats our [], so we need to use [ and ] instead.
27180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27181  if test "x$has_forbidden_chars" != x; then
27182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27186      # Going to short mode and back again did indeed matter. Since short mode is
27187      # case insensitive, let's make it lowercase to improve readability.
27188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27189      # Now convert it back to Unix-style (cygpath)
27190      input_path=`$CYGPATH -u "$shortmode_path"`
27191      new_path="$input_path"
27192    fi
27193  fi
27194
27195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27196  if test "x$test_cygdrive_prefix" = x; then
27197    # As a simple fix, exclude /usr/bin since it's not a real path.
27198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27200      # a path prefixed by /cygdrive for fixpath to work.
27201      new_path="$CYGWIN_ROOT_PATH$input_path"
27202    fi
27203  fi
27204
27205
27206  if test "x$path" != "x$new_path"; then
27207    BOOT_JDK="$new_path"
27208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27210  fi
27211
27212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27213
27214  path="$BOOT_JDK"
27215  has_colon=`$ECHO $path | $GREP ^.:`
27216  new_path="$path"
27217  if test "x$has_colon" = x; then
27218    # Not in mixed or Windows style, start by that.
27219    new_path=`cmd //c echo $path`
27220  fi
27221
27222
27223  input_path="$new_path"
27224  # Check if we need to convert this using DOS-style short mode. If the path
27225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27226  # take no chances and rewrite it.
27227  # Note: m4 eats our [], so we need to use [ and ] instead.
27228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27229  if test "x$has_forbidden_chars" != x; then
27230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27232  fi
27233
27234
27235  windows_path="$new_path"
27236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27237    unix_path=`$CYGPATH -u "$windows_path"`
27238    new_path="$unix_path"
27239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27241    new_path="$unix_path"
27242  fi
27243
27244  if test "x$path" != "x$new_path"; then
27245    BOOT_JDK="$new_path"
27246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27247$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27248  fi
27249
27250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27252
27253    else
27254      # We're on a unix platform. Hooray! :)
27255      path="$BOOT_JDK"
27256      has_space=`$ECHO "$path" | $GREP " "`
27257      if test "x$has_space" != x; then
27258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27261      fi
27262
27263      # Use eval to expand a potential ~
27264      eval path="$path"
27265      if test ! -f "$path" && test ! -d "$path"; then
27266        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27267      fi
27268
27269      if test -d "$path"; then
27270        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27271      else
27272        dir="`$DIRNAME "$path"`"
27273        base="`$BASENAME "$path"`"
27274        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27275      fi
27276    fi
27277  fi
27278
27279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27280$as_echo_n "checking for Boot JDK... " >&6; }
27281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27282$as_echo "$BOOT_JDK" >&6; }
27283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27284$as_echo_n "checking Boot JDK version... " >&6; }
27285            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27287$as_echo "$BOOT_JDK_VERSION" >&6; }
27288          fi # end check jdk version
27289        fi # end check javac
27290      fi # end check java
27291    fi # end check boot jdk found
27292  fi
27293
27294    done
27295  fi
27296
27297  fi
27298
27299
27300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27302      # Do we have a bin/java?
27303      if test ! -x "$BOOT_JDK/bin/java"; then
27304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27306        BOOT_JDK_FOUND=no
27307      else
27308        # Do we have a bin/javac?
27309        if test ! -x "$BOOT_JDK/bin/javac"; then
27310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27314          BOOT_JDK_FOUND=no
27315        else
27316          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27317          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27318
27319          # Extra M4 quote needed to protect [] in grep expression.
27320          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27321          if test "x$FOUND_CORRECT_VERSION" = x; then
27322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27324            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27325$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27326            BOOT_JDK_FOUND=no
27327          else
27328            # We're done! :-)
27329            BOOT_JDK_FOUND=yes
27330
27331  # Only process if variable expands to non-empty
27332
27333  if test "x$BOOT_JDK" != x; then
27334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27335
27336  # Input might be given as Windows format, start by converting to
27337  # unix format.
27338  path="$BOOT_JDK"
27339  new_path=`$CYGPATH -u "$path"`
27340
27341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27344  # "foo.exe" is OK but "foo" is an error.
27345  #
27346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27347  # It is also a way to make sure we got the proper file name for the real test later on.
27348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27349  if test "x$test_shortpath" = x; then
27350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27352    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27353  fi
27354
27355  # Call helper function which possibly converts this using DOS-style short mode.
27356  # If so, the updated path is stored in $new_path.
27357
27358  input_path="$new_path"
27359  # Check if we need to convert this using DOS-style short mode. If the path
27360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27361  # take no chances and rewrite it.
27362  # Note: m4 eats our [], so we need to use [ and ] instead.
27363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27364  if test "x$has_forbidden_chars" != x; then
27365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27369      # Going to short mode and back again did indeed matter. Since short mode is
27370      # case insensitive, let's make it lowercase to improve readability.
27371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27372      # Now convert it back to Unix-style (cygpath)
27373      input_path=`$CYGPATH -u "$shortmode_path"`
27374      new_path="$input_path"
27375    fi
27376  fi
27377
27378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27379  if test "x$test_cygdrive_prefix" = x; then
27380    # As a simple fix, exclude /usr/bin since it's not a real path.
27381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27383      # a path prefixed by /cygdrive for fixpath to work.
27384      new_path="$CYGWIN_ROOT_PATH$input_path"
27385    fi
27386  fi
27387
27388
27389  if test "x$path" != "x$new_path"; then
27390    BOOT_JDK="$new_path"
27391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27393  fi
27394
27395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27396
27397  path="$BOOT_JDK"
27398  has_colon=`$ECHO $path | $GREP ^.:`
27399  new_path="$path"
27400  if test "x$has_colon" = x; then
27401    # Not in mixed or Windows style, start by that.
27402    new_path=`cmd //c echo $path`
27403  fi
27404
27405
27406  input_path="$new_path"
27407  # Check if we need to convert this using DOS-style short mode. If the path
27408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27409  # take no chances and rewrite it.
27410  # Note: m4 eats our [], so we need to use [ and ] instead.
27411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27412  if test "x$has_forbidden_chars" != x; then
27413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27415  fi
27416
27417
27418  windows_path="$new_path"
27419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27420    unix_path=`$CYGPATH -u "$windows_path"`
27421    new_path="$unix_path"
27422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27424    new_path="$unix_path"
27425  fi
27426
27427  if test "x$path" != "x$new_path"; then
27428    BOOT_JDK="$new_path"
27429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27431  fi
27432
27433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27435
27436    else
27437      # We're on a unix platform. Hooray! :)
27438      path="$BOOT_JDK"
27439      has_space=`$ECHO "$path" | $GREP " "`
27440      if test "x$has_space" != x; then
27441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27444      fi
27445
27446      # Use eval to expand a potential ~
27447      eval path="$path"
27448      if test ! -f "$path" && test ! -d "$path"; then
27449        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27450      fi
27451
27452      if test -d "$path"; then
27453        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27454      else
27455        dir="`$DIRNAME "$path"`"
27456        base="`$BASENAME "$path"`"
27457        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27458      fi
27459    fi
27460  fi
27461
27462            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27463$as_echo_n "checking for Boot JDK... " >&6; }
27464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27465$as_echo "$BOOT_JDK" >&6; }
27466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27467$as_echo_n "checking Boot JDK version... " >&6; }
27468            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27470$as_echo "$BOOT_JDK_VERSION" >&6; }
27471          fi # end check jdk version
27472        fi # end check javac
27473      fi # end check java
27474    fi # end check boot jdk found
27475  fi
27476
27477
27478  if test "x$BOOT_JDK_FOUND" = xno; then
27479    # Now execute the test
27480
27481  if test "x$PROGRAMFILES" != x; then
27482    VIRTUAL_DIR="$PROGRAMFILES/Java"
27483
27484  windows_path="$VIRTUAL_DIR"
27485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27486    unix_path=`$CYGPATH -u "$windows_path"`
27487    VIRTUAL_DIR="$unix_path"
27488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27490    VIRTUAL_DIR="$unix_path"
27491  fi
27492
27493
27494  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27495  BOOT_JDK_SUFFIX=""
27496  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27497  if test "x$ALL_JDKS_FOUND" != x; then
27498    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27499
27500  if test "x$BOOT_JDK_FOUND" = xno; then
27501    # Now execute the test
27502
27503        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27504        if test -d "$BOOT_JDK"; then
27505          BOOT_JDK_FOUND=maybe
27506          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27507$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27508        fi
27509
27510
27511    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27512    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27513      # Do we have a bin/java?
27514      if test ! -x "$BOOT_JDK/bin/java"; then
27515        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27517        BOOT_JDK_FOUND=no
27518      else
27519        # Do we have a bin/javac?
27520        if test ! -x "$BOOT_JDK/bin/javac"; then
27521          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27523          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27524$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27525          BOOT_JDK_FOUND=no
27526        else
27527          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27528          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27529
27530          # Extra M4 quote needed to protect [] in grep expression.
27531          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27532          if test "x$FOUND_CORRECT_VERSION" = x; then
27533            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27535            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27536$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27537            BOOT_JDK_FOUND=no
27538          else
27539            # We're done! :-)
27540            BOOT_JDK_FOUND=yes
27541
27542  # Only process if variable expands to non-empty
27543
27544  if test "x$BOOT_JDK" != x; then
27545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27546
27547  # Input might be given as Windows format, start by converting to
27548  # unix format.
27549  path="$BOOT_JDK"
27550  new_path=`$CYGPATH -u "$path"`
27551
27552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27555  # "foo.exe" is OK but "foo" is an error.
27556  #
27557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27558  # It is also a way to make sure we got the proper file name for the real test later on.
27559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27560  if test "x$test_shortpath" = x; then
27561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27563    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27564  fi
27565
27566  # Call helper function which possibly converts this using DOS-style short mode.
27567  # If so, the updated path is stored in $new_path.
27568
27569  input_path="$new_path"
27570  # Check if we need to convert this using DOS-style short mode. If the path
27571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27572  # take no chances and rewrite it.
27573  # Note: m4 eats our [], so we need to use [ and ] instead.
27574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27575  if test "x$has_forbidden_chars" != x; then
27576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27580      # Going to short mode and back again did indeed matter. Since short mode is
27581      # case insensitive, let's make it lowercase to improve readability.
27582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27583      # Now convert it back to Unix-style (cygpath)
27584      input_path=`$CYGPATH -u "$shortmode_path"`
27585      new_path="$input_path"
27586    fi
27587  fi
27588
27589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27590  if test "x$test_cygdrive_prefix" = x; then
27591    # As a simple fix, exclude /usr/bin since it's not a real path.
27592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27594      # a path prefixed by /cygdrive for fixpath to work.
27595      new_path="$CYGWIN_ROOT_PATH$input_path"
27596    fi
27597  fi
27598
27599
27600  if test "x$path" != "x$new_path"; then
27601    BOOT_JDK="$new_path"
27602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27604  fi
27605
27606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27607
27608  path="$BOOT_JDK"
27609  has_colon=`$ECHO $path | $GREP ^.:`
27610  new_path="$path"
27611  if test "x$has_colon" = x; then
27612    # Not in mixed or Windows style, start by that.
27613    new_path=`cmd //c echo $path`
27614  fi
27615
27616
27617  input_path="$new_path"
27618  # Check if we need to convert this using DOS-style short mode. If the path
27619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27620  # take no chances and rewrite it.
27621  # Note: m4 eats our [], so we need to use [ and ] instead.
27622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27623  if test "x$has_forbidden_chars" != x; then
27624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27626  fi
27627
27628
27629  windows_path="$new_path"
27630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27631    unix_path=`$CYGPATH -u "$windows_path"`
27632    new_path="$unix_path"
27633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27635    new_path="$unix_path"
27636  fi
27637
27638  if test "x$path" != "x$new_path"; then
27639    BOOT_JDK="$new_path"
27640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27642  fi
27643
27644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27646
27647    else
27648      # We're on a unix platform. Hooray! :)
27649      path="$BOOT_JDK"
27650      has_space=`$ECHO "$path" | $GREP " "`
27651      if test "x$has_space" != x; then
27652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27655      fi
27656
27657      # Use eval to expand a potential ~
27658      eval path="$path"
27659      if test ! -f "$path" && test ! -d "$path"; then
27660        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27661      fi
27662
27663      if test -d "$path"; then
27664        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27665      else
27666        dir="`$DIRNAME "$path"`"
27667        base="`$BASENAME "$path"`"
27668        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27669      fi
27670    fi
27671  fi
27672
27673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27674$as_echo_n "checking for Boot JDK... " >&6; }
27675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27676$as_echo "$BOOT_JDK" >&6; }
27677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27678$as_echo_n "checking Boot JDK version... " >&6; }
27679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27681$as_echo "$BOOT_JDK_VERSION" >&6; }
27682          fi # end check jdk version
27683        fi # end check javac
27684      fi # end check java
27685    fi # end check boot jdk found
27686  fi
27687
27688    done
27689  fi
27690
27691  fi
27692
27693
27694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27696      # Do we have a bin/java?
27697      if test ! -x "$BOOT_JDK/bin/java"; then
27698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27700        BOOT_JDK_FOUND=no
27701      else
27702        # Do we have a bin/javac?
27703        if test ! -x "$BOOT_JDK/bin/javac"; then
27704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27708          BOOT_JDK_FOUND=no
27709        else
27710          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27711          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27712
27713          # Extra M4 quote needed to protect [] in grep expression.
27714          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27715          if test "x$FOUND_CORRECT_VERSION" = x; then
27716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27718            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27719$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27720            BOOT_JDK_FOUND=no
27721          else
27722            # We're done! :-)
27723            BOOT_JDK_FOUND=yes
27724
27725  # Only process if variable expands to non-empty
27726
27727  if test "x$BOOT_JDK" != x; then
27728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27729
27730  # Input might be given as Windows format, start by converting to
27731  # unix format.
27732  path="$BOOT_JDK"
27733  new_path=`$CYGPATH -u "$path"`
27734
27735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27738  # "foo.exe" is OK but "foo" is an error.
27739  #
27740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27741  # It is also a way to make sure we got the proper file name for the real test later on.
27742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27743  if test "x$test_shortpath" = x; then
27744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27746    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27747  fi
27748
27749  # Call helper function which possibly converts this using DOS-style short mode.
27750  # If so, the updated path is stored in $new_path.
27751
27752  input_path="$new_path"
27753  # Check if we need to convert this using DOS-style short mode. If the path
27754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27755  # take no chances and rewrite it.
27756  # Note: m4 eats our [], so we need to use [ and ] instead.
27757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27758  if test "x$has_forbidden_chars" != x; then
27759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27763      # Going to short mode and back again did indeed matter. Since short mode is
27764      # case insensitive, let's make it lowercase to improve readability.
27765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27766      # Now convert it back to Unix-style (cygpath)
27767      input_path=`$CYGPATH -u "$shortmode_path"`
27768      new_path="$input_path"
27769    fi
27770  fi
27771
27772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27773  if test "x$test_cygdrive_prefix" = x; then
27774    # As a simple fix, exclude /usr/bin since it's not a real path.
27775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27777      # a path prefixed by /cygdrive for fixpath to work.
27778      new_path="$CYGWIN_ROOT_PATH$input_path"
27779    fi
27780  fi
27781
27782
27783  if test "x$path" != "x$new_path"; then
27784    BOOT_JDK="$new_path"
27785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27786$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27787  fi
27788
27789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27790
27791  path="$BOOT_JDK"
27792  has_colon=`$ECHO $path | $GREP ^.:`
27793  new_path="$path"
27794  if test "x$has_colon" = x; then
27795    # Not in mixed or Windows style, start by that.
27796    new_path=`cmd //c echo $path`
27797  fi
27798
27799
27800  input_path="$new_path"
27801  # Check if we need to convert this using DOS-style short mode. If the path
27802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27803  # take no chances and rewrite it.
27804  # Note: m4 eats our [], so we need to use [ and ] instead.
27805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27806  if test "x$has_forbidden_chars" != x; then
27807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27809  fi
27810
27811
27812  windows_path="$new_path"
27813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27814    unix_path=`$CYGPATH -u "$windows_path"`
27815    new_path="$unix_path"
27816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27818    new_path="$unix_path"
27819  fi
27820
27821  if test "x$path" != "x$new_path"; then
27822    BOOT_JDK="$new_path"
27823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27825  fi
27826
27827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27829
27830    else
27831      # We're on a unix platform. Hooray! :)
27832      path="$BOOT_JDK"
27833      has_space=`$ECHO "$path" | $GREP " "`
27834      if test "x$has_space" != x; then
27835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27838      fi
27839
27840      # Use eval to expand a potential ~
27841      eval path="$path"
27842      if test ! -f "$path" && test ! -d "$path"; then
27843        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27844      fi
27845
27846      if test -d "$path"; then
27847        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27848      else
27849        dir="`$DIRNAME "$path"`"
27850        base="`$BASENAME "$path"`"
27851        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27852      fi
27853    fi
27854  fi
27855
27856            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27857$as_echo_n "checking for Boot JDK... " >&6; }
27858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27859$as_echo "$BOOT_JDK" >&6; }
27860            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27861$as_echo_n "checking Boot JDK version... " >&6; }
27862            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27864$as_echo "$BOOT_JDK_VERSION" >&6; }
27865          fi # end check jdk version
27866        fi # end check javac
27867      fi # end check java
27868    fi # end check boot jdk found
27869  fi
27870
27871
27872  if test "x$BOOT_JDK_FOUND" = xno; then
27873    # Now execute the test
27874
27875  if test "x$ProgramFiles" != x; then
27876    VIRTUAL_DIR="$ProgramFiles/Java"
27877
27878  windows_path="$VIRTUAL_DIR"
27879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27880    unix_path=`$CYGPATH -u "$windows_path"`
27881    VIRTUAL_DIR="$unix_path"
27882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27884    VIRTUAL_DIR="$unix_path"
27885  fi
27886
27887
27888  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27889  BOOT_JDK_SUFFIX=""
27890  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27891  if test "x$ALL_JDKS_FOUND" != x; then
27892    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27893
27894  if test "x$BOOT_JDK_FOUND" = xno; then
27895    # Now execute the test
27896
27897        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27898        if test -d "$BOOT_JDK"; then
27899          BOOT_JDK_FOUND=maybe
27900          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27901$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27902        fi
27903
27904
27905    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27906    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27907      # Do we have a bin/java?
27908      if test ! -x "$BOOT_JDK/bin/java"; then
27909        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27911        BOOT_JDK_FOUND=no
27912      else
27913        # Do we have a bin/javac?
27914        if test ! -x "$BOOT_JDK/bin/javac"; then
27915          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27917          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27918$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27919          BOOT_JDK_FOUND=no
27920        else
27921          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27922          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27923
27924          # Extra M4 quote needed to protect [] in grep expression.
27925          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27926          if test "x$FOUND_CORRECT_VERSION" = x; then
27927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27929            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27930$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27931            BOOT_JDK_FOUND=no
27932          else
27933            # We're done! :-)
27934            BOOT_JDK_FOUND=yes
27935
27936  # Only process if variable expands to non-empty
27937
27938  if test "x$BOOT_JDK" != x; then
27939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27940
27941  # Input might be given as Windows format, start by converting to
27942  # unix format.
27943  path="$BOOT_JDK"
27944  new_path=`$CYGPATH -u "$path"`
27945
27946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27949  # "foo.exe" is OK but "foo" is an error.
27950  #
27951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27952  # It is also a way to make sure we got the proper file name for the real test later on.
27953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27954  if test "x$test_shortpath" = x; then
27955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27957    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27958  fi
27959
27960  # Call helper function which possibly converts this using DOS-style short mode.
27961  # If so, the updated path is stored in $new_path.
27962
27963  input_path="$new_path"
27964  # Check if we need to convert this using DOS-style short mode. If the path
27965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27966  # take no chances and rewrite it.
27967  # Note: m4 eats our [], so we need to use [ and ] instead.
27968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27969  if test "x$has_forbidden_chars" != x; then
27970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27974      # Going to short mode and back again did indeed matter. Since short mode is
27975      # case insensitive, let's make it lowercase to improve readability.
27976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27977      # Now convert it back to Unix-style (cygpath)
27978      input_path=`$CYGPATH -u "$shortmode_path"`
27979      new_path="$input_path"
27980    fi
27981  fi
27982
27983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27984  if test "x$test_cygdrive_prefix" = x; then
27985    # As a simple fix, exclude /usr/bin since it's not a real path.
27986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27988      # a path prefixed by /cygdrive for fixpath to work.
27989      new_path="$CYGWIN_ROOT_PATH$input_path"
27990    fi
27991  fi
27992
27993
27994  if test "x$path" != "x$new_path"; then
27995    BOOT_JDK="$new_path"
27996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27998  fi
27999
28000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28001
28002  path="$BOOT_JDK"
28003  has_colon=`$ECHO $path | $GREP ^.:`
28004  new_path="$path"
28005  if test "x$has_colon" = x; then
28006    # Not in mixed or Windows style, start by that.
28007    new_path=`cmd //c echo $path`
28008  fi
28009
28010
28011  input_path="$new_path"
28012  # Check if we need to convert this using DOS-style short mode. If the path
28013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28014  # take no chances and rewrite it.
28015  # Note: m4 eats our [], so we need to use [ and ] instead.
28016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28017  if test "x$has_forbidden_chars" != x; then
28018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28020  fi
28021
28022
28023  windows_path="$new_path"
28024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28025    unix_path=`$CYGPATH -u "$windows_path"`
28026    new_path="$unix_path"
28027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28029    new_path="$unix_path"
28030  fi
28031
28032  if test "x$path" != "x$new_path"; then
28033    BOOT_JDK="$new_path"
28034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28036  fi
28037
28038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28040
28041    else
28042      # We're on a unix platform. Hooray! :)
28043      path="$BOOT_JDK"
28044      has_space=`$ECHO "$path" | $GREP " "`
28045      if test "x$has_space" != x; then
28046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28049      fi
28050
28051      # Use eval to expand a potential ~
28052      eval path="$path"
28053      if test ! -f "$path" && test ! -d "$path"; then
28054        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28055      fi
28056
28057      if test -d "$path"; then
28058        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28059      else
28060        dir="`$DIRNAME "$path"`"
28061        base="`$BASENAME "$path"`"
28062        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28063      fi
28064    fi
28065  fi
28066
28067            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28068$as_echo_n "checking for Boot JDK... " >&6; }
28069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28070$as_echo "$BOOT_JDK" >&6; }
28071            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28072$as_echo_n "checking Boot JDK version... " >&6; }
28073            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28074            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28075$as_echo "$BOOT_JDK_VERSION" >&6; }
28076          fi # end check jdk version
28077        fi # end check javac
28078      fi # end check java
28079    fi # end check boot jdk found
28080  fi
28081
28082    done
28083  fi
28084
28085  fi
28086
28087
28088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28090      # Do we have a bin/java?
28091      if test ! -x "$BOOT_JDK/bin/java"; then
28092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28094        BOOT_JDK_FOUND=no
28095      else
28096        # Do we have a bin/javac?
28097        if test ! -x "$BOOT_JDK/bin/javac"; then
28098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28102          BOOT_JDK_FOUND=no
28103        else
28104          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28105          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28106
28107          # Extra M4 quote needed to protect [] in grep expression.
28108          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28109          if test "x$FOUND_CORRECT_VERSION" = x; then
28110            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28112            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28114            BOOT_JDK_FOUND=no
28115          else
28116            # We're done! :-)
28117            BOOT_JDK_FOUND=yes
28118
28119  # Only process if variable expands to non-empty
28120
28121  if test "x$BOOT_JDK" != x; then
28122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28123
28124  # Input might be given as Windows format, start by converting to
28125  # unix format.
28126  path="$BOOT_JDK"
28127  new_path=`$CYGPATH -u "$path"`
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28140    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28141  fi
28142
28143  # Call helper function which possibly converts this using DOS-style short mode.
28144  # If so, the updated path is stored in $new_path.
28145
28146  input_path="$new_path"
28147  # Check if we need to convert this using DOS-style short mode. If the path
28148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28149  # take no chances and rewrite it.
28150  # Note: m4 eats our [], so we need to use [ and ] instead.
28151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28152  if test "x$has_forbidden_chars" != x; then
28153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28157      # Going to short mode and back again did indeed matter. Since short mode is
28158      # case insensitive, let's make it lowercase to improve readability.
28159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28160      # Now convert it back to Unix-style (cygpath)
28161      input_path=`$CYGPATH -u "$shortmode_path"`
28162      new_path="$input_path"
28163    fi
28164  fi
28165
28166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28167  if test "x$test_cygdrive_prefix" = x; then
28168    # As a simple fix, exclude /usr/bin since it's not a real path.
28169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28171      # a path prefixed by /cygdrive for fixpath to work.
28172      new_path="$CYGWIN_ROOT_PATH$input_path"
28173    fi
28174  fi
28175
28176
28177  if test "x$path" != "x$new_path"; then
28178    BOOT_JDK="$new_path"
28179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28181  fi
28182
28183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184
28185  path="$BOOT_JDK"
28186  has_colon=`$ECHO $path | $GREP ^.:`
28187  new_path="$path"
28188  if test "x$has_colon" = x; then
28189    # Not in mixed or Windows style, start by that.
28190    new_path=`cmd //c echo $path`
28191  fi
28192
28193
28194  input_path="$new_path"
28195  # Check if we need to convert this using DOS-style short mode. If the path
28196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28197  # take no chances and rewrite it.
28198  # Note: m4 eats our [], so we need to use [ and ] instead.
28199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28200  if test "x$has_forbidden_chars" != x; then
28201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28203  fi
28204
28205
28206  windows_path="$new_path"
28207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28208    unix_path=`$CYGPATH -u "$windows_path"`
28209    new_path="$unix_path"
28210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28212    new_path="$unix_path"
28213  fi
28214
28215  if test "x$path" != "x$new_path"; then
28216    BOOT_JDK="$new_path"
28217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28219  fi
28220
28221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28223
28224    else
28225      # We're on a unix platform. Hooray! :)
28226      path="$BOOT_JDK"
28227      has_space=`$ECHO "$path" | $GREP " "`
28228      if test "x$has_space" != x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28232      fi
28233
28234      # Use eval to expand a potential ~
28235      eval path="$path"
28236      if test ! -f "$path" && test ! -d "$path"; then
28237        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28238      fi
28239
28240      if test -d "$path"; then
28241        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28242      else
28243        dir="`$DIRNAME "$path"`"
28244        base="`$BASENAME "$path"`"
28245        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28246      fi
28247    fi
28248  fi
28249
28250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28251$as_echo_n "checking for Boot JDK... " >&6; }
28252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28253$as_echo "$BOOT_JDK" >&6; }
28254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28255$as_echo_n "checking Boot JDK version... " >&6; }
28256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28258$as_echo "$BOOT_JDK_VERSION" >&6; }
28259          fi # end check jdk version
28260        fi # end check javac
28261      fi # end check java
28262    fi # end check boot jdk found
28263  fi
28264
28265
28266  if test "x$BOOT_JDK_FOUND" = xno; then
28267    # Now execute the test
28268
28269  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28270  BOOT_JDK_SUFFIX=""
28271  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28272  if test "x$ALL_JDKS_FOUND" != x; then
28273    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28274
28275  if test "x$BOOT_JDK_FOUND" = xno; then
28276    # Now execute the test
28277
28278        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28279        if test -d "$BOOT_JDK"; then
28280          BOOT_JDK_FOUND=maybe
28281          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28282$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28283        fi
28284
28285
28286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28288      # Do we have a bin/java?
28289      if test ! -x "$BOOT_JDK/bin/java"; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28292        BOOT_JDK_FOUND=no
28293      else
28294        # Do we have a bin/javac?
28295        if test ! -x "$BOOT_JDK/bin/javac"; then
28296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28300          BOOT_JDK_FOUND=no
28301        else
28302          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28303          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28304
28305          # Extra M4 quote needed to protect [] in grep expression.
28306          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28307          if test "x$FOUND_CORRECT_VERSION" = x; then
28308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28310            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28311$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28312            BOOT_JDK_FOUND=no
28313          else
28314            # We're done! :-)
28315            BOOT_JDK_FOUND=yes
28316
28317  # Only process if variable expands to non-empty
28318
28319  if test "x$BOOT_JDK" != x; then
28320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28321
28322  # Input might be given as Windows format, start by converting to
28323  # unix format.
28324  path="$BOOT_JDK"
28325  new_path=`$CYGPATH -u "$path"`
28326
28327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28330  # "foo.exe" is OK but "foo" is an error.
28331  #
28332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28333  # It is also a way to make sure we got the proper file name for the real test later on.
28334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28335  if test "x$test_shortpath" = x; then
28336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28339  fi
28340
28341  # Call helper function which possibly converts this using DOS-style short mode.
28342  # If so, the updated path is stored in $new_path.
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28355      # Going to short mode and back again did indeed matter. Since short mode is
28356      # case insensitive, let's make it lowercase to improve readability.
28357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28358      # Now convert it back to Unix-style (cygpath)
28359      input_path=`$CYGPATH -u "$shortmode_path"`
28360      new_path="$input_path"
28361    fi
28362  fi
28363
28364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28365  if test "x$test_cygdrive_prefix" = x; then
28366    # As a simple fix, exclude /usr/bin since it's not a real path.
28367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28369      # a path prefixed by /cygdrive for fixpath to work.
28370      new_path="$CYGWIN_ROOT_PATH$input_path"
28371    fi
28372  fi
28373
28374
28375  if test "x$path" != "x$new_path"; then
28376    BOOT_JDK="$new_path"
28377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28379  fi
28380
28381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28382
28383  path="$BOOT_JDK"
28384  has_colon=`$ECHO $path | $GREP ^.:`
28385  new_path="$path"
28386  if test "x$has_colon" = x; then
28387    # Not in mixed or Windows style, start by that.
28388    new_path=`cmd //c echo $path`
28389  fi
28390
28391
28392  input_path="$new_path"
28393  # Check if we need to convert this using DOS-style short mode. If the path
28394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28395  # take no chances and rewrite it.
28396  # Note: m4 eats our [], so we need to use [ and ] instead.
28397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28398  if test "x$has_forbidden_chars" != x; then
28399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28401  fi
28402
28403
28404  windows_path="$new_path"
28405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28406    unix_path=`$CYGPATH -u "$windows_path"`
28407    new_path="$unix_path"
28408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28410    new_path="$unix_path"
28411  fi
28412
28413  if test "x$path" != "x$new_path"; then
28414    BOOT_JDK="$new_path"
28415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28417  fi
28418
28419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28421
28422    else
28423      # We're on a unix platform. Hooray! :)
28424      path="$BOOT_JDK"
28425      has_space=`$ECHO "$path" | $GREP " "`
28426      if test "x$has_space" != x; then
28427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28430      fi
28431
28432      # Use eval to expand a potential ~
28433      eval path="$path"
28434      if test ! -f "$path" && test ! -d "$path"; then
28435        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28436      fi
28437
28438      if test -d "$path"; then
28439        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28440      else
28441        dir="`$DIRNAME "$path"`"
28442        base="`$BASENAME "$path"`"
28443        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28444      fi
28445    fi
28446  fi
28447
28448            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28449$as_echo_n "checking for Boot JDK... " >&6; }
28450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28451$as_echo "$BOOT_JDK" >&6; }
28452            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28453$as_echo_n "checking Boot JDK version... " >&6; }
28454            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28456$as_echo "$BOOT_JDK_VERSION" >&6; }
28457          fi # end check jdk version
28458        fi # end check javac
28459      fi # end check java
28460    fi # end check boot jdk found
28461  fi
28462
28463    done
28464  fi
28465
28466
28467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28469      # Do we have a bin/java?
28470      if test ! -x "$BOOT_JDK/bin/java"; then
28471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28473        BOOT_JDK_FOUND=no
28474      else
28475        # Do we have a bin/javac?
28476        if test ! -x "$BOOT_JDK/bin/javac"; then
28477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28481          BOOT_JDK_FOUND=no
28482        else
28483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28485
28486          # Extra M4 quote needed to protect [] in grep expression.
28487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28488          if test "x$FOUND_CORRECT_VERSION" = x; then
28489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28493            BOOT_JDK_FOUND=no
28494          else
28495            # We're done! :-)
28496            BOOT_JDK_FOUND=yes
28497
28498  # Only process if variable expands to non-empty
28499
28500  if test "x$BOOT_JDK" != x; then
28501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28502
28503  # Input might be given as Windows format, start by converting to
28504  # unix format.
28505  path="$BOOT_JDK"
28506  new_path=`$CYGPATH -u "$path"`
28507
28508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28511  # "foo.exe" is OK but "foo" is an error.
28512  #
28513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28514  # It is also a way to make sure we got the proper file name for the real test later on.
28515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28516  if test "x$test_shortpath" = x; then
28517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28520  fi
28521
28522  # Call helper function which possibly converts this using DOS-style short mode.
28523  # If so, the updated path is stored in $new_path.
28524
28525  input_path="$new_path"
28526  # Check if we need to convert this using DOS-style short mode. If the path
28527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28528  # take no chances and rewrite it.
28529  # Note: m4 eats our [], so we need to use [ and ] instead.
28530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28531  if test "x$has_forbidden_chars" != x; then
28532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28536      # Going to short mode and back again did indeed matter. Since short mode is
28537      # case insensitive, let's make it lowercase to improve readability.
28538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28539      # Now convert it back to Unix-style (cygpath)
28540      input_path=`$CYGPATH -u "$shortmode_path"`
28541      new_path="$input_path"
28542    fi
28543  fi
28544
28545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28546  if test "x$test_cygdrive_prefix" = x; then
28547    # As a simple fix, exclude /usr/bin since it's not a real path.
28548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28550      # a path prefixed by /cygdrive for fixpath to work.
28551      new_path="$CYGWIN_ROOT_PATH$input_path"
28552    fi
28553  fi
28554
28555
28556  if test "x$path" != "x$new_path"; then
28557    BOOT_JDK="$new_path"
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560  fi
28561
28562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563
28564  path="$BOOT_JDK"
28565  has_colon=`$ECHO $path | $GREP ^.:`
28566  new_path="$path"
28567  if test "x$has_colon" = x; then
28568    # Not in mixed or Windows style, start by that.
28569    new_path=`cmd //c echo $path`
28570  fi
28571
28572
28573  input_path="$new_path"
28574  # Check if we need to convert this using DOS-style short mode. If the path
28575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28576  # take no chances and rewrite it.
28577  # Note: m4 eats our [], so we need to use [ and ] instead.
28578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28579  if test "x$has_forbidden_chars" != x; then
28580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28582  fi
28583
28584
28585  windows_path="$new_path"
28586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28587    unix_path=`$CYGPATH -u "$windows_path"`
28588    new_path="$unix_path"
28589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28591    new_path="$unix_path"
28592  fi
28593
28594  if test "x$path" != "x$new_path"; then
28595    BOOT_JDK="$new_path"
28596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28598  fi
28599
28600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28602
28603    else
28604      # We're on a unix platform. Hooray! :)
28605      path="$BOOT_JDK"
28606      has_space=`$ECHO "$path" | $GREP " "`
28607      if test "x$has_space" != x; then
28608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28611      fi
28612
28613      # Use eval to expand a potential ~
28614      eval path="$path"
28615      if test ! -f "$path" && test ! -d "$path"; then
28616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28617      fi
28618
28619      if test -d "$path"; then
28620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28621      else
28622        dir="`$DIRNAME "$path"`"
28623        base="`$BASENAME "$path"`"
28624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28625      fi
28626    fi
28627  fi
28628
28629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28630$as_echo_n "checking for Boot JDK... " >&6; }
28631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28632$as_echo "$BOOT_JDK" >&6; }
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28634$as_echo_n "checking Boot JDK version... " >&6; }
28635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28637$as_echo "$BOOT_JDK_VERSION" >&6; }
28638          fi # end check jdk version
28639        fi # end check javac
28640      fi # end check java
28641    fi # end check boot jdk found
28642  fi
28643
28644  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28645
28646  if test "x$BOOT_JDK_FOUND" = xno; then
28647    # Now execute the test
28648
28649  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28650  BOOT_JDK_SUFFIX="/Contents/Home"
28651  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28652  if test "x$ALL_JDKS_FOUND" != x; then
28653    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28654
28655  if test "x$BOOT_JDK_FOUND" = xno; then
28656    # Now execute the test
28657
28658        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28659        if test -d "$BOOT_JDK"; then
28660          BOOT_JDK_FOUND=maybe
28661          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28662$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28663        fi
28664
28665
28666    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28667    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28668      # Do we have a bin/java?
28669      if test ! -x "$BOOT_JDK/bin/java"; then
28670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28672        BOOT_JDK_FOUND=no
28673      else
28674        # Do we have a bin/javac?
28675        if test ! -x "$BOOT_JDK/bin/javac"; then
28676          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28678          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28679$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28680          BOOT_JDK_FOUND=no
28681        else
28682          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28683          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28684
28685          # Extra M4 quote needed to protect [] in grep expression.
28686          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28687          if test "x$FOUND_CORRECT_VERSION" = x; then
28688            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28690            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28691$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28692            BOOT_JDK_FOUND=no
28693          else
28694            # We're done! :-)
28695            BOOT_JDK_FOUND=yes
28696
28697  # Only process if variable expands to non-empty
28698
28699  if test "x$BOOT_JDK" != x; then
28700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28701
28702  # Input might be given as Windows format, start by converting to
28703  # unix format.
28704  path="$BOOT_JDK"
28705  new_path=`$CYGPATH -u "$path"`
28706
28707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28710  # "foo.exe" is OK but "foo" is an error.
28711  #
28712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28713  # It is also a way to make sure we got the proper file name for the real test later on.
28714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28715  if test "x$test_shortpath" = x; then
28716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28718    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28719  fi
28720
28721  # Call helper function which possibly converts this using DOS-style short mode.
28722  # If so, the updated path is stored in $new_path.
28723
28724  input_path="$new_path"
28725  # Check if we need to convert this using DOS-style short mode. If the path
28726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28727  # take no chances and rewrite it.
28728  # Note: m4 eats our [], so we need to use [ and ] instead.
28729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28730  if test "x$has_forbidden_chars" != x; then
28731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28735      # Going to short mode and back again did indeed matter. Since short mode is
28736      # case insensitive, let's make it lowercase to improve readability.
28737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28738      # Now convert it back to Unix-style (cygpath)
28739      input_path=`$CYGPATH -u "$shortmode_path"`
28740      new_path="$input_path"
28741    fi
28742  fi
28743
28744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28745  if test "x$test_cygdrive_prefix" = x; then
28746    # As a simple fix, exclude /usr/bin since it's not a real path.
28747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28749      # a path prefixed by /cygdrive for fixpath to work.
28750      new_path="$CYGWIN_ROOT_PATH$input_path"
28751    fi
28752  fi
28753
28754
28755  if test "x$path" != "x$new_path"; then
28756    BOOT_JDK="$new_path"
28757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28759  fi
28760
28761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28762
28763  path="$BOOT_JDK"
28764  has_colon=`$ECHO $path | $GREP ^.:`
28765  new_path="$path"
28766  if test "x$has_colon" = x; then
28767    # Not in mixed or Windows style, start by that.
28768    new_path=`cmd //c echo $path`
28769  fi
28770
28771
28772  input_path="$new_path"
28773  # Check if we need to convert this using DOS-style short mode. If the path
28774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28775  # take no chances and rewrite it.
28776  # Note: m4 eats our [], so we need to use [ and ] instead.
28777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28778  if test "x$has_forbidden_chars" != x; then
28779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28781  fi
28782
28783
28784  windows_path="$new_path"
28785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28786    unix_path=`$CYGPATH -u "$windows_path"`
28787    new_path="$unix_path"
28788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28790    new_path="$unix_path"
28791  fi
28792
28793  if test "x$path" != "x$new_path"; then
28794    BOOT_JDK="$new_path"
28795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28797  fi
28798
28799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28801
28802    else
28803      # We're on a unix platform. Hooray! :)
28804      path="$BOOT_JDK"
28805      has_space=`$ECHO "$path" | $GREP " "`
28806      if test "x$has_space" != x; then
28807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28810      fi
28811
28812      # Use eval to expand a potential ~
28813      eval path="$path"
28814      if test ! -f "$path" && test ! -d "$path"; then
28815        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28816      fi
28817
28818      if test -d "$path"; then
28819        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28820      else
28821        dir="`$DIRNAME "$path"`"
28822        base="`$BASENAME "$path"`"
28823        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28824      fi
28825    fi
28826  fi
28827
28828            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28829$as_echo_n "checking for Boot JDK... " >&6; }
28830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28831$as_echo "$BOOT_JDK" >&6; }
28832            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28833$as_echo_n "checking Boot JDK version... " >&6; }
28834            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28836$as_echo "$BOOT_JDK_VERSION" >&6; }
28837          fi # end check jdk version
28838        fi # end check javac
28839      fi # end check java
28840    fi # end check boot jdk found
28841  fi
28842
28843    done
28844  fi
28845
28846
28847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28849      # Do we have a bin/java?
28850      if test ! -x "$BOOT_JDK/bin/java"; then
28851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28853        BOOT_JDK_FOUND=no
28854      else
28855        # Do we have a bin/javac?
28856        if test ! -x "$BOOT_JDK/bin/javac"; then
28857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28861          BOOT_JDK_FOUND=no
28862        else
28863          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28864          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28865
28866          # Extra M4 quote needed to protect [] in grep expression.
28867          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28868          if test "x$FOUND_CORRECT_VERSION" = x; then
28869            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28871            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28872$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28873            BOOT_JDK_FOUND=no
28874          else
28875            # We're done! :-)
28876            BOOT_JDK_FOUND=yes
28877
28878  # Only process if variable expands to non-empty
28879
28880  if test "x$BOOT_JDK" != x; then
28881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28882
28883  # Input might be given as Windows format, start by converting to
28884  # unix format.
28885  path="$BOOT_JDK"
28886  new_path=`$CYGPATH -u "$path"`
28887
28888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28891  # "foo.exe" is OK but "foo" is an error.
28892  #
28893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28894  # It is also a way to make sure we got the proper file name for the real test later on.
28895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28896  if test "x$test_shortpath" = x; then
28897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28899    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28900  fi
28901
28902  # Call helper function which possibly converts this using DOS-style short mode.
28903  # If so, the updated path is stored in $new_path.
28904
28905  input_path="$new_path"
28906  # Check if we need to convert this using DOS-style short mode. If the path
28907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28908  # take no chances and rewrite it.
28909  # Note: m4 eats our [], so we need to use [ and ] instead.
28910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28911  if test "x$has_forbidden_chars" != x; then
28912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28916      # Going to short mode and back again did indeed matter. Since short mode is
28917      # case insensitive, let's make it lowercase to improve readability.
28918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28919      # Now convert it back to Unix-style (cygpath)
28920      input_path=`$CYGPATH -u "$shortmode_path"`
28921      new_path="$input_path"
28922    fi
28923  fi
28924
28925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28926  if test "x$test_cygdrive_prefix" = x; then
28927    # As a simple fix, exclude /usr/bin since it's not a real path.
28928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28930      # a path prefixed by /cygdrive for fixpath to work.
28931      new_path="$CYGWIN_ROOT_PATH$input_path"
28932    fi
28933  fi
28934
28935
28936  if test "x$path" != "x$new_path"; then
28937    BOOT_JDK="$new_path"
28938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28940  fi
28941
28942    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28943
28944  path="$BOOT_JDK"
28945  has_colon=`$ECHO $path | $GREP ^.:`
28946  new_path="$path"
28947  if test "x$has_colon" = x; then
28948    # Not in mixed or Windows style, start by that.
28949    new_path=`cmd //c echo $path`
28950  fi
28951
28952
28953  input_path="$new_path"
28954  # Check if we need to convert this using DOS-style short mode. If the path
28955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28956  # take no chances and rewrite it.
28957  # Note: m4 eats our [], so we need to use [ and ] instead.
28958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28959  if test "x$has_forbidden_chars" != x; then
28960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28962  fi
28963
28964
28965  windows_path="$new_path"
28966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28967    unix_path=`$CYGPATH -u "$windows_path"`
28968    new_path="$unix_path"
28969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28971    new_path="$unix_path"
28972  fi
28973
28974  if test "x$path" != "x$new_path"; then
28975    BOOT_JDK="$new_path"
28976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28978  fi
28979
28980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28982
28983    else
28984      # We're on a unix platform. Hooray! :)
28985      path="$BOOT_JDK"
28986      has_space=`$ECHO "$path" | $GREP " "`
28987      if test "x$has_space" != x; then
28988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28990        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28991      fi
28992
28993      # Use eval to expand a potential ~
28994      eval path="$path"
28995      if test ! -f "$path" && test ! -d "$path"; then
28996        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28997      fi
28998
28999      if test -d "$path"; then
29000        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29001      else
29002        dir="`$DIRNAME "$path"`"
29003        base="`$BASENAME "$path"`"
29004        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29005      fi
29006    fi
29007  fi
29008
29009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29010$as_echo_n "checking for Boot JDK... " >&6; }
29011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29012$as_echo "$BOOT_JDK" >&6; }
29013            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29014$as_echo_n "checking Boot JDK version... " >&6; }
29015            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29017$as_echo "$BOOT_JDK_VERSION" >&6; }
29018          fi # end check jdk version
29019        fi # end check javac
29020      fi # end check java
29021    fi # end check boot jdk found
29022  fi
29023
29024
29025  if test "x$BOOT_JDK_FOUND" = xno; then
29026    # Now execute the test
29027
29028  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29029  BOOT_JDK_SUFFIX="/Contents/Home"
29030  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29031  if test "x$ALL_JDKS_FOUND" != x; then
29032    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29033
29034  if test "x$BOOT_JDK_FOUND" = xno; then
29035    # Now execute the test
29036
29037        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29038        if test -d "$BOOT_JDK"; then
29039          BOOT_JDK_FOUND=maybe
29040          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29041$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29042        fi
29043
29044
29045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29047      # Do we have a bin/java?
29048      if test ! -x "$BOOT_JDK/bin/java"; then
29049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29051        BOOT_JDK_FOUND=no
29052      else
29053        # Do we have a bin/javac?
29054        if test ! -x "$BOOT_JDK/bin/javac"; then
29055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29059          BOOT_JDK_FOUND=no
29060        else
29061          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29062          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29063
29064          # Extra M4 quote needed to protect [] in grep expression.
29065          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29066          if test "x$FOUND_CORRECT_VERSION" = x; then
29067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29069            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29071            BOOT_JDK_FOUND=no
29072          else
29073            # We're done! :-)
29074            BOOT_JDK_FOUND=yes
29075
29076  # Only process if variable expands to non-empty
29077
29078  if test "x$BOOT_JDK" != x; then
29079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29080
29081  # Input might be given as Windows format, start by converting to
29082  # unix format.
29083  path="$BOOT_JDK"
29084  new_path=`$CYGPATH -u "$path"`
29085
29086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29089  # "foo.exe" is OK but "foo" is an error.
29090  #
29091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29092  # It is also a way to make sure we got the proper file name for the real test later on.
29093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29094  if test "x$test_shortpath" = x; then
29095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29098  fi
29099
29100  # Call helper function which possibly converts this using DOS-style short mode.
29101  # If so, the updated path is stored in $new_path.
29102
29103  input_path="$new_path"
29104  # Check if we need to convert this using DOS-style short mode. If the path
29105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29106  # take no chances and rewrite it.
29107  # Note: m4 eats our [], so we need to use [ and ] instead.
29108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29109  if test "x$has_forbidden_chars" != x; then
29110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29114      # Going to short mode and back again did indeed matter. Since short mode is
29115      # case insensitive, let's make it lowercase to improve readability.
29116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29117      # Now convert it back to Unix-style (cygpath)
29118      input_path=`$CYGPATH -u "$shortmode_path"`
29119      new_path="$input_path"
29120    fi
29121  fi
29122
29123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29124  if test "x$test_cygdrive_prefix" = x; then
29125    # As a simple fix, exclude /usr/bin since it's not a real path.
29126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29128      # a path prefixed by /cygdrive for fixpath to work.
29129      new_path="$CYGWIN_ROOT_PATH$input_path"
29130    fi
29131  fi
29132
29133
29134  if test "x$path" != "x$new_path"; then
29135    BOOT_JDK="$new_path"
29136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29138  fi
29139
29140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29141
29142  path="$BOOT_JDK"
29143  has_colon=`$ECHO $path | $GREP ^.:`
29144  new_path="$path"
29145  if test "x$has_colon" = x; then
29146    # Not in mixed or Windows style, start by that.
29147    new_path=`cmd //c echo $path`
29148  fi
29149
29150
29151  input_path="$new_path"
29152  # Check if we need to convert this using DOS-style short mode. If the path
29153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29154  # take no chances and rewrite it.
29155  # Note: m4 eats our [], so we need to use [ and ] instead.
29156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29157  if test "x$has_forbidden_chars" != x; then
29158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29160  fi
29161
29162
29163  windows_path="$new_path"
29164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29165    unix_path=`$CYGPATH -u "$windows_path"`
29166    new_path="$unix_path"
29167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29169    new_path="$unix_path"
29170  fi
29171
29172  if test "x$path" != "x$new_path"; then
29173    BOOT_JDK="$new_path"
29174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29176  fi
29177
29178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29180
29181    else
29182      # We're on a unix platform. Hooray! :)
29183      path="$BOOT_JDK"
29184      has_space=`$ECHO "$path" | $GREP " "`
29185      if test "x$has_space" != x; then
29186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29189      fi
29190
29191      # Use eval to expand a potential ~
29192      eval path="$path"
29193      if test ! -f "$path" && test ! -d "$path"; then
29194        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29195      fi
29196
29197      if test -d "$path"; then
29198        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29199      else
29200        dir="`$DIRNAME "$path"`"
29201        base="`$BASENAME "$path"`"
29202        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29203      fi
29204    fi
29205  fi
29206
29207            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29208$as_echo_n "checking for Boot JDK... " >&6; }
29209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29210$as_echo "$BOOT_JDK" >&6; }
29211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29212$as_echo_n "checking Boot JDK version... " >&6; }
29213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29215$as_echo "$BOOT_JDK_VERSION" >&6; }
29216          fi # end check jdk version
29217        fi # end check javac
29218      fi # end check java
29219    fi # end check boot jdk found
29220  fi
29221
29222    done
29223  fi
29224
29225
29226    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29227    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29228      # Do we have a bin/java?
29229      if test ! -x "$BOOT_JDK/bin/java"; then
29230        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29232        BOOT_JDK_FOUND=no
29233      else
29234        # Do we have a bin/javac?
29235        if test ! -x "$BOOT_JDK/bin/javac"; then
29236          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29238          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29239$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29240          BOOT_JDK_FOUND=no
29241        else
29242          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29243          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29244
29245          # Extra M4 quote needed to protect [] in grep expression.
29246          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29247          if test "x$FOUND_CORRECT_VERSION" = x; then
29248            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29250            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29251$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29252            BOOT_JDK_FOUND=no
29253          else
29254            # We're done! :-)
29255            BOOT_JDK_FOUND=yes
29256
29257  # Only process if variable expands to non-empty
29258
29259  if test "x$BOOT_JDK" != x; then
29260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29261
29262  # Input might be given as Windows format, start by converting to
29263  # unix format.
29264  path="$BOOT_JDK"
29265  new_path=`$CYGPATH -u "$path"`
29266
29267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29270  # "foo.exe" is OK but "foo" is an error.
29271  #
29272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29273  # It is also a way to make sure we got the proper file name for the real test later on.
29274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29275  if test "x$test_shortpath" = x; then
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29278    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29279  fi
29280
29281  # Call helper function which possibly converts this using DOS-style short mode.
29282  # If so, the updated path is stored in $new_path.
29283
29284  input_path="$new_path"
29285  # Check if we need to convert this using DOS-style short mode. If the path
29286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29287  # take no chances and rewrite it.
29288  # Note: m4 eats our [], so we need to use [ and ] instead.
29289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29290  if test "x$has_forbidden_chars" != x; then
29291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29295      # Going to short mode and back again did indeed matter. Since short mode is
29296      # case insensitive, let's make it lowercase to improve readability.
29297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29298      # Now convert it back to Unix-style (cygpath)
29299      input_path=`$CYGPATH -u "$shortmode_path"`
29300      new_path="$input_path"
29301    fi
29302  fi
29303
29304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29305  if test "x$test_cygdrive_prefix" = x; then
29306    # As a simple fix, exclude /usr/bin since it's not a real path.
29307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29309      # a path prefixed by /cygdrive for fixpath to work.
29310      new_path="$CYGWIN_ROOT_PATH$input_path"
29311    fi
29312  fi
29313
29314
29315  if test "x$path" != "x$new_path"; then
29316    BOOT_JDK="$new_path"
29317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29318$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29319  fi
29320
29321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29322
29323  path="$BOOT_JDK"
29324  has_colon=`$ECHO $path | $GREP ^.:`
29325  new_path="$path"
29326  if test "x$has_colon" = x; then
29327    # Not in mixed or Windows style, start by that.
29328    new_path=`cmd //c echo $path`
29329  fi
29330
29331
29332  input_path="$new_path"
29333  # Check if we need to convert this using DOS-style short mode. If the path
29334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29335  # take no chances and rewrite it.
29336  # Note: m4 eats our [], so we need to use [ and ] instead.
29337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29338  if test "x$has_forbidden_chars" != x; then
29339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29341  fi
29342
29343
29344  windows_path="$new_path"
29345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29346    unix_path=`$CYGPATH -u "$windows_path"`
29347    new_path="$unix_path"
29348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29350    new_path="$unix_path"
29351  fi
29352
29353  if test "x$path" != "x$new_path"; then
29354    BOOT_JDK="$new_path"
29355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29357  fi
29358
29359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29361
29362    else
29363      # We're on a unix platform. Hooray! :)
29364      path="$BOOT_JDK"
29365      has_space=`$ECHO "$path" | $GREP " "`
29366      if test "x$has_space" != x; then
29367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29370      fi
29371
29372      # Use eval to expand a potential ~
29373      eval path="$path"
29374      if test ! -f "$path" && test ! -d "$path"; then
29375        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29376      fi
29377
29378      if test -d "$path"; then
29379        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29380      else
29381        dir="`$DIRNAME "$path"`"
29382        base="`$BASENAME "$path"`"
29383        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29384      fi
29385    fi
29386  fi
29387
29388            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29389$as_echo_n "checking for Boot JDK... " >&6; }
29390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29391$as_echo "$BOOT_JDK" >&6; }
29392            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29393$as_echo_n "checking Boot JDK version... " >&6; }
29394            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29395            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29396$as_echo "$BOOT_JDK_VERSION" >&6; }
29397          fi # end check jdk version
29398        fi # end check javac
29399      fi # end check java
29400    fi # end check boot jdk found
29401  fi
29402
29403  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29404
29405  if test "x$BOOT_JDK_FOUND" = xno; then
29406    # Now execute the test
29407
29408  BOOT_JDK_PREFIX="/usr/lib/jvm"
29409  BOOT_JDK_SUFFIX=""
29410  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29411  if test "x$ALL_JDKS_FOUND" != x; then
29412    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29413
29414  if test "x$BOOT_JDK_FOUND" = xno; then
29415    # Now execute the test
29416
29417        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29418        if test -d "$BOOT_JDK"; then
29419          BOOT_JDK_FOUND=maybe
29420          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29421$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29422        fi
29423
29424
29425    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29426    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29427      # Do we have a bin/java?
29428      if test ! -x "$BOOT_JDK/bin/java"; then
29429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29431        BOOT_JDK_FOUND=no
29432      else
29433        # Do we have a bin/javac?
29434        if test ! -x "$BOOT_JDK/bin/javac"; then
29435          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29437          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29438$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29439          BOOT_JDK_FOUND=no
29440        else
29441          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29442          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29443
29444          # Extra M4 quote needed to protect [] in grep expression.
29445          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29446          if test "x$FOUND_CORRECT_VERSION" = x; then
29447            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29449            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29450$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29451            BOOT_JDK_FOUND=no
29452          else
29453            # We're done! :-)
29454            BOOT_JDK_FOUND=yes
29455
29456  # Only process if variable expands to non-empty
29457
29458  if test "x$BOOT_JDK" != x; then
29459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29460
29461  # Input might be given as Windows format, start by converting to
29462  # unix format.
29463  path="$BOOT_JDK"
29464  new_path=`$CYGPATH -u "$path"`
29465
29466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29469  # "foo.exe" is OK but "foo" is an error.
29470  #
29471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29472  # It is also a way to make sure we got the proper file name for the real test later on.
29473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29474  if test "x$test_shortpath" = x; then
29475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29477    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29478  fi
29479
29480  # Call helper function which possibly converts this using DOS-style short mode.
29481  # If so, the updated path is stored in $new_path.
29482
29483  input_path="$new_path"
29484  # Check if we need to convert this using DOS-style short mode. If the path
29485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29486  # take no chances and rewrite it.
29487  # Note: m4 eats our [], so we need to use [ and ] instead.
29488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29489  if test "x$has_forbidden_chars" != x; then
29490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29494      # Going to short mode and back again did indeed matter. Since short mode is
29495      # case insensitive, let's make it lowercase to improve readability.
29496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29497      # Now convert it back to Unix-style (cygpath)
29498      input_path=`$CYGPATH -u "$shortmode_path"`
29499      new_path="$input_path"
29500    fi
29501  fi
29502
29503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29504  if test "x$test_cygdrive_prefix" = x; then
29505    # As a simple fix, exclude /usr/bin since it's not a real path.
29506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29508      # a path prefixed by /cygdrive for fixpath to work.
29509      new_path="$CYGWIN_ROOT_PATH$input_path"
29510    fi
29511  fi
29512
29513
29514  if test "x$path" != "x$new_path"; then
29515    BOOT_JDK="$new_path"
29516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29518  fi
29519
29520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29521
29522  path="$BOOT_JDK"
29523  has_colon=`$ECHO $path | $GREP ^.:`
29524  new_path="$path"
29525  if test "x$has_colon" = x; then
29526    # Not in mixed or Windows style, start by that.
29527    new_path=`cmd //c echo $path`
29528  fi
29529
29530
29531  input_path="$new_path"
29532  # Check if we need to convert this using DOS-style short mode. If the path
29533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29534  # take no chances and rewrite it.
29535  # Note: m4 eats our [], so we need to use [ and ] instead.
29536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29537  if test "x$has_forbidden_chars" != x; then
29538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29540  fi
29541
29542
29543  windows_path="$new_path"
29544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29545    unix_path=`$CYGPATH -u "$windows_path"`
29546    new_path="$unix_path"
29547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29549    new_path="$unix_path"
29550  fi
29551
29552  if test "x$path" != "x$new_path"; then
29553    BOOT_JDK="$new_path"
29554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29556  fi
29557
29558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29560
29561    else
29562      # We're on a unix platform. Hooray! :)
29563      path="$BOOT_JDK"
29564      has_space=`$ECHO "$path" | $GREP " "`
29565      if test "x$has_space" != x; then
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29569      fi
29570
29571      # Use eval to expand a potential ~
29572      eval path="$path"
29573      if test ! -f "$path" && test ! -d "$path"; then
29574        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29575      fi
29576
29577      if test -d "$path"; then
29578        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29579      else
29580        dir="`$DIRNAME "$path"`"
29581        base="`$BASENAME "$path"`"
29582        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29583      fi
29584    fi
29585  fi
29586
29587            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29588$as_echo_n "checking for Boot JDK... " >&6; }
29589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29590$as_echo "$BOOT_JDK" >&6; }
29591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29592$as_echo_n "checking Boot JDK version... " >&6; }
29593            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29595$as_echo "$BOOT_JDK_VERSION" >&6; }
29596          fi # end check jdk version
29597        fi # end check javac
29598      fi # end check java
29599    fi # end check boot jdk found
29600  fi
29601
29602    done
29603  fi
29604
29605
29606    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29607    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29608      # Do we have a bin/java?
29609      if test ! -x "$BOOT_JDK/bin/java"; then
29610        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29612        BOOT_JDK_FOUND=no
29613      else
29614        # Do we have a bin/javac?
29615        if test ! -x "$BOOT_JDK/bin/javac"; then
29616          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29618          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29619$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29620          BOOT_JDK_FOUND=no
29621        else
29622          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29623          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29624
29625          # Extra M4 quote needed to protect [] in grep expression.
29626          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29627          if test "x$FOUND_CORRECT_VERSION" = x; then
29628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29630            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29632            BOOT_JDK_FOUND=no
29633          else
29634            # We're done! :-)
29635            BOOT_JDK_FOUND=yes
29636
29637  # Only process if variable expands to non-empty
29638
29639  if test "x$BOOT_JDK" != x; then
29640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29641
29642  # Input might be given as Windows format, start by converting to
29643  # unix format.
29644  path="$BOOT_JDK"
29645  new_path=`$CYGPATH -u "$path"`
29646
29647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29650  # "foo.exe" is OK but "foo" is an error.
29651  #
29652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29653  # It is also a way to make sure we got the proper file name for the real test later on.
29654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29655  if test "x$test_shortpath" = x; then
29656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29658    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29659  fi
29660
29661  # Call helper function which possibly converts this using DOS-style short mode.
29662  # If so, the updated path is stored in $new_path.
29663
29664  input_path="$new_path"
29665  # Check if we need to convert this using DOS-style short mode. If the path
29666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29667  # take no chances and rewrite it.
29668  # Note: m4 eats our [], so we need to use [ and ] instead.
29669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29670  if test "x$has_forbidden_chars" != x; then
29671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29675      # Going to short mode and back again did indeed matter. Since short mode is
29676      # case insensitive, let's make it lowercase to improve readability.
29677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29678      # Now convert it back to Unix-style (cygpath)
29679      input_path=`$CYGPATH -u "$shortmode_path"`
29680      new_path="$input_path"
29681    fi
29682  fi
29683
29684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29685  if test "x$test_cygdrive_prefix" = x; then
29686    # As a simple fix, exclude /usr/bin since it's not a real path.
29687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29689      # a path prefixed by /cygdrive for fixpath to work.
29690      new_path="$CYGWIN_ROOT_PATH$input_path"
29691    fi
29692  fi
29693
29694
29695  if test "x$path" != "x$new_path"; then
29696    BOOT_JDK="$new_path"
29697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29699  fi
29700
29701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29702
29703  path="$BOOT_JDK"
29704  has_colon=`$ECHO $path | $GREP ^.:`
29705  new_path="$path"
29706  if test "x$has_colon" = x; then
29707    # Not in mixed or Windows style, start by that.
29708    new_path=`cmd //c echo $path`
29709  fi
29710
29711
29712  input_path="$new_path"
29713  # Check if we need to convert this using DOS-style short mode. If the path
29714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29715  # take no chances and rewrite it.
29716  # Note: m4 eats our [], so we need to use [ and ] instead.
29717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29718  if test "x$has_forbidden_chars" != x; then
29719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29721  fi
29722
29723
29724  windows_path="$new_path"
29725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29726    unix_path=`$CYGPATH -u "$windows_path"`
29727    new_path="$unix_path"
29728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29730    new_path="$unix_path"
29731  fi
29732
29733  if test "x$path" != "x$new_path"; then
29734    BOOT_JDK="$new_path"
29735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29736$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29737  fi
29738
29739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29741
29742    else
29743      # We're on a unix platform. Hooray! :)
29744      path="$BOOT_JDK"
29745      has_space=`$ECHO "$path" | $GREP " "`
29746      if test "x$has_space" != x; then
29747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29750      fi
29751
29752      # Use eval to expand a potential ~
29753      eval path="$path"
29754      if test ! -f "$path" && test ! -d "$path"; then
29755        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29756      fi
29757
29758      if test -d "$path"; then
29759        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29760      else
29761        dir="`$DIRNAME "$path"`"
29762        base="`$BASENAME "$path"`"
29763        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29764      fi
29765    fi
29766  fi
29767
29768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29769$as_echo_n "checking for Boot JDK... " >&6; }
29770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29771$as_echo "$BOOT_JDK" >&6; }
29772            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29773$as_echo_n "checking Boot JDK version... " >&6; }
29774            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29776$as_echo "$BOOT_JDK_VERSION" >&6; }
29777          fi # end check jdk version
29778        fi # end check javac
29779      fi # end check java
29780    fi # end check boot jdk found
29781  fi
29782
29783  fi
29784
29785
29786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29788      # Do we have a bin/java?
29789      if test ! -x "$BOOT_JDK/bin/java"; then
29790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29792        BOOT_JDK_FOUND=no
29793      else
29794        # Do we have a bin/javac?
29795        if test ! -x "$BOOT_JDK/bin/javac"; then
29796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29800          BOOT_JDK_FOUND=no
29801        else
29802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29804
29805          # Extra M4 quote needed to protect [] in grep expression.
29806          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29807          if test "x$FOUND_CORRECT_VERSION" = x; then
29808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29812            BOOT_JDK_FOUND=no
29813          else
29814            # We're done! :-)
29815            BOOT_JDK_FOUND=yes
29816
29817  # Only process if variable expands to non-empty
29818
29819  if test "x$BOOT_JDK" != x; then
29820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29821
29822  # Input might be given as Windows format, start by converting to
29823  # unix format.
29824  path="$BOOT_JDK"
29825  new_path=`$CYGPATH -u "$path"`
29826
29827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29830  # "foo.exe" is OK but "foo" is an error.
29831  #
29832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29833  # It is also a way to make sure we got the proper file name for the real test later on.
29834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29835  if test "x$test_shortpath" = x; then
29836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29839  fi
29840
29841  # Call helper function which possibly converts this using DOS-style short mode.
29842  # If so, the updated path is stored in $new_path.
29843
29844  input_path="$new_path"
29845  # Check if we need to convert this using DOS-style short mode. If the path
29846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29847  # take no chances and rewrite it.
29848  # Note: m4 eats our [], so we need to use [ and ] instead.
29849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29850  if test "x$has_forbidden_chars" != x; then
29851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29855      # Going to short mode and back again did indeed matter. Since short mode is
29856      # case insensitive, let's make it lowercase to improve readability.
29857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29858      # Now convert it back to Unix-style (cygpath)
29859      input_path=`$CYGPATH -u "$shortmode_path"`
29860      new_path="$input_path"
29861    fi
29862  fi
29863
29864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29865  if test "x$test_cygdrive_prefix" = x; then
29866    # As a simple fix, exclude /usr/bin since it's not a real path.
29867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29869      # a path prefixed by /cygdrive for fixpath to work.
29870      new_path="$CYGWIN_ROOT_PATH$input_path"
29871    fi
29872  fi
29873
29874
29875  if test "x$path" != "x$new_path"; then
29876    BOOT_JDK="$new_path"
29877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29879  fi
29880
29881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29882
29883  path="$BOOT_JDK"
29884  has_colon=`$ECHO $path | $GREP ^.:`
29885  new_path="$path"
29886  if test "x$has_colon" = x; then
29887    # Not in mixed or Windows style, start by that.
29888    new_path=`cmd //c echo $path`
29889  fi
29890
29891
29892  input_path="$new_path"
29893  # Check if we need to convert this using DOS-style short mode. If the path
29894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29895  # take no chances and rewrite it.
29896  # Note: m4 eats our [], so we need to use [ and ] instead.
29897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29898  if test "x$has_forbidden_chars" != x; then
29899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29901  fi
29902
29903
29904  windows_path="$new_path"
29905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29906    unix_path=`$CYGPATH -u "$windows_path"`
29907    new_path="$unix_path"
29908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29910    new_path="$unix_path"
29911  fi
29912
29913  if test "x$path" != "x$new_path"; then
29914    BOOT_JDK="$new_path"
29915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29917  fi
29918
29919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29921
29922    else
29923      # We're on a unix platform. Hooray! :)
29924      path="$BOOT_JDK"
29925      has_space=`$ECHO "$path" | $GREP " "`
29926      if test "x$has_space" != x; then
29927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29930      fi
29931
29932      # Use eval to expand a potential ~
29933      eval path="$path"
29934      if test ! -f "$path" && test ! -d "$path"; then
29935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29936      fi
29937
29938      if test -d "$path"; then
29939        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29940      else
29941        dir="`$DIRNAME "$path"`"
29942        base="`$BASENAME "$path"`"
29943        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29944      fi
29945    fi
29946  fi
29947
29948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29949$as_echo_n "checking for Boot JDK... " >&6; }
29950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29951$as_echo "$BOOT_JDK" >&6; }
29952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29953$as_echo_n "checking Boot JDK version... " >&6; }
29954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29956$as_echo "$BOOT_JDK_VERSION" >&6; }
29957          fi # end check jdk version
29958        fi # end check javac
29959      fi # end check java
29960    fi # end check boot jdk found
29961  fi
29962
29963
29964  # If we haven't found anything yet, we've truly lost. Give up.
29965  if test "x$BOOT_JDK_FOUND" = xno; then
29966
29967  # Print a helpful message on how to acquire the necessary build dependency.
29968  # openjdk is the help tag: freetype, cups, alsa etc
29969  MISSING_DEPENDENCY=openjdk
29970
29971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29972    cygwin_help $MISSING_DEPENDENCY
29973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29974    msys_help $MISSING_DEPENDENCY
29975  else
29976    PKGHANDLER_COMMAND=
29977
29978    case $PKGHANDLER in
29979      apt-get)
29980        apt_help     $MISSING_DEPENDENCY ;;
29981      yum)
29982        yum_help     $MISSING_DEPENDENCY ;;
29983      brew)
29984        brew_help    $MISSING_DEPENDENCY ;;
29985      port)
29986        port_help    $MISSING_DEPENDENCY ;;
29987      pkgutil)
29988        pkgutil_help $MISSING_DEPENDENCY ;;
29989      pkgadd)
29990        pkgadd_help  $MISSING_DEPENDENCY ;;
29991    esac
29992
29993    if test "x$PKGHANDLER_COMMAND" != x; then
29994      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29995    fi
29996  fi
29997
29998    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29999$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30000    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30001$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30002    as_fn_error $? "Cannot continue" "$LINENO" 5
30003  fi
30004
30005
30006
30007  # Setup tools from the Boot JDK.
30008
30009  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30010
30011  # Publish this variable in the help.
30012
30013
30014  if [ -z "${JAVA+x}" ]; then
30015    # The variable is not set by user, try to locate tool using the code snippet
30016
30017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30018$as_echo_n "checking for java in Boot JDK... " >&6; }
30019      JAVA=$BOOT_JDK/bin/java
30020      if test ! -x $JAVA; then
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30022$as_echo "not found" >&6; }
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30024$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30025        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30026      fi
30027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30028$as_echo "ok" >&6; }
30029
30030
30031  else
30032    # The variable is set, but is it from the command line or the environment?
30033
30034    # Try to remove the string !JAVA! from our list.
30035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30037      # If it failed, the variable was not from the command line. Ignore it,
30038      # but warn the user (except for BASH, which is always set by the calling BASH).
30039      if test "xJAVA" != xBASH; then
30040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30041$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30042      fi
30043      # Try to locate tool using the code snippet
30044
30045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30046$as_echo_n "checking for java in Boot JDK... " >&6; }
30047      JAVA=$BOOT_JDK/bin/java
30048      if test ! -x $JAVA; then
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30050$as_echo "not found" >&6; }
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30052$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30053        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30054      fi
30055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30056$as_echo "ok" >&6; }
30057
30058
30059    else
30060      # If it succeeded, then it was overridden by the user. We will use it
30061      # for the tool.
30062
30063      # First remove it from the list of overridden variables, so we can test
30064      # for unknown variables in the end.
30065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30066
30067      # Check if we try to supply an empty value
30068      if test "x$JAVA" = x; then
30069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30070$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30072$as_echo_n "checking for JAVA... " >&6; }
30073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30074$as_echo "disabled" >&6; }
30075      else
30076        # Check if the provided tool contains a complete path.
30077        tool_specified="$JAVA"
30078        tool_basename="${tool_specified##*/}"
30079        if test "x$tool_basename" = "x$tool_specified"; then
30080          # A command without a complete path is provided, search $PATH.
30081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30082$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30083          # Extract the first word of "$tool_basename", so it can be a program name with args.
30084set dummy $tool_basename; ac_word=$2
30085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30086$as_echo_n "checking for $ac_word... " >&6; }
30087if ${ac_cv_path_JAVA+:} false; then :
30088  $as_echo_n "(cached) " >&6
30089else
30090  case $JAVA in
30091  [\\/]* | ?:[\\/]*)
30092  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30093  ;;
30094  *)
30095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30096for as_dir in $PATH
30097do
30098  IFS=$as_save_IFS
30099  test -z "$as_dir" && as_dir=.
30100    for ac_exec_ext in '' $ac_executable_extensions; do
30101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30102    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30104    break 2
30105  fi
30106done
30107  done
30108IFS=$as_save_IFS
30109
30110  ;;
30111esac
30112fi
30113JAVA=$ac_cv_path_JAVA
30114if test -n "$JAVA"; then
30115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30116$as_echo "$JAVA" >&6; }
30117else
30118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30119$as_echo "no" >&6; }
30120fi
30121
30122
30123          if test "x$JAVA" = x; then
30124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30125          fi
30126        else
30127          # Otherwise we believe it is a complete path. Use it as it is.
30128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30129$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30131$as_echo_n "checking for JAVA... " >&6; }
30132          if test ! -x "$tool_specified"; then
30133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30134$as_echo "not found" >&6; }
30135            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30136          fi
30137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30138$as_echo "$tool_specified" >&6; }
30139        fi
30140      fi
30141    fi
30142
30143  fi
30144
30145
30146
30147  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30148
30149  # Publish this variable in the help.
30150
30151
30152  if [ -z "${JAVAC+x}" ]; then
30153    # The variable is not set by user, try to locate tool using the code snippet
30154
30155      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30156$as_echo_n "checking for javac in Boot JDK... " >&6; }
30157      JAVAC=$BOOT_JDK/bin/javac
30158      if test ! -x $JAVAC; then
30159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30160$as_echo "not found" >&6; }
30161        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30162$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30163        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30164      fi
30165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30166$as_echo "ok" >&6; }
30167
30168
30169  else
30170    # The variable is set, but is it from the command line or the environment?
30171
30172    # Try to remove the string !JAVAC! from our list.
30173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30175      # If it failed, the variable was not from the command line. Ignore it,
30176      # but warn the user (except for BASH, which is always set by the calling BASH).
30177      if test "xJAVAC" != xBASH; then
30178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30179$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30180      fi
30181      # Try to locate tool using the code snippet
30182
30183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30184$as_echo_n "checking for javac in Boot JDK... " >&6; }
30185      JAVAC=$BOOT_JDK/bin/javac
30186      if test ! -x $JAVAC; then
30187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30188$as_echo "not found" >&6; }
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30190$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30191        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30192      fi
30193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30194$as_echo "ok" >&6; }
30195
30196
30197    else
30198      # If it succeeded, then it was overridden by the user. We will use it
30199      # for the tool.
30200
30201      # First remove it from the list of overridden variables, so we can test
30202      # for unknown variables in the end.
30203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30204
30205      # Check if we try to supply an empty value
30206      if test "x$JAVAC" = x; then
30207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30208$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30210$as_echo_n "checking for JAVAC... " >&6; }
30211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30212$as_echo "disabled" >&6; }
30213      else
30214        # Check if the provided tool contains a complete path.
30215        tool_specified="$JAVAC"
30216        tool_basename="${tool_specified##*/}"
30217        if test "x$tool_basename" = "x$tool_specified"; then
30218          # A command without a complete path is provided, search $PATH.
30219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30220$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30221          # Extract the first word of "$tool_basename", so it can be a program name with args.
30222set dummy $tool_basename; ac_word=$2
30223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30224$as_echo_n "checking for $ac_word... " >&6; }
30225if ${ac_cv_path_JAVAC+:} false; then :
30226  $as_echo_n "(cached) " >&6
30227else
30228  case $JAVAC in
30229  [\\/]* | ?:[\\/]*)
30230  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30231  ;;
30232  *)
30233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30234for as_dir in $PATH
30235do
30236  IFS=$as_save_IFS
30237  test -z "$as_dir" && as_dir=.
30238    for ac_exec_ext in '' $ac_executable_extensions; do
30239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30240    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30242    break 2
30243  fi
30244done
30245  done
30246IFS=$as_save_IFS
30247
30248  ;;
30249esac
30250fi
30251JAVAC=$ac_cv_path_JAVAC
30252if test -n "$JAVAC"; then
30253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30254$as_echo "$JAVAC" >&6; }
30255else
30256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30257$as_echo "no" >&6; }
30258fi
30259
30260
30261          if test "x$JAVAC" = x; then
30262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30263          fi
30264        else
30265          # Otherwise we believe it is a complete path. Use it as it is.
30266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30267$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30269$as_echo_n "checking for JAVAC... " >&6; }
30270          if test ! -x "$tool_specified"; then
30271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30272$as_echo "not found" >&6; }
30273            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30274          fi
30275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30276$as_echo "$tool_specified" >&6; }
30277        fi
30278      fi
30279    fi
30280
30281  fi
30282
30283
30284
30285  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30286
30287  # Publish this variable in the help.
30288
30289
30290  if [ -z "${JAVAH+x}" ]; then
30291    # The variable is not set by user, try to locate tool using the code snippet
30292
30293      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30294$as_echo_n "checking for javah in Boot JDK... " >&6; }
30295      JAVAH=$BOOT_JDK/bin/javah
30296      if test ! -x $JAVAH; then
30297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30298$as_echo "not found" >&6; }
30299        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30300$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30301        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30302      fi
30303      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30304$as_echo "ok" >&6; }
30305
30306
30307  else
30308    # The variable is set, but is it from the command line or the environment?
30309
30310    # Try to remove the string !JAVAH! from our list.
30311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30313      # If it failed, the variable was not from the command line. Ignore it,
30314      # but warn the user (except for BASH, which is always set by the calling BASH).
30315      if test "xJAVAH" != xBASH; then
30316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30317$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30318      fi
30319      # Try to locate tool using the code snippet
30320
30321      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30322$as_echo_n "checking for javah in Boot JDK... " >&6; }
30323      JAVAH=$BOOT_JDK/bin/javah
30324      if test ! -x $JAVAH; then
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30326$as_echo "not found" >&6; }
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30328$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30329        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30330      fi
30331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30332$as_echo "ok" >&6; }
30333
30334
30335    else
30336      # If it succeeded, then it was overridden by the user. We will use it
30337      # for the tool.
30338
30339      # First remove it from the list of overridden variables, so we can test
30340      # for unknown variables in the end.
30341      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30342
30343      # Check if we try to supply an empty value
30344      if test "x$JAVAH" = x; then
30345        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30346$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30347        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30348$as_echo_n "checking for JAVAH... " >&6; }
30349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30350$as_echo "disabled" >&6; }
30351      else
30352        # Check if the provided tool contains a complete path.
30353        tool_specified="$JAVAH"
30354        tool_basename="${tool_specified##*/}"
30355        if test "x$tool_basename" = "x$tool_specified"; then
30356          # A command without a complete path is provided, search $PATH.
30357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30358$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30359          # Extract the first word of "$tool_basename", so it can be a program name with args.
30360set dummy $tool_basename; ac_word=$2
30361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30362$as_echo_n "checking for $ac_word... " >&6; }
30363if ${ac_cv_path_JAVAH+:} false; then :
30364  $as_echo_n "(cached) " >&6
30365else
30366  case $JAVAH in
30367  [\\/]* | ?:[\\/]*)
30368  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30369  ;;
30370  *)
30371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30372for as_dir in $PATH
30373do
30374  IFS=$as_save_IFS
30375  test -z "$as_dir" && as_dir=.
30376    for ac_exec_ext in '' $ac_executable_extensions; do
30377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30378    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30380    break 2
30381  fi
30382done
30383  done
30384IFS=$as_save_IFS
30385
30386  ;;
30387esac
30388fi
30389JAVAH=$ac_cv_path_JAVAH
30390if test -n "$JAVAH"; then
30391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30392$as_echo "$JAVAH" >&6; }
30393else
30394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30395$as_echo "no" >&6; }
30396fi
30397
30398
30399          if test "x$JAVAH" = x; then
30400            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30401          fi
30402        else
30403          # Otherwise we believe it is a complete path. Use it as it is.
30404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30405$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30406          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30407$as_echo_n "checking for JAVAH... " >&6; }
30408          if test ! -x "$tool_specified"; then
30409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30410$as_echo "not found" >&6; }
30411            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30412          fi
30413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30414$as_echo "$tool_specified" >&6; }
30415        fi
30416      fi
30417    fi
30418
30419  fi
30420
30421
30422
30423  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30424
30425  # Publish this variable in the help.
30426
30427
30428  if [ -z "${JAR+x}" ]; then
30429    # The variable is not set by user, try to locate tool using the code snippet
30430
30431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30432$as_echo_n "checking for jar in Boot JDK... " >&6; }
30433      JAR=$BOOT_JDK/bin/jar
30434      if test ! -x $JAR; then
30435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30436$as_echo "not found" >&6; }
30437        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30438$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30439        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30440      fi
30441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30442$as_echo "ok" >&6; }
30443
30444
30445  else
30446    # The variable is set, but is it from the command line or the environment?
30447
30448    # Try to remove the string !JAR! from our list.
30449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30451      # If it failed, the variable was not from the command line. Ignore it,
30452      # but warn the user (except for BASH, which is always set by the calling BASH).
30453      if test "xJAR" != xBASH; then
30454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30455$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30456      fi
30457      # Try to locate tool using the code snippet
30458
30459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30460$as_echo_n "checking for jar in Boot JDK... " >&6; }
30461      JAR=$BOOT_JDK/bin/jar
30462      if test ! -x $JAR; then
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30464$as_echo "not found" >&6; }
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30466$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30467        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30468      fi
30469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30470$as_echo "ok" >&6; }
30471
30472
30473    else
30474      # If it succeeded, then it was overridden by the user. We will use it
30475      # for the tool.
30476
30477      # First remove it from the list of overridden variables, so we can test
30478      # for unknown variables in the end.
30479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30480
30481      # Check if we try to supply an empty value
30482      if test "x$JAR" = x; then
30483        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30484$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30486$as_echo_n "checking for JAR... " >&6; }
30487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30488$as_echo "disabled" >&6; }
30489      else
30490        # Check if the provided tool contains a complete path.
30491        tool_specified="$JAR"
30492        tool_basename="${tool_specified##*/}"
30493        if test "x$tool_basename" = "x$tool_specified"; then
30494          # A command without a complete path is provided, search $PATH.
30495          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30496$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30497          # Extract the first word of "$tool_basename", so it can be a program name with args.
30498set dummy $tool_basename; ac_word=$2
30499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30500$as_echo_n "checking for $ac_word... " >&6; }
30501if ${ac_cv_path_JAR+:} false; then :
30502  $as_echo_n "(cached) " >&6
30503else
30504  case $JAR in
30505  [\\/]* | ?:[\\/]*)
30506  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30507  ;;
30508  *)
30509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30510for as_dir in $PATH
30511do
30512  IFS=$as_save_IFS
30513  test -z "$as_dir" && as_dir=.
30514    for ac_exec_ext in '' $ac_executable_extensions; do
30515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30516    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30518    break 2
30519  fi
30520done
30521  done
30522IFS=$as_save_IFS
30523
30524  ;;
30525esac
30526fi
30527JAR=$ac_cv_path_JAR
30528if test -n "$JAR"; then
30529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30530$as_echo "$JAR" >&6; }
30531else
30532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30533$as_echo "no" >&6; }
30534fi
30535
30536
30537          if test "x$JAR" = x; then
30538            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30539          fi
30540        else
30541          # Otherwise we believe it is a complete path. Use it as it is.
30542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30543$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30544          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30545$as_echo_n "checking for JAR... " >&6; }
30546          if test ! -x "$tool_specified"; then
30547            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30548$as_echo "not found" >&6; }
30549            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30550          fi
30551          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30552$as_echo "$tool_specified" >&6; }
30553        fi
30554      fi
30555    fi
30556
30557  fi
30558
30559
30560
30561  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30562
30563  # Publish this variable in the help.
30564
30565
30566  if [ -z "${JARSIGNER+x}" ]; then
30567    # The variable is not set by user, try to locate tool using the code snippet
30568
30569      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30570$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30571      JARSIGNER=$BOOT_JDK/bin/jarsigner
30572      if test ! -x $JARSIGNER; then
30573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30574$as_echo "not found" >&6; }
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30576$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30577        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30578      fi
30579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30580$as_echo "ok" >&6; }
30581
30582
30583  else
30584    # The variable is set, but is it from the command line or the environment?
30585
30586    # Try to remove the string !JARSIGNER! from our list.
30587    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30588    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30589      # If it failed, the variable was not from the command line. Ignore it,
30590      # but warn the user (except for BASH, which is always set by the calling BASH).
30591      if test "xJARSIGNER" != xBASH; then
30592        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30593$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30594      fi
30595      # Try to locate tool using the code snippet
30596
30597      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30598$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30599      JARSIGNER=$BOOT_JDK/bin/jarsigner
30600      if test ! -x $JARSIGNER; then
30601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30602$as_echo "not found" >&6; }
30603        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30604$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30605        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30606      fi
30607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30608$as_echo "ok" >&6; }
30609
30610
30611    else
30612      # If it succeeded, then it was overridden by the user. We will use it
30613      # for the tool.
30614
30615      # First remove it from the list of overridden variables, so we can test
30616      # for unknown variables in the end.
30617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30618
30619      # Check if we try to supply an empty value
30620      if test "x$JARSIGNER" = x; then
30621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30622$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30624$as_echo_n "checking for JARSIGNER... " >&6; }
30625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30626$as_echo "disabled" >&6; }
30627      else
30628        # Check if the provided tool contains a complete path.
30629        tool_specified="$JARSIGNER"
30630        tool_basename="${tool_specified##*/}"
30631        if test "x$tool_basename" = "x$tool_specified"; then
30632          # A command without a complete path is provided, search $PATH.
30633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30634$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30635          # Extract the first word of "$tool_basename", so it can be a program name with args.
30636set dummy $tool_basename; ac_word=$2
30637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30638$as_echo_n "checking for $ac_word... " >&6; }
30639if ${ac_cv_path_JARSIGNER+:} false; then :
30640  $as_echo_n "(cached) " >&6
30641else
30642  case $JARSIGNER in
30643  [\\/]* | ?:[\\/]*)
30644  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30645  ;;
30646  *)
30647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30648for as_dir in $PATH
30649do
30650  IFS=$as_save_IFS
30651  test -z "$as_dir" && as_dir=.
30652    for ac_exec_ext in '' $ac_executable_extensions; do
30653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30654    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30656    break 2
30657  fi
30658done
30659  done
30660IFS=$as_save_IFS
30661
30662  ;;
30663esac
30664fi
30665JARSIGNER=$ac_cv_path_JARSIGNER
30666if test -n "$JARSIGNER"; then
30667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30668$as_echo "$JARSIGNER" >&6; }
30669else
30670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30671$as_echo "no" >&6; }
30672fi
30673
30674
30675          if test "x$JARSIGNER" = x; then
30676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30677          fi
30678        else
30679          # Otherwise we believe it is a complete path. Use it as it is.
30680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30681$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30683$as_echo_n "checking for JARSIGNER... " >&6; }
30684          if test ! -x "$tool_specified"; then
30685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30686$as_echo "not found" >&6; }
30687            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30688          fi
30689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30690$as_echo "$tool_specified" >&6; }
30691        fi
30692      fi
30693    fi
30694
30695  fi
30696
30697
30698
30699  # Finally, set some other options...
30700
30701  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30702  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30703
30704
30705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30706$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30707  if "$JAVA" --list-modules > /dev/null 2>&1; then
30708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30709$as_echo "yes" >&6; }
30710    BOOT_JDK_MODULAR="true"
30711  else
30712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30713$as_echo "no" >&6; }
30714    BOOT_JDK_MODULAR="false"
30715  fi
30716
30717
30718
30719
30720  # Check if the boot jdk is 32 or 64 bit
30721  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30722    BOOT_JDK_BITS="64"
30723  else
30724    BOOT_JDK_BITS="32"
30725  fi
30726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30727$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30729$as_echo "$BOOT_JDK_BITS" >&6; }
30730
30731
30732
30733
30734# Check whether --with-build-jdk was given.
30735if test "${with_build_jdk+set}" = set; then :
30736  withval=$with_build_jdk;
30737fi
30738
30739
30740  CREATE_BUILDJDK=false
30741  EXTERNAL_BUILDJDK=false
30742  BUILD_JDK_FOUND="no"
30743  if test "x$with_build_jdk" != "x"; then
30744
30745  if test "x$BUILD_JDK_FOUND" = xno; then
30746    # Execute the test
30747
30748       if test "x$with_build_jdk" != x; then
30749         BUILD_JDK=$with_build_jdk
30750         BUILD_JDK_FOUND=maybe
30751         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30752$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30753       fi
30754
30755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30756    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30757      # Do we have a bin/java?
30758      if test ! -x "$BUILD_JDK/bin/java"; then
30759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30760$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30761        BUILD_JDK_FOUND=no
30762      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30763        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30764$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30765        BUILD_JDK_FOUND=no
30766      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30768$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30769        BUILD_JDK_FOUND=no
30770      elif test ! -x "$BUILD_JDK/bin/javac"; then
30771        # Do we have a bin/javac?
30772        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30773$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30774        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30775$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30776        BUILD_JDK_FOUND=no
30777      else
30778        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30779        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30780
30781        # Extra M4 quote needed to protect [] in grep expression.
30782        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30783        if test "x$FOUND_CORRECT_VERSION" = x; then
30784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30785$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30786          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30787$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30788          BUILD_JDK_FOUND=no
30789        else
30790          # We're done!
30791          BUILD_JDK_FOUND=yes
30792
30793  # Only process if variable expands to non-empty
30794
30795  if test "x$BUILD_JDK" != x; then
30796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30797
30798  # Input might be given as Windows format, start by converting to
30799  # unix format.
30800  path="$BUILD_JDK"
30801  new_path=`$CYGPATH -u "$path"`
30802
30803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30806  # "foo.exe" is OK but "foo" is an error.
30807  #
30808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30809  # It is also a way to make sure we got the proper file name for the real test later on.
30810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30811  if test "x$test_shortpath" = x; then
30812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30813$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30814    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30815  fi
30816
30817  # Call helper function which possibly converts this using DOS-style short mode.
30818  # If so, the updated path is stored in $new_path.
30819
30820  input_path="$new_path"
30821  # Check if we need to convert this using DOS-style short mode. If the path
30822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30823  # take no chances and rewrite it.
30824  # Note: m4 eats our [], so we need to use [ and ] instead.
30825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30826  if test "x$has_forbidden_chars" != x; then
30827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30831      # Going to short mode and back again did indeed matter. Since short mode is
30832      # case insensitive, let's make it lowercase to improve readability.
30833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30834      # Now convert it back to Unix-style (cygpath)
30835      input_path=`$CYGPATH -u "$shortmode_path"`
30836      new_path="$input_path"
30837    fi
30838  fi
30839
30840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30841  if test "x$test_cygdrive_prefix" = x; then
30842    # As a simple fix, exclude /usr/bin since it's not a real path.
30843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30845      # a path prefixed by /cygdrive for fixpath to work.
30846      new_path="$CYGWIN_ROOT_PATH$input_path"
30847    fi
30848  fi
30849
30850
30851  if test "x$path" != "x$new_path"; then
30852    BUILD_JDK="$new_path"
30853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30854$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30855  fi
30856
30857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30858
30859  path="$BUILD_JDK"
30860  has_colon=`$ECHO $path | $GREP ^.:`
30861  new_path="$path"
30862  if test "x$has_colon" = x; then
30863    # Not in mixed or Windows style, start by that.
30864    new_path=`cmd //c echo $path`
30865  fi
30866
30867
30868  input_path="$new_path"
30869  # Check if we need to convert this using DOS-style short mode. If the path
30870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30871  # take no chances and rewrite it.
30872  # Note: m4 eats our [], so we need to use [ and ] instead.
30873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30874  if test "x$has_forbidden_chars" != x; then
30875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30877  fi
30878
30879
30880  windows_path="$new_path"
30881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30882    unix_path=`$CYGPATH -u "$windows_path"`
30883    new_path="$unix_path"
30884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30886    new_path="$unix_path"
30887  fi
30888
30889  if test "x$path" != "x$new_path"; then
30890    BUILD_JDK="$new_path"
30891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30892$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30893  fi
30894
30895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30897
30898    else
30899      # We're on a unix platform. Hooray! :)
30900      path="$BUILD_JDK"
30901      has_space=`$ECHO "$path" | $GREP " "`
30902      if test "x$has_space" != x; then
30903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30904$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30906      fi
30907
30908      # Use eval to expand a potential ~
30909      eval path="$path"
30910      if test ! -f "$path" && test ! -d "$path"; then
30911        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30912      fi
30913
30914      if test -d "$path"; then
30915        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30916      else
30917        dir="`$DIRNAME "$path"`"
30918        base="`$BASENAME "$path"`"
30919        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30920      fi
30921    fi
30922  fi
30923
30924          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30925$as_echo_n "checking for Build JDK... " >&6; }
30926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30927$as_echo "$BUILD_JDK" >&6; }
30928          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30929$as_echo_n "checking Build JDK version... " >&6; }
30930          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30932$as_echo "$BUILD_JDK_VERSION" >&6; }
30933        fi # end check jdk version
30934      fi # end check java
30935    fi # end check build jdk found
30936  fi
30937
30938    EXTERNAL_BUILDJDK=true
30939  else
30940    if test "x$COMPILE_TYPE" = "xcross"; then
30941      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30942      BUILD_JDK_FOUND=yes
30943      CREATE_BUILDJDK=true
30944      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30945$as_echo_n "checking for Build JDK... " >&6; }
30946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30947$as_echo "yes, will build it for the host platform" >&6; }
30948    else
30949      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30950      BUILD_JDK_FOUND=yes
30951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30952$as_echo_n "checking for Build JDK... " >&6; }
30953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30954$as_echo "yes, will use output dir" >&6; }
30955    fi
30956  fi
30957
30958  JMOD="$BUILD_JDK/bin/jmod"
30959  JLINK="$BUILD_JDK/bin/jlink"
30960
30961
30962
30963  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30965$as_echo_n "checking for Build JDK... " >&6; }
30966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30967$as_echo "no" >&6; }
30968    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30969  fi
30970
30971
30972
30973
30974
30975
30976###############################################################################
30977#
30978# Configure the sources to use. We can add or override individual directories.
30979#
30980###############################################################################
30981
30982
30983  # Where are the sources.
30984  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30985  CORBA_TOPDIR="$SRC_ROOT/corba"
30986  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30987  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30988  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30989  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30990  JDK_TOPDIR="$SRC_ROOT/jdk"
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000  # This feature is no longer supported.
31001
31002
31003
31004# Check whether --with-add-source-root was given.
31005if test "${with_add_source_root+set}" = set; then :
31006  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
31007$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31008fi
31009
31010
31011
31012
31013# Check whether --with-override-source-root was given.
31014if test "${with_override_source_root+set}" = set; then :
31015  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
31016$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31017fi
31018
31019
31020
31021
31022# Check whether --with-adds-and-overrides was given.
31023if test "${with_adds_and_overrides+set}" = set; then :
31024  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
31025$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31026fi
31027
31028
31029
31030
31031# Check whether --with-override-langtools was given.
31032if test "${with_override_langtools+set}" = set; then :
31033  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31034$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31035fi
31036
31037
31038
31039
31040# Check whether --with-override-corba was given.
31041if test "${with_override_corba+set}" = set; then :
31042  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31043$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31044fi
31045
31046
31047
31048
31049# Check whether --with-override-jaxp was given.
31050if test "${with_override_jaxp+set}" = set; then :
31051  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31052$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31053fi
31054
31055
31056
31057
31058# Check whether --with-override-jaxws was given.
31059if test "${with_override_jaxws+set}" = set; then :
31060  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31061$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31062fi
31063
31064
31065
31066
31067# Check whether --with-override-hotspot was given.
31068if test "${with_override_hotspot+set}" = set; then :
31069  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31070$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31071fi
31072
31073
31074
31075
31076# Check whether --with-override-nashorn was given.
31077if test "${with_override_nashorn+set}" = set; then :
31078  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31079$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31080fi
31081
31082
31083
31084
31085# Check whether --with-override-jdk was given.
31086if test "${with_override_jdk+set}" = set; then :
31087  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31088$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31089fi
31090
31091
31092
31093
31094  BUILD_OUTPUT="$OUTPUT_ROOT"
31095
31096  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31097
31098
31099
31100# Check whether --with-import_hotspot was given.
31101if test "${with_import_hotspot+set}" = set; then :
31102  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31103$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31104fi
31105
31106
31107
31108
31109
31110
31111# Check whether --with-import-modules was given.
31112if test "${with_import_modules+set}" = set; then :
31113  withval=$with_import_modules;
31114fi
31115
31116
31117  if test "x$with_import_modules" != x \
31118      && test "x$with_import_modules" != "xno"; then
31119    if test -d "$with_import_modules"; then
31120      IMPORT_MODULES_TOPDIR="$with_import_modules"
31121
31122  # Only process if variable expands to non-empty
31123
31124  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31126
31127  # Input might be given as Windows format, start by converting to
31128  # unix format.
31129  path="$IMPORT_MODULES_TOPDIR"
31130  new_path=`$CYGPATH -u "$path"`
31131
31132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31135  # "foo.exe" is OK but "foo" is an error.
31136  #
31137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31138  # It is also a way to make sure we got the proper file name for the real test later on.
31139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31140  if test "x$test_shortpath" = x; then
31141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31142$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31143    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31144  fi
31145
31146  # Call helper function which possibly converts this using DOS-style short mode.
31147  # If so, the updated path is stored in $new_path.
31148
31149  input_path="$new_path"
31150  # Check if we need to convert this using DOS-style short mode. If the path
31151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31152  # take no chances and rewrite it.
31153  # Note: m4 eats our [], so we need to use [ and ] instead.
31154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31155  if test "x$has_forbidden_chars" != x; then
31156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31160      # Going to short mode and back again did indeed matter. Since short mode is
31161      # case insensitive, let's make it lowercase to improve readability.
31162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31163      # Now convert it back to Unix-style (cygpath)
31164      input_path=`$CYGPATH -u "$shortmode_path"`
31165      new_path="$input_path"
31166    fi
31167  fi
31168
31169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31170  if test "x$test_cygdrive_prefix" = x; then
31171    # As a simple fix, exclude /usr/bin since it's not a real path.
31172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31174      # a path prefixed by /cygdrive for fixpath to work.
31175      new_path="$CYGWIN_ROOT_PATH$input_path"
31176    fi
31177  fi
31178
31179
31180  if test "x$path" != "x$new_path"; then
31181    IMPORT_MODULES_TOPDIR="$new_path"
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31183$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31184  fi
31185
31186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31187
31188  path="$IMPORT_MODULES_TOPDIR"
31189  has_colon=`$ECHO $path | $GREP ^.:`
31190  new_path="$path"
31191  if test "x$has_colon" = x; then
31192    # Not in mixed or Windows style, start by that.
31193    new_path=`cmd //c echo $path`
31194  fi
31195
31196
31197  input_path="$new_path"
31198  # Check if we need to convert this using DOS-style short mode. If the path
31199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31200  # take no chances and rewrite it.
31201  # Note: m4 eats our [], so we need to use [ and ] instead.
31202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31203  if test "x$has_forbidden_chars" != x; then
31204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31206  fi
31207
31208
31209  windows_path="$new_path"
31210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31211    unix_path=`$CYGPATH -u "$windows_path"`
31212    new_path="$unix_path"
31213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31215    new_path="$unix_path"
31216  fi
31217
31218  if test "x$path" != "x$new_path"; then
31219    IMPORT_MODULES_TOPDIR="$new_path"
31220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31221$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31222  fi
31223
31224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31226
31227    else
31228      # We're on a unix platform. Hooray! :)
31229      path="$IMPORT_MODULES_TOPDIR"
31230      has_space=`$ECHO "$path" | $GREP " "`
31231      if test "x$has_space" != x; then
31232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31233$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31235      fi
31236
31237      # Use eval to expand a potential ~
31238      eval path="$path"
31239      if test ! -f "$path" && test ! -d "$path"; then
31240        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31241      fi
31242
31243      if test -d "$path"; then
31244        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31245      else
31246        dir="`$DIRNAME "$path"`"
31247        base="`$BASENAME "$path"`"
31248        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31249      fi
31250    fi
31251  fi
31252
31253    elif test -e "$with_import_modules"; then
31254      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31255      $RM -rf "$IMPORT_MODULES_TOPDIR"
31256      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31257      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31258        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31259      fi
31260    else
31261      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31262    fi
31263  fi
31264
31265  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31266    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31267  fi
31268  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31269    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31270  fi
31271  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31272    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31273  fi
31274  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31275    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31276  fi
31277  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31278    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31279  fi
31280  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31281    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31282  fi
31283  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31284    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31285  fi
31286  # Workaround for using different imported module-info.java in Jake due to a
31287  # change in format. Remove once new format is standard in JDK 9 and javafx
31288  # delivers just that.
31289  if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then
31290    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC"
31291  fi
31292  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31293    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31294  fi
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306###############################################################################
31307#
31308# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31309# native code.
31310#
31311###############################################################################
31312
31313# See if we are doing a complete static build or not
31314
31315  # Check whether --enable-static-build was given.
31316if test "${enable_static_build+set}" = set; then :
31317  enableval=$enable_static_build;
31318fi
31319
31320  STATIC_BUILD=false
31321  if test "x$enable_static_build" = "xyes"; then
31322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31323$as_echo_n "checking if static build is enabled... " >&6; }
31324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31325$as_echo "yes" >&6; }
31326    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31327      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31328    fi
31329    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31330    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31331    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31332    STATIC_BUILD=true
31333  elif test "x$enable_static_build" = "xno"; then
31334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31335$as_echo_n "checking if static build is enabled... " >&6; }
31336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31337$as_echo "no" >&6; }
31338  elif test "x$enable_static_build" != "x"; then
31339    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31340  fi
31341
31342
31343
31344
31345# First determine the toolchain type (compiler family)
31346
31347
31348# Check whether --with-toolchain-type was given.
31349if test "${with_toolchain_type+set}" = set; then :
31350  withval=$with_toolchain_type;
31351fi
31352
31353
31354  # Use indirect variable referencing
31355  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31356  VALID_TOOLCHAINS=${!toolchain_var_name}
31357
31358  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31359    if test -n "$XCODEBUILD"; then
31360      # On Mac OS X, default toolchain to clang after Xcode 5
31361      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31362      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31363      if test $? -ne 0; then
31364        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31365      fi
31366      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31367          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31368          $CUT -f 1 -d .`
31369      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31370$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31371      if test $XCODE_MAJOR_VERSION -ge 5; then
31372          DEFAULT_TOOLCHAIN="clang"
31373      else
31374          DEFAULT_TOOLCHAIN="gcc"
31375      fi
31376    else
31377      # If Xcode is not installed, but the command line tools are
31378      # then we can't run xcodebuild. On these systems we should
31379      # default to clang
31380      DEFAULT_TOOLCHAIN="clang"
31381    fi
31382  else
31383    # First toolchain type in the list is the default
31384    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31385  fi
31386
31387  if test "x$with_toolchain_type" = xlist; then
31388    # List all toolchains
31389    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31390$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31391    for toolchain in $VALID_TOOLCHAINS; do
31392      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31393      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31394      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31395    done
31396
31397    exit 0
31398  elif test "x$with_toolchain_type" != x; then
31399    # User override; check that it is valid
31400    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31401      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31402$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31403      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31404$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31405      as_fn_error $? "Cannot continue." "$LINENO" 5
31406    fi
31407    TOOLCHAIN_TYPE=$with_toolchain_type
31408  else
31409    # No flag given, use default
31410    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31411  fi
31412
31413
31414  TOOLCHAIN_CC_BINARY_clang="clang"
31415  TOOLCHAIN_CC_BINARY_gcc="gcc"
31416  TOOLCHAIN_CC_BINARY_microsoft="cl"
31417  TOOLCHAIN_CC_BINARY_solstudio="cc"
31418  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31419
31420  TOOLCHAIN_CXX_BINARY_clang="clang++"
31421  TOOLCHAIN_CXX_BINARY_gcc="g++"
31422  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31423  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31424  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31425
31426  # Use indirect variable referencing
31427  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31428  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31429  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31430  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31431  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31432  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31433  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31434  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31435
31436
31437  # Define filename patterns
31438  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31439    LIBRARY_PREFIX=
31440    SHARED_LIBRARY_SUFFIX='.dll'
31441    STATIC_LIBRARY_SUFFIX='.lib'
31442    SHARED_LIBRARY='$1.dll'
31443    STATIC_LIBRARY='$1.lib'
31444    OBJ_SUFFIX='.obj'
31445    EXE_SUFFIX='.exe'
31446  else
31447    LIBRARY_PREFIX=lib
31448    SHARED_LIBRARY_SUFFIX='.so'
31449    STATIC_LIBRARY_SUFFIX='.a'
31450    SHARED_LIBRARY='lib$1.so'
31451    STATIC_LIBRARY='lib$1.a'
31452    OBJ_SUFFIX='.o'
31453    EXE_SUFFIX=''
31454    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31455      # For full static builds, we're overloading the SHARED_LIBRARY
31456      # variables in order to limit the amount of changes required.
31457      # It would be better to remove SHARED and just use LIBRARY and
31458      # LIBRARY_SUFFIX for libraries that can be built either
31459      # shared or static and use STATIC_* for libraries that are
31460      # always built statically.
31461      if test "x$STATIC_BUILD" = xtrue; then
31462        SHARED_LIBRARY='lib$1.a'
31463        SHARED_LIBRARY_SUFFIX='.a'
31464      else
31465        SHARED_LIBRARY='lib$1.dylib'
31466        SHARED_LIBRARY_SUFFIX='.dylib'
31467      fi
31468    fi
31469  fi
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31481    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31482$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31483  else
31484    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31485$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31486  fi
31487
31488
31489# User supplied flags should be used when configure detects compilers
31490
31491  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31493$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31494  fi
31495
31496  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31497    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31498$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31499  fi
31500
31501  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31502    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31503$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31504  fi
31505
31506
31507# Check whether --with-extra-cflags was given.
31508if test "${with_extra_cflags+set}" = set; then :
31509  withval=$with_extra_cflags;
31510fi
31511
31512
31513
31514# Check whether --with-extra-cxxflags was given.
31515if test "${with_extra_cxxflags+set}" = set; then :
31516  withval=$with_extra_cxxflags;
31517fi
31518
31519
31520
31521# Check whether --with-extra-ldflags was given.
31522if test "${with_extra_ldflags+set}" = set; then :
31523  withval=$with_extra_ldflags;
31524fi
31525
31526
31527  EXTRA_CFLAGS="$with_extra_cflags"
31528  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31529  EXTRA_LDFLAGS="$with_extra_ldflags"
31530
31531
31532
31533
31534
31535  # The global CFLAGS and LDLAGS variables are used by configure tests and
31536  # should include the extra parameters
31537  CFLAGS="$EXTRA_CFLAGS"
31538  CXXFLAGS="$EXTRA_CXXFLAGS"
31539  LDFLAGS="$EXTRA_LDFLAGS"
31540  CPPFLAGS=""
31541
31542# The sysroot cflags are needed for configure to be able to run the compilers
31543
31544  if test "x$SYSROOT" != "x"; then
31545    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31546      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31547        # Solaris Studio does not have a concept of sysroot. Instead we must
31548        # make sure the default include and lib dirs are appended to each
31549        # compile and link command line. Must also add -I-xbuiltin to enable
31550        # inlining of system functions and intrinsics.
31551        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31552        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31553            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31554      fi
31555    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31556      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31557      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31558    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31559      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31560      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31561    fi
31562    # The global CFLAGS and LDFLAGS variables need these for configure to function
31563    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31564    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31565    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31566    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31567  fi
31568
31569  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31570    # We also need -iframework<path>/System/Library/Frameworks
31571    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31572    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31573    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31574    # set this here so it doesn't have to be peppered throughout the forest
31575    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31576    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31577  fi
31578
31579
31580
31581
31582
31583# Then detect the actual binaries needed
31584
31585  # FIXME: Is this needed?
31586  ac_ext=cpp
31587ac_cpp='$CXXCPP $CPPFLAGS'
31588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31591
31592
31593  # Store the CFLAGS etc passed to the configure script.
31594  ORG_CFLAGS="$CFLAGS"
31595  ORG_CXXFLAGS="$CXXFLAGS"
31596
31597  # autoconf magic only relies on PATH, so update it if tools dir is specified
31598  OLD_PATH="$PATH"
31599
31600  # On Windows, we need to detect the visual studio installation first.
31601  # This will change the PATH, but we need to keep that new PATH even
31602  # after toolchain detection is done, since the compiler (on x86) uses
31603  # it for DLL resolution in runtime.
31604  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31605      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31606
31607  # Store path to cygwin link.exe to help excluding it when searching for
31608  # VS linker. This must be done before changing the PATH when looking for VS.
31609  # Extract the first word of "link", so it can be a program name with args.
31610set dummy link; ac_word=$2
31611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31612$as_echo_n "checking for $ac_word... " >&6; }
31613if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31614  $as_echo_n "(cached) " >&6
31615else
31616  case $CYGWIN_LINK in
31617  [\\/]* | ?:[\\/]*)
31618  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31619  ;;
31620  *)
31621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31622for as_dir in $PATH
31623do
31624  IFS=$as_save_IFS
31625  test -z "$as_dir" && as_dir=.
31626    for ac_exec_ext in '' $ac_executable_extensions; do
31627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31628    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31630    break 2
31631  fi
31632done
31633  done
31634IFS=$as_save_IFS
31635
31636  ;;
31637esac
31638fi
31639CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31640if test -n "$CYGWIN_LINK"; then
31641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31642$as_echo "$CYGWIN_LINK" >&6; }
31643else
31644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31645$as_echo "no" >&6; }
31646fi
31647
31648
31649  if test "x$CYGWIN_LINK" != x; then
31650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31651$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31652    "$CYGWIN_LINK" --version > /dev/null
31653    if test $? -eq 0 ; then
31654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31655$as_echo "yes" >&6; }
31656    else
31657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31658$as_echo "no" >&6; }
31659      # This might be the VS linker. Don't exclude it later on.
31660      CYGWIN_LINK=""
31661    fi
31662  fi
31663
31664  # First-hand choice is to locate and run the vsvars bat file.
31665
31666
31667# Check whether --with-toolchain-version was given.
31668if test "${with_toolchain_version+set}" = set; then :
31669  withval=$with_toolchain_version;
31670fi
31671
31672
31673  if test "x$with_toolchain_version" = xlist; then
31674    # List all toolchains
31675    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31676$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31677    for version in $VALID_VS_VERSIONS; do
31678      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31679      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31680    done
31681
31682    exit 0
31683  elif test "x$DEVKIT_VS_VERSION" != x; then
31684    VS_VERSION=$DEVKIT_VS_VERSION
31685    TOOLCHAIN_VERSION=$VS_VERSION
31686    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31687    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31688    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31689    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31690    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31691    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31692
31693    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31694    # can still be exported as INCLUDE for compiler invocations without
31695    # SYSROOT_CFLAGS
31696    OLDIFS="$IFS"
31697    IFS=";"
31698    for i in $DEVKIT_VS_INCLUDE; do
31699      ipath=$i
31700
31701  unix_path="$ipath"
31702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31703    windows_path=`$CYGPATH -m "$unix_path"`
31704    ipath="$windows_path"
31705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31706    windows_path=`cmd //c echo $unix_path`
31707    ipath="$windows_path"
31708  fi
31709
31710      VS_INCLUDE="$VS_INCLUDE;$ipath"
31711    done
31712    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31713    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31714    for i in $DEVKIT_VS_LIB; do
31715      libpath=$i
31716
31717  unix_path="$libpath"
31718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31719    windows_path=`$CYGPATH -m "$unix_path"`
31720    libpath="$windows_path"
31721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31722    windows_path=`cmd //c echo $unix_path`
31723    libpath="$windows_path"
31724  fi
31725
31726      VS_LIB="$VS_LIB;$libpath"
31727    done
31728    IFS="$OLDIFS"
31729
31730    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31731$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31732
31733  elif test "x$with_toolchain_version" != x; then
31734    # User override; check that it is valid
31735    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31736      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31737$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31738      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31739$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31740      as_fn_error $? "Cannot continue." "$LINENO" 5
31741    fi
31742    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31743  else
31744    # No flag given, use default
31745    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31746  fi
31747
31748  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31749
31750  VS_VERSION="$VS_VERSION"
31751  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31752  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31753  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31754  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31755
31756  # When using --with-tools-dir, assume it points to the correct and default
31757  # version of Visual Studio or that --with-toolchain-version was also set.
31758  if test "x$with_tools_dir" != x; then
31759
31760  if test "x$VS_ENV_CMD" = x; then
31761    VS_VERSION="${VS_VERSION}"
31762    VS_BASE="$with_tools_dir/../.."
31763    METHOD="--with-tools-dir"
31764
31765    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31766      VCVARSFILE="vc/bin/vcvars32.bat"
31767    else
31768      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31769    fi
31770
31771
31772  windows_path="$VS_BASE"
31773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31774    unix_path=`$CYGPATH -u "$windows_path"`
31775    VS_BASE="$unix_path"
31776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31778    VS_BASE="$unix_path"
31779  fi
31780
31781    if test -d "$VS_BASE"; then
31782      if test -f "$VS_BASE/$VCVARSFILE"; then
31783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31784$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31785        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31786        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31787        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31788        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31789      else
31790        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31791$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31792        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31793$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31794      fi
31795    fi
31796  fi
31797
31798
31799  if test "x$VS_ENV_CMD" = x; then
31800    VS_VERSION="${VS_VERSION}"
31801    VS_BASE="$with_tools_dir/../../.."
31802    METHOD="--with-tools-dir"
31803
31804    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31805      VCVARSFILE="vc/bin/vcvars32.bat"
31806    else
31807      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31808    fi
31809
31810
31811  windows_path="$VS_BASE"
31812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31813    unix_path=`$CYGPATH -u "$windows_path"`
31814    VS_BASE="$unix_path"
31815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31817    VS_BASE="$unix_path"
31818  fi
31819
31820    if test -d "$VS_BASE"; then
31821      if test -f "$VS_BASE/$VCVARSFILE"; then
31822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31823$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31824        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31825        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31826        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31827        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31828      else
31829        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31830$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31831        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31832$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31833      fi
31834    fi
31835  fi
31836
31837    if test "x$VS_ENV_CMD" = x; then
31838      # Having specified an argument which is incorrect will produce an instant failure;
31839      # we should not go on looking
31840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31841$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31842      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31843$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31844      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31845$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31846      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31847    fi
31848  fi
31849
31850  VS_ENV_CMD=""
31851  VS_ENV_ARGS=""
31852
31853  if test "x$VS_COMNTOOLS" != x; then
31854
31855  if test "x$VS_ENV_CMD" = x; then
31856    VS_VERSION="${VS_VERSION}"
31857    VS_BASE="$VS_COMNTOOLS/../.."
31858    METHOD="$VS_COMNTOOLS_VAR variable"
31859
31860    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31861      VCVARSFILE="vc/bin/vcvars32.bat"
31862    else
31863      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31864    fi
31865
31866
31867  windows_path="$VS_BASE"
31868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31869    unix_path=`$CYGPATH -u "$windows_path"`
31870    VS_BASE="$unix_path"
31871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31873    VS_BASE="$unix_path"
31874  fi
31875
31876    if test -d "$VS_BASE"; then
31877      if test -f "$VS_BASE/$VCVARSFILE"; then
31878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31879$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31880        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31881        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31882        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31883        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31884      else
31885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31886$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31888$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31889      fi
31890    fi
31891  fi
31892
31893  fi
31894  if test "x$PROGRAMFILES" != x; then
31895
31896  if test "x$VS_ENV_CMD" = x; then
31897    VS_VERSION="${VS_VERSION}"
31898    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31899    METHOD="well-known name"
31900
31901    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31902      VCVARSFILE="vc/bin/vcvars32.bat"
31903    else
31904      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31905    fi
31906
31907
31908  windows_path="$VS_BASE"
31909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31910    unix_path=`$CYGPATH -u "$windows_path"`
31911    VS_BASE="$unix_path"
31912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31914    VS_BASE="$unix_path"
31915  fi
31916
31917    if test -d "$VS_BASE"; then
31918      if test -f "$VS_BASE/$VCVARSFILE"; then
31919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31920$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31921        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31922        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31923        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31924        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31925      else
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31927$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31929$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31930      fi
31931    fi
31932  fi
31933
31934  fi
31935  # Work around the insanely named ProgramFiles(x86) env variable
31936  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31937  if test "x$PROGRAMFILES_X86" != x; then
31938
31939  if test "x$VS_ENV_CMD" = x; then
31940    VS_VERSION="${VS_VERSION}"
31941    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31942    METHOD="well-known name"
31943
31944    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31945      VCVARSFILE="vc/bin/vcvars32.bat"
31946    else
31947      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31948    fi
31949
31950
31951  windows_path="$VS_BASE"
31952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31953    unix_path=`$CYGPATH -u "$windows_path"`
31954    VS_BASE="$unix_path"
31955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31957    VS_BASE="$unix_path"
31958  fi
31959
31960    if test -d "$VS_BASE"; then
31961      if test -f "$VS_BASE/$VCVARSFILE"; then
31962        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31963$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31964        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31965        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31966        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31967        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31968      else
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31970$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31971        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31972$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31973      fi
31974    fi
31975  fi
31976
31977  fi
31978
31979  if test "x$VS_ENV_CMD" = x; then
31980    VS_VERSION="${VS_VERSION}"
31981    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31982    METHOD="well-known name"
31983
31984    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31985      VCVARSFILE="vc/bin/vcvars32.bat"
31986    else
31987      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31988    fi
31989
31990
31991  windows_path="$VS_BASE"
31992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31993    unix_path=`$CYGPATH -u "$windows_path"`
31994    VS_BASE="$unix_path"
31995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31997    VS_BASE="$unix_path"
31998  fi
31999
32000    if test -d "$VS_BASE"; then
32001      if test -f "$VS_BASE/$VCVARSFILE"; then
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32003$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32004        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32005        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32006        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32007        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32008      else
32009        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32010$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32011        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32012$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32013      fi
32014    fi
32015  fi
32016
32017
32018  if test "x$VS_ENV_CMD" = x; then
32019    VS_VERSION="${VS_VERSION}"
32020    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32021    METHOD="well-known name"
32022
32023    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32024      VCVARSFILE="vc/bin/vcvars32.bat"
32025    else
32026      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32027    fi
32028
32029
32030  windows_path="$VS_BASE"
32031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32032    unix_path=`$CYGPATH -u "$windows_path"`
32033    VS_BASE="$unix_path"
32034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32036    VS_BASE="$unix_path"
32037  fi
32038
32039    if test -d "$VS_BASE"; then
32040      if test -f "$VS_BASE/$VCVARSFILE"; then
32041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32042$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32043        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32044        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32045        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32046        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32047      else
32048        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32049$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32051$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32052      fi
32053    fi
32054  fi
32055
32056
32057  if test "x$SDK_INSTALL_DIR" != x; then
32058    if test "x$ProgramW6432" != x; then
32059
32060  if test "x$VS_ENV_CMD" = x; then
32061    VS_VERSION="${VS_VERSION}"
32062    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32063    METHOD="well-known name"
32064
32065  windows_path="$WIN_SDK_BASE"
32066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32067    unix_path=`$CYGPATH -u "$windows_path"`
32068    WIN_SDK_BASE="$unix_path"
32069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32071    WIN_SDK_BASE="$unix_path"
32072  fi
32073
32074    if test -d "$WIN_SDK_BASE"; then
32075      # There have been cases of partial or broken SDK installations. A missing
32076      # lib dir is not going to work.
32077      if test ! -d "$WIN_SDK_BASE/lib"; then
32078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32079$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32081$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32082      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32083        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32084$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32085        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32086        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32087          VS_ENV_ARGS="/x86"
32088        else
32089          VS_ENV_ARGS="/x64"
32090        fi
32091        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32092        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32093        # TODO: improve detection for other versions of SDK
32094        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32095      else
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32097$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32098        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32099$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32100      fi
32101    fi
32102  fi
32103
32104    fi
32105    if test "x$PROGRAMW6432" != x; then
32106
32107  if test "x$VS_ENV_CMD" = x; then
32108    VS_VERSION="${VS_VERSION}"
32109    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32110    METHOD="well-known name"
32111
32112  windows_path="$WIN_SDK_BASE"
32113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32114    unix_path=`$CYGPATH -u "$windows_path"`
32115    WIN_SDK_BASE="$unix_path"
32116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32118    WIN_SDK_BASE="$unix_path"
32119  fi
32120
32121    if test -d "$WIN_SDK_BASE"; then
32122      # There have been cases of partial or broken SDK installations. A missing
32123      # lib dir is not going to work.
32124      if test ! -d "$WIN_SDK_BASE/lib"; then
32125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32128$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32129      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32132        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32133        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32134          VS_ENV_ARGS="/x86"
32135        else
32136          VS_ENV_ARGS="/x64"
32137        fi
32138        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32139        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32140        # TODO: improve detection for other versions of SDK
32141        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32142      else
32143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32146$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32147      fi
32148    fi
32149  fi
32150
32151    fi
32152    if test "x$PROGRAMFILES" != x; then
32153
32154  if test "x$VS_ENV_CMD" = x; then
32155    VS_VERSION="${VS_VERSION}"
32156    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32157    METHOD="well-known name"
32158
32159  windows_path="$WIN_SDK_BASE"
32160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32161    unix_path=`$CYGPATH -u "$windows_path"`
32162    WIN_SDK_BASE="$unix_path"
32163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32165    WIN_SDK_BASE="$unix_path"
32166  fi
32167
32168    if test -d "$WIN_SDK_BASE"; then
32169      # There have been cases of partial or broken SDK installations. A missing
32170      # lib dir is not going to work.
32171      if test ! -d "$WIN_SDK_BASE/lib"; then
32172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32174        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32175$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32176      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32177        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32178$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32179        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32180        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32181          VS_ENV_ARGS="/x86"
32182        else
32183          VS_ENV_ARGS="/x64"
32184        fi
32185        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32186        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32187        # TODO: improve detection for other versions of SDK
32188        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32189      else
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32191$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32192        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32193$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32194      fi
32195    fi
32196  fi
32197
32198    fi
32199
32200  if test "x$VS_ENV_CMD" = x; then
32201    VS_VERSION="${VS_VERSION}"
32202    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32203    METHOD="well-known name"
32204
32205  windows_path="$WIN_SDK_BASE"
32206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32207    unix_path=`$CYGPATH -u "$windows_path"`
32208    WIN_SDK_BASE="$unix_path"
32209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32211    WIN_SDK_BASE="$unix_path"
32212  fi
32213
32214    if test -d "$WIN_SDK_BASE"; then
32215      # There have been cases of partial or broken SDK installations. A missing
32216      # lib dir is not going to work.
32217      if test ! -d "$WIN_SDK_BASE/lib"; then
32218        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32219$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32220        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32221$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32222      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32224$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32225        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32226        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32227          VS_ENV_ARGS="/x86"
32228        else
32229          VS_ENV_ARGS="/x64"
32230        fi
32231        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32232        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32233        # TODO: improve detection for other versions of SDK
32234        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32235      else
32236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32237$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32238        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32239$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32240      fi
32241    fi
32242  fi
32243
32244
32245  if test "x$VS_ENV_CMD" = x; then
32246    VS_VERSION="${VS_VERSION}"
32247    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32248    METHOD="well-known name"
32249
32250  windows_path="$WIN_SDK_BASE"
32251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32252    unix_path=`$CYGPATH -u "$windows_path"`
32253    WIN_SDK_BASE="$unix_path"
32254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32256    WIN_SDK_BASE="$unix_path"
32257  fi
32258
32259    if test -d "$WIN_SDK_BASE"; then
32260      # There have been cases of partial or broken SDK installations. A missing
32261      # lib dir is not going to work.
32262      if test ! -d "$WIN_SDK_BASE/lib"; then
32263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32265        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32266$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32267      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32268        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32269$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32270        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32271        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32272          VS_ENV_ARGS="/x86"
32273        else
32274          VS_ENV_ARGS="/x64"
32275        fi
32276        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32277        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32278        # TODO: improve detection for other versions of SDK
32279        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32280      else
32281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32282$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32284$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32285      fi
32286    fi
32287  fi
32288
32289  fi
32290
32291    if test "x$VS_ENV_CMD" != x; then
32292      TOOLCHAIN_VERSION=$VS_VERSION
32293      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32294      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32295      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32296      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32297      # The rest of the variables are already evaled while probing
32298      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32299$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32300      break
32301    fi
32302  done
32303
32304
32305  # If we have a devkit, skip all of the below.
32306  if test "x$DEVKIT_VS_VERSION" = x; then
32307    if test "x$VS_ENV_CMD" != x; then
32308      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32309
32310  # Only process if variable expands to non-empty
32311
32312  if test "x$VS_ENV_CMD" != x; then
32313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32314
32315  # First separate the path from the arguments. This will split at the first
32316  # space.
32317  complete="$VS_ENV_CMD"
32318  path="${complete%% *}"
32319  tmp="$complete EOL"
32320  arguments="${tmp#* }"
32321
32322  # Input might be given as Windows format, start by converting to
32323  # unix format.
32324  new_path=`$CYGPATH -u "$path"`
32325
32326  # Now try to locate executable using which
32327  new_path=`$WHICH "$new_path" 2> /dev/null`
32328  # bat and cmd files are not always considered executable in cygwin causing which
32329  # to not find them
32330  if test "x$new_path" = x \
32331      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32332      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32333    new_path=`$CYGPATH -u "$path"`
32334  fi
32335  if test "x$new_path" = x; then
32336    # Oops. Which didn't find the executable.
32337    # The splitting of arguments from the executable at a space might have been incorrect,
32338    # since paths with space are more likely in Windows. Give it another try with the whole
32339    # argument.
32340    path="$complete"
32341    arguments="EOL"
32342    new_path=`$CYGPATH -u "$path"`
32343    new_path=`$WHICH "$new_path" 2> /dev/null`
32344    # bat and cmd files are not always considered executable in cygwin causing which
32345    # to not find them
32346    if test "x$new_path" = x \
32347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32349      new_path=`$CYGPATH -u "$path"`
32350    fi
32351    if test "x$new_path" = x; then
32352      # It's still not found. Now this is an unrecoverable error.
32353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32354$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32355      has_space=`$ECHO "$complete" | $GREP " "`
32356      if test "x$has_space" != x; then
32357        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32358$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32359      fi
32360      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32361    fi
32362  fi
32363
32364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32367  # "foo.exe" is OK but "foo" is an error.
32368  #
32369  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32370  # It is also a way to make sure we got the proper file name for the real test later on.
32371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32372  if test "x$test_shortpath" = x; then
32373    # Short path failed, file does not exist as specified.
32374    # Try adding .exe or .cmd
32375    if test -f "${new_path}.exe"; then
32376      input_to_shortpath="${new_path}.exe"
32377    elif test -f "${new_path}.cmd"; then
32378      input_to_shortpath="${new_path}.cmd"
32379    else
32380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32381$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32382      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32383$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32384      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32385    fi
32386  else
32387    input_to_shortpath="$new_path"
32388  fi
32389
32390  # Call helper function which possibly converts this using DOS-style short mode.
32391  # If so, the updated path is stored in $new_path.
32392  new_path="$input_to_shortpath"
32393
32394  input_path="$input_to_shortpath"
32395  # Check if we need to convert this using DOS-style short mode. If the path
32396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32397  # take no chances and rewrite it.
32398  # Note: m4 eats our [], so we need to use [ and ] instead.
32399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32400  if test "x$has_forbidden_chars" != x; then
32401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32405      # Going to short mode and back again did indeed matter. Since short mode is
32406      # case insensitive, let's make it lowercase to improve readability.
32407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32408      # Now convert it back to Unix-style (cygpath)
32409      input_path=`$CYGPATH -u "$shortmode_path"`
32410      new_path="$input_path"
32411    fi
32412  fi
32413
32414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32415  if test "x$test_cygdrive_prefix" = x; then
32416    # As a simple fix, exclude /usr/bin since it's not a real path.
32417    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32419      # a path prefixed by /cygdrive for fixpath to work.
32420      new_path="$CYGWIN_ROOT_PATH$input_path"
32421    fi
32422  fi
32423
32424  # remove trailing .exe if any
32425  new_path="${new_path/%.exe/}"
32426
32427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32428
32429  # First separate the path from the arguments. This will split at the first
32430  # space.
32431  complete="$VS_ENV_CMD"
32432  path="${complete%% *}"
32433  tmp="$complete EOL"
32434  arguments="${tmp#* }"
32435
32436  # Input might be given as Windows format, start by converting to
32437  # unix format.
32438  new_path="$path"
32439
32440  windows_path="$new_path"
32441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32442    unix_path=`$CYGPATH -u "$windows_path"`
32443    new_path="$unix_path"
32444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32446    new_path="$unix_path"
32447  fi
32448
32449
32450  # Now try to locate executable using which
32451  new_path=`$WHICH "$new_path" 2> /dev/null`
32452
32453  if test "x$new_path" = x; then
32454    # Oops. Which didn't find the executable.
32455    # The splitting of arguments from the executable at a space might have been incorrect,
32456    # since paths with space are more likely in Windows. Give it another try with the whole
32457    # argument.
32458    path="$complete"
32459    arguments="EOL"
32460    new_path="$path"
32461
32462  windows_path="$new_path"
32463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32464    unix_path=`$CYGPATH -u "$windows_path"`
32465    new_path="$unix_path"
32466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32468    new_path="$unix_path"
32469  fi
32470
32471
32472    new_path=`$WHICH "$new_path" 2> /dev/null`
32473    # bat and cmd files are not always considered executable in MSYS causing which
32474    # to not find them
32475    if test "x$new_path" = x \
32476        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32477        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32478      new_path="$path"
32479
32480  windows_path="$new_path"
32481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32482    unix_path=`$CYGPATH -u "$windows_path"`
32483    new_path="$unix_path"
32484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32486    new_path="$unix_path"
32487  fi
32488
32489    fi
32490
32491    if test "x$new_path" = x; then
32492      # It's still not found. Now this is an unrecoverable error.
32493      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32494$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32495      has_space=`$ECHO "$complete" | $GREP " "`
32496      if test "x$has_space" != x; then
32497        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32498$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32499      fi
32500      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32501    fi
32502  fi
32503
32504  # Now new_path has a complete unix path to the binary
32505  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32506    # Keep paths in /bin as-is, but remove trailing .exe if any
32507    new_path="${new_path/%.exe/}"
32508    # Do not save /bin paths to all_fixpath_prefixes!
32509  else
32510    # Not in mixed or Windows style, start by that.
32511    new_path=`cmd //c echo $new_path`
32512
32513  input_path="$new_path"
32514  # Check if we need to convert this using DOS-style short mode. If the path
32515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32516  # take no chances and rewrite it.
32517  # Note: m4 eats our [], so we need to use [ and ] instead.
32518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32519  if test "x$has_forbidden_chars" != x; then
32520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32522  fi
32523
32524    # Output is in $new_path
32525
32526  windows_path="$new_path"
32527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32528    unix_path=`$CYGPATH -u "$windows_path"`
32529    new_path="$unix_path"
32530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32532    new_path="$unix_path"
32533  fi
32534
32535    # remove trailing .exe if any
32536    new_path="${new_path/%.exe/}"
32537
32538    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32539    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32540  fi
32541
32542    else
32543      # We're on a unix platform. Hooray! :)
32544      # First separate the path from the arguments. This will split at the first
32545      # space.
32546      complete="$VS_ENV_CMD"
32547      path="${complete%% *}"
32548      tmp="$complete EOL"
32549      arguments="${tmp#* }"
32550
32551      # Cannot rely on the command "which" here since it doesn't always work.
32552      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32553      if test -z "$is_absolute_path"; then
32554        # Path to executable is not absolute. Find it.
32555        IFS_save="$IFS"
32556        IFS=:
32557        for p in $PATH; do
32558          if test -f "$p/$path" && test -x "$p/$path"; then
32559            new_path="$p/$path"
32560            break
32561          fi
32562        done
32563        IFS="$IFS_save"
32564      else
32565        # This is an absolute path, we can use it without further modifications.
32566        new_path="$path"
32567      fi
32568
32569      if test "x$new_path" = x; then
32570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32571$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32572        has_space=`$ECHO "$complete" | $GREP " "`
32573        if test "x$has_space" != x; then
32574          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32575$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32576        fi
32577        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32578      fi
32579    fi
32580
32581    # Now join together the path and the arguments once again
32582    if test "x$arguments" != xEOL; then
32583      new_complete="$new_path ${arguments% *}"
32584    else
32585      new_complete="$new_path"
32586    fi
32587
32588    if test "x$complete" != "x$new_complete"; then
32589      VS_ENV_CMD="$new_complete"
32590      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32591$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32592    fi
32593  fi
32594
32595
32596      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32597      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32598$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32599
32600      # We need to create a couple of temporary files.
32601      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32602      $MKDIR -p $VS_ENV_TMP_DIR
32603
32604      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32605      # Instead create a shell script which will set the relevant variables when run.
32606      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32607
32608  unix_path="$WINPATH_VS_ENV_CMD"
32609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32610    windows_path=`$CYGPATH -m "$unix_path"`
32611    WINPATH_VS_ENV_CMD="$windows_path"
32612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32613    windows_path=`cmd //c echo $unix_path`
32614    WINPATH_VS_ENV_CMD="$windows_path"
32615  fi
32616
32617      WINPATH_BASH="$BASH"
32618
32619  unix_path="$WINPATH_BASH"
32620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32621    windows_path=`$CYGPATH -m "$unix_path"`
32622    WINPATH_BASH="$windows_path"
32623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32624    windows_path=`cmd //c echo $unix_path`
32625    WINPATH_BASH="$windows_path"
32626  fi
32627
32628
32629      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32630      # script (executable by bash) that will setup the important variables.
32631      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32632      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32633      # This will end up something like:
32634      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32635      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32636      # These will end up something like:
32637      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32638      # The trailing space for everyone except PATH is no typo, but is needed due
32639      # to trailing \ in the Windows paths. These will be stripped later.
32640      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32641          >> $EXTRACT_VC_ENV_BAT_FILE
32642      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32643          >> $EXTRACT_VC_ENV_BAT_FILE
32644      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32645          >> $EXTRACT_VC_ENV_BAT_FILE
32646      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32647          >> $EXTRACT_VC_ENV_BAT_FILE
32648      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32649          >> $EXTRACT_VC_ENV_BAT_FILE
32650      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32651          >> $EXTRACT_VC_ENV_BAT_FILE
32652
32653      # Now execute the newly created bat file.
32654      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32655      # Change directory so we don't need to mess with Windows paths in redirects.
32656      cd $VS_ENV_TMP_DIR
32657      cmd /c extract-vs-env.bat | $CAT
32658      cd $CURDIR
32659
32660      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32661        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32662$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32663        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32664$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32666$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32667        as_fn_error $? "Cannot continue" "$LINENO" 5
32668      fi
32669
32670      # Now set all paths and other env variables. This will allow the rest of
32671      # the configure script to find and run the compiler in the proper way.
32672      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32673$as_echo "$as_me: Setting extracted environment variables" >&6;}
32674      . $VS_ENV_TMP_DIR/set-vs-env.sh
32675      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32676      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32677    else
32678      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32679      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32680$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32681    fi
32682  fi
32683
32684  # At this point, we should have correct variables in the environment, or we can't continue.
32685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32686$as_echo_n "checking for Visual Studio variables... " >&6; }
32687
32688  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32689      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32690    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32692$as_echo "present but broken" >&6; }
32693      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32694    else
32695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32696$as_echo "ok" >&6; }
32697      # Remove any trailing "\" ";" and " " from the variables.
32698      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32699      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32700      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32701      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32702      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32703      # Remove any paths containing # (typically F#) as that messes up make. This
32704      # is needed if visual studio was installed with F# support.
32705      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32706
32707
32708
32709
32710
32711      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32712      OLDIFS="$IFS"
32713      IFS=";"
32714      for i in $VS_INCLUDE; do
32715        ipath=$i
32716        # Only process non-empty elements
32717        if test "x$ipath" != x; then
32718          IFS="$OLDIFS"
32719          # Check that directory exists before calling fixup_path
32720          testpath=$ipath
32721
32722  windows_path="$testpath"
32723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32724    unix_path=`$CYGPATH -u "$windows_path"`
32725    testpath="$unix_path"
32726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32728    testpath="$unix_path"
32729  fi
32730
32731          if test -d "$testpath"; then
32732
32733  # Only process if variable expands to non-empty
32734
32735  if test "x$ipath" != x; then
32736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32737
32738  # Input might be given as Windows format, start by converting to
32739  # unix format.
32740  path="$ipath"
32741  new_path=`$CYGPATH -u "$path"`
32742
32743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32746  # "foo.exe" is OK but "foo" is an error.
32747  #
32748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32749  # It is also a way to make sure we got the proper file name for the real test later on.
32750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32751  if test "x$test_shortpath" = x; then
32752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32753$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32754    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32755  fi
32756
32757  # Call helper function which possibly converts this using DOS-style short mode.
32758  # If so, the updated path is stored in $new_path.
32759
32760  input_path="$new_path"
32761  # Check if we need to convert this using DOS-style short mode. If the path
32762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32763  # take no chances and rewrite it.
32764  # Note: m4 eats our [], so we need to use [ and ] instead.
32765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32766  if test "x$has_forbidden_chars" != x; then
32767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32771      # Going to short mode and back again did indeed matter. Since short mode is
32772      # case insensitive, let's make it lowercase to improve readability.
32773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32774      # Now convert it back to Unix-style (cygpath)
32775      input_path=`$CYGPATH -u "$shortmode_path"`
32776      new_path="$input_path"
32777    fi
32778  fi
32779
32780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32781  if test "x$test_cygdrive_prefix" = x; then
32782    # As a simple fix, exclude /usr/bin since it's not a real path.
32783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32785      # a path prefixed by /cygdrive for fixpath to work.
32786      new_path="$CYGWIN_ROOT_PATH$input_path"
32787    fi
32788  fi
32789
32790
32791  if test "x$path" != "x$new_path"; then
32792    ipath="$new_path"
32793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32794$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32795  fi
32796
32797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32798
32799  path="$ipath"
32800  has_colon=`$ECHO $path | $GREP ^.:`
32801  new_path="$path"
32802  if test "x$has_colon" = x; then
32803    # Not in mixed or Windows style, start by that.
32804    new_path=`cmd //c echo $path`
32805  fi
32806
32807
32808  input_path="$new_path"
32809  # Check if we need to convert this using DOS-style short mode. If the path
32810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32811  # take no chances and rewrite it.
32812  # Note: m4 eats our [], so we need to use [ and ] instead.
32813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32814  if test "x$has_forbidden_chars" != x; then
32815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32817  fi
32818
32819
32820  windows_path="$new_path"
32821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32822    unix_path=`$CYGPATH -u "$windows_path"`
32823    new_path="$unix_path"
32824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32826    new_path="$unix_path"
32827  fi
32828
32829  if test "x$path" != "x$new_path"; then
32830    ipath="$new_path"
32831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32832$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32833  fi
32834
32835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32837
32838    else
32839      # We're on a unix platform. Hooray! :)
32840      path="$ipath"
32841      has_space=`$ECHO "$path" | $GREP " "`
32842      if test "x$has_space" != x; then
32843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32844$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32846      fi
32847
32848      # Use eval to expand a potential ~
32849      eval path="$path"
32850      if test ! -f "$path" && test ! -d "$path"; then
32851        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32852      fi
32853
32854      if test -d "$path"; then
32855        ipath="`cd "$path"; $THEPWDCMD -L`"
32856      else
32857        dir="`$DIRNAME "$path"`"
32858        base="`$BASENAME "$path"`"
32859        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32860      fi
32861    fi
32862  fi
32863
32864            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32865          fi
32866          IFS=";"
32867        fi
32868      done
32869      # Convert VS_LIB into SYSROOT_LDFLAGS
32870      for i in $VS_LIB; do
32871        libpath=$i
32872        # Only process non-empty elements
32873        if test "x$libpath" != x; then
32874          IFS="$OLDIFS"
32875          # Check that directory exists before calling fixup_path
32876          testpath=$libpath
32877
32878  windows_path="$testpath"
32879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32880    unix_path=`$CYGPATH -u "$windows_path"`
32881    testpath="$unix_path"
32882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32884    testpath="$unix_path"
32885  fi
32886
32887          if test -d "$testpath"; then
32888
32889  # Only process if variable expands to non-empty
32890
32891  if test "x$libpath" != x; then
32892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32893
32894  # Input might be given as Windows format, start by converting to
32895  # unix format.
32896  path="$libpath"
32897  new_path=`$CYGPATH -u "$path"`
32898
32899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32902  # "foo.exe" is OK but "foo" is an error.
32903  #
32904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32905  # It is also a way to make sure we got the proper file name for the real test later on.
32906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32907  if test "x$test_shortpath" = x; then
32908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32909$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32910    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32911  fi
32912
32913  # Call helper function which possibly converts this using DOS-style short mode.
32914  # If so, the updated path is stored in $new_path.
32915
32916  input_path="$new_path"
32917  # Check if we need to convert this using DOS-style short mode. If the path
32918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32919  # take no chances and rewrite it.
32920  # Note: m4 eats our [], so we need to use [ and ] instead.
32921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32922  if test "x$has_forbidden_chars" != x; then
32923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32927      # Going to short mode and back again did indeed matter. Since short mode is
32928      # case insensitive, let's make it lowercase to improve readability.
32929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32930      # Now convert it back to Unix-style (cygpath)
32931      input_path=`$CYGPATH -u "$shortmode_path"`
32932      new_path="$input_path"
32933    fi
32934  fi
32935
32936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32937  if test "x$test_cygdrive_prefix" = x; then
32938    # As a simple fix, exclude /usr/bin since it's not a real path.
32939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32941      # a path prefixed by /cygdrive for fixpath to work.
32942      new_path="$CYGWIN_ROOT_PATH$input_path"
32943    fi
32944  fi
32945
32946
32947  if test "x$path" != "x$new_path"; then
32948    libpath="$new_path"
32949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32950$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32951  fi
32952
32953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32954
32955  path="$libpath"
32956  has_colon=`$ECHO $path | $GREP ^.:`
32957  new_path="$path"
32958  if test "x$has_colon" = x; then
32959    # Not in mixed or Windows style, start by that.
32960    new_path=`cmd //c echo $path`
32961  fi
32962
32963
32964  input_path="$new_path"
32965  # Check if we need to convert this using DOS-style short mode. If the path
32966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32967  # take no chances and rewrite it.
32968  # Note: m4 eats our [], so we need to use [ and ] instead.
32969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32970  if test "x$has_forbidden_chars" != x; then
32971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32973  fi
32974
32975
32976  windows_path="$new_path"
32977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32978    unix_path=`$CYGPATH -u "$windows_path"`
32979    new_path="$unix_path"
32980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32982    new_path="$unix_path"
32983  fi
32984
32985  if test "x$path" != "x$new_path"; then
32986    libpath="$new_path"
32987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32988$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32989  fi
32990
32991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32993
32994    else
32995      # We're on a unix platform. Hooray! :)
32996      path="$libpath"
32997      has_space=`$ECHO "$path" | $GREP " "`
32998      if test "x$has_space" != x; then
32999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33000$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33002      fi
33003
33004      # Use eval to expand a potential ~
33005      eval path="$path"
33006      if test ! -f "$path" && test ! -d "$path"; then
33007        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33008      fi
33009
33010      if test -d "$path"; then
33011        libpath="`cd "$path"; $THEPWDCMD -L`"
33012      else
33013        dir="`$DIRNAME "$path"`"
33014        base="`$BASENAME "$path"`"
33015        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33016      fi
33017    fi
33018  fi
33019
33020            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33021          fi
33022          IFS=";"
33023        fi
33024      done
33025      IFS="$OLDIFS"
33026    fi
33027  else
33028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33029$as_echo "not found" >&6; }
33030
33031    if test "x$VS_ENV_CMD" = x; then
33032      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33033$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33034      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33035$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33036    else
33037      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33038$as_echo "$as_me: Running the extraction script failed." >&6;}
33039    fi
33040    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33041$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33042    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33043$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33044    as_fn_error $? "Cannot continue" "$LINENO" 5
33045  fi
33046
33047    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33048    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33049    PATH="$VS_PATH"
33050    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33051    export INCLUDE="$VS_INCLUDE"
33052    export LIB="$VS_LIB"
33053  else
33054    if test "x$XCODE_VERSION_OUTPUT" != x; then
33055      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33056      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33057      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33058    else
33059      # Currently we do not define this for other toolchains. This might change as the need arise.
33060      TOOLCHAIN_VERSION=
33061    fi
33062  fi
33063
33064
33065  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33066  # override all other locations.
33067  if test "x$TOOLCHAIN_PATH" != x; then
33068    PATH=$TOOLCHAIN_PATH:$PATH
33069  fi
33070
33071
33072  #
33073  # Setup the compilers (CC and CXX)
33074  #
33075
33076  COMPILER_NAME=C
33077  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33078
33079  if test "x$CC" != x; then
33080    # User has supplied compiler name already, always let that override.
33081    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33082$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33083    if test "x`basename $CC`" = "x$CC"; then
33084      # A command without a complete path is provided, search $PATH.
33085
33086      for ac_prog in $CC
33087do
33088  # Extract the first word of "$ac_prog", so it can be a program name with args.
33089set dummy $ac_prog; ac_word=$2
33090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33091$as_echo_n "checking for $ac_word... " >&6; }
33092if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33093  $as_echo_n "(cached) " >&6
33094else
33095  case $POTENTIAL_CC in
33096  [\\/]* | ?:[\\/]*)
33097  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33098  ;;
33099  *)
33100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33101for as_dir in $PATH
33102do
33103  IFS=$as_save_IFS
33104  test -z "$as_dir" && as_dir=.
33105    for ac_exec_ext in '' $ac_executable_extensions; do
33106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33107    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33109    break 2
33110  fi
33111done
33112  done
33113IFS=$as_save_IFS
33114
33115  ;;
33116esac
33117fi
33118POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33119if test -n "$POTENTIAL_CC"; then
33120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33121$as_echo "$POTENTIAL_CC" >&6; }
33122else
33123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33124$as_echo "no" >&6; }
33125fi
33126
33127
33128  test -n "$POTENTIAL_CC" && break
33129done
33130
33131      if test "x$POTENTIAL_CC" != x; then
33132        CC=$POTENTIAL_CC
33133      else
33134        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33135      fi
33136    else
33137      # Otherwise it might already be a complete path
33138      if test ! -x "$CC"; then
33139        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33140      fi
33141    fi
33142  else
33143    # No user supplied value. Locate compiler ourselves.
33144
33145    # If we are cross compiling, assume cross compilation tools follows the
33146    # cross compilation standard where they are prefixed with the autoconf
33147    # standard name for the target. For example the binary
33148    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33149    # If we are not cross compiling, then the default compiler name will be
33150    # used.
33151
33152    CC=
33153    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33154    # before checking the rest of the PATH.
33155    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33156    # step, this should not be necessary.
33157    if test -n "$TOOLCHAIN_PATH"; then
33158      PATH_save="$PATH"
33159      PATH="$TOOLCHAIN_PATH"
33160      for ac_prog in $SEARCH_LIST
33161do
33162  # Extract the first word of "$ac_prog", so it can be a program name with args.
33163set dummy $ac_prog; ac_word=$2
33164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33165$as_echo_n "checking for $ac_word... " >&6; }
33166if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33167  $as_echo_n "(cached) " >&6
33168else
33169  case $TOOLCHAIN_PATH_CC in
33170  [\\/]* | ?:[\\/]*)
33171  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33172  ;;
33173  *)
33174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33175for as_dir in $PATH
33176do
33177  IFS=$as_save_IFS
33178  test -z "$as_dir" && as_dir=.
33179    for ac_exec_ext in '' $ac_executable_extensions; do
33180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33181    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33183    break 2
33184  fi
33185done
33186  done
33187IFS=$as_save_IFS
33188
33189  ;;
33190esac
33191fi
33192TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33193if test -n "$TOOLCHAIN_PATH_CC"; then
33194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33195$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33196else
33197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33198$as_echo "no" >&6; }
33199fi
33200
33201
33202  test -n "$TOOLCHAIN_PATH_CC" && break
33203done
33204
33205      CC=$TOOLCHAIN_PATH_CC
33206      PATH="$PATH_save"
33207    fi
33208
33209    # AC_PATH_PROGS can't be run multiple times with the same variable,
33210    # so create a new name for this run.
33211    if test "x$CC" = x; then
33212      for ac_prog in $SEARCH_LIST
33213do
33214  # Extract the first word of "$ac_prog", so it can be a program name with args.
33215set dummy $ac_prog; ac_word=$2
33216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33217$as_echo_n "checking for $ac_word... " >&6; }
33218if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33219  $as_echo_n "(cached) " >&6
33220else
33221  case $POTENTIAL_CC in
33222  [\\/]* | ?:[\\/]*)
33223  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33224  ;;
33225  *)
33226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33227for as_dir in $PATH
33228do
33229  IFS=$as_save_IFS
33230  test -z "$as_dir" && as_dir=.
33231    for ac_exec_ext in '' $ac_executable_extensions; do
33232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33233    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33235    break 2
33236  fi
33237done
33238  done
33239IFS=$as_save_IFS
33240
33241  ;;
33242esac
33243fi
33244POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33245if test -n "$POTENTIAL_CC"; then
33246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33247$as_echo "$POTENTIAL_CC" >&6; }
33248else
33249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33250$as_echo "no" >&6; }
33251fi
33252
33253
33254  test -n "$POTENTIAL_CC" && break
33255done
33256
33257      CC=$POTENTIAL_CC
33258    fi
33259
33260    if test "x$CC" = x; then
33261
33262  # Print a helpful message on how to acquire the necessary build dependency.
33263  # devkit is the help tag: freetype, cups, alsa etc
33264  MISSING_DEPENDENCY=devkit
33265
33266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33267    cygwin_help $MISSING_DEPENDENCY
33268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33269    msys_help $MISSING_DEPENDENCY
33270  else
33271    PKGHANDLER_COMMAND=
33272
33273    case $PKGHANDLER in
33274      apt-get)
33275        apt_help     $MISSING_DEPENDENCY ;;
33276      yum)
33277        yum_help     $MISSING_DEPENDENCY ;;
33278      brew)
33279        brew_help    $MISSING_DEPENDENCY ;;
33280      port)
33281        port_help    $MISSING_DEPENDENCY ;;
33282      pkgutil)
33283        pkgutil_help $MISSING_DEPENDENCY ;;
33284      pkgadd)
33285        pkgadd_help  $MISSING_DEPENDENCY ;;
33286    esac
33287
33288    if test "x$PKGHANDLER_COMMAND" != x; then
33289      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33290    fi
33291  fi
33292
33293      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33294    fi
33295  fi
33296
33297  # Now we have a compiler binary in CC. Make sure it's okay.
33298
33299  # Only process if variable expands to non-empty
33300
33301  if test "x$CC" != x; then
33302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33303
33304  # First separate the path from the arguments. This will split at the first
33305  # space.
33306  complete="$CC"
33307  path="${complete%% *}"
33308  tmp="$complete EOL"
33309  arguments="${tmp#* }"
33310
33311  # Input might be given as Windows format, start by converting to
33312  # unix format.
33313  new_path=`$CYGPATH -u "$path"`
33314
33315  # Now try to locate executable using which
33316  new_path=`$WHICH "$new_path" 2> /dev/null`
33317  # bat and cmd files are not always considered executable in cygwin causing which
33318  # to not find them
33319  if test "x$new_path" = x \
33320      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33321      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33322    new_path=`$CYGPATH -u "$path"`
33323  fi
33324  if test "x$new_path" = x; then
33325    # Oops. Which didn't find the executable.
33326    # The splitting of arguments from the executable at a space might have been incorrect,
33327    # since paths with space are more likely in Windows. Give it another try with the whole
33328    # argument.
33329    path="$complete"
33330    arguments="EOL"
33331    new_path=`$CYGPATH -u "$path"`
33332    new_path=`$WHICH "$new_path" 2> /dev/null`
33333    # bat and cmd files are not always considered executable in cygwin causing which
33334    # to not find them
33335    if test "x$new_path" = x \
33336        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33337        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33338      new_path=`$CYGPATH -u "$path"`
33339    fi
33340    if test "x$new_path" = x; then
33341      # It's still not found. Now this is an unrecoverable error.
33342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33343$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33344      has_space=`$ECHO "$complete" | $GREP " "`
33345      if test "x$has_space" != x; then
33346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33348      fi
33349      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33350    fi
33351  fi
33352
33353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33356  # "foo.exe" is OK but "foo" is an error.
33357  #
33358  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33359  # It is also a way to make sure we got the proper file name for the real test later on.
33360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33361  if test "x$test_shortpath" = x; then
33362    # Short path failed, file does not exist as specified.
33363    # Try adding .exe or .cmd
33364    if test -f "${new_path}.exe"; then
33365      input_to_shortpath="${new_path}.exe"
33366    elif test -f "${new_path}.cmd"; then
33367      input_to_shortpath="${new_path}.cmd"
33368    else
33369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33370$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33373      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33374    fi
33375  else
33376    input_to_shortpath="$new_path"
33377  fi
33378
33379  # Call helper function which possibly converts this using DOS-style short mode.
33380  # If so, the updated path is stored in $new_path.
33381  new_path="$input_to_shortpath"
33382
33383  input_path="$input_to_shortpath"
33384  # Check if we need to convert this using DOS-style short mode. If the path
33385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33386  # take no chances and rewrite it.
33387  # Note: m4 eats our [], so we need to use [ and ] instead.
33388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33389  if test "x$has_forbidden_chars" != x; then
33390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33394      # Going to short mode and back again did indeed matter. Since short mode is
33395      # case insensitive, let's make it lowercase to improve readability.
33396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33397      # Now convert it back to Unix-style (cygpath)
33398      input_path=`$CYGPATH -u "$shortmode_path"`
33399      new_path="$input_path"
33400    fi
33401  fi
33402
33403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33404  if test "x$test_cygdrive_prefix" = x; then
33405    # As a simple fix, exclude /usr/bin since it's not a real path.
33406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33408      # a path prefixed by /cygdrive for fixpath to work.
33409      new_path="$CYGWIN_ROOT_PATH$input_path"
33410    fi
33411  fi
33412
33413  # remove trailing .exe if any
33414  new_path="${new_path/%.exe/}"
33415
33416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33417
33418  # First separate the path from the arguments. This will split at the first
33419  # space.
33420  complete="$CC"
33421  path="${complete%% *}"
33422  tmp="$complete EOL"
33423  arguments="${tmp#* }"
33424
33425  # Input might be given as Windows format, start by converting to
33426  # unix format.
33427  new_path="$path"
33428
33429  windows_path="$new_path"
33430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33431    unix_path=`$CYGPATH -u "$windows_path"`
33432    new_path="$unix_path"
33433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33435    new_path="$unix_path"
33436  fi
33437
33438
33439  # Now try to locate executable using which
33440  new_path=`$WHICH "$new_path" 2> /dev/null`
33441
33442  if test "x$new_path" = x; then
33443    # Oops. Which didn't find the executable.
33444    # The splitting of arguments from the executable at a space might have been incorrect,
33445    # since paths with space are more likely in Windows. Give it another try with the whole
33446    # argument.
33447    path="$complete"
33448    arguments="EOL"
33449    new_path="$path"
33450
33451  windows_path="$new_path"
33452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33453    unix_path=`$CYGPATH -u "$windows_path"`
33454    new_path="$unix_path"
33455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33457    new_path="$unix_path"
33458  fi
33459
33460
33461    new_path=`$WHICH "$new_path" 2> /dev/null`
33462    # bat and cmd files are not always considered executable in MSYS causing which
33463    # to not find them
33464    if test "x$new_path" = x \
33465        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33466        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33467      new_path="$path"
33468
33469  windows_path="$new_path"
33470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33471    unix_path=`$CYGPATH -u "$windows_path"`
33472    new_path="$unix_path"
33473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33475    new_path="$unix_path"
33476  fi
33477
33478    fi
33479
33480    if test "x$new_path" = x; then
33481      # It's still not found. Now this is an unrecoverable error.
33482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33483$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33484      has_space=`$ECHO "$complete" | $GREP " "`
33485      if test "x$has_space" != x; then
33486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33488      fi
33489      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33490    fi
33491  fi
33492
33493  # Now new_path has a complete unix path to the binary
33494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33495    # Keep paths in /bin as-is, but remove trailing .exe if any
33496    new_path="${new_path/%.exe/}"
33497    # Do not save /bin paths to all_fixpath_prefixes!
33498  else
33499    # Not in mixed or Windows style, start by that.
33500    new_path=`cmd //c echo $new_path`
33501
33502  input_path="$new_path"
33503  # Check if we need to convert this using DOS-style short mode. If the path
33504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33505  # take no chances and rewrite it.
33506  # Note: m4 eats our [], so we need to use [ and ] instead.
33507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33508  if test "x$has_forbidden_chars" != x; then
33509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33511  fi
33512
33513    # Output is in $new_path
33514
33515  windows_path="$new_path"
33516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33517    unix_path=`$CYGPATH -u "$windows_path"`
33518    new_path="$unix_path"
33519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33521    new_path="$unix_path"
33522  fi
33523
33524    # remove trailing .exe if any
33525    new_path="${new_path/%.exe/}"
33526
33527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33529  fi
33530
33531    else
33532      # We're on a unix platform. Hooray! :)
33533      # First separate the path from the arguments. This will split at the first
33534      # space.
33535      complete="$CC"
33536      path="${complete%% *}"
33537      tmp="$complete EOL"
33538      arguments="${tmp#* }"
33539
33540      # Cannot rely on the command "which" here since it doesn't always work.
33541      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33542      if test -z "$is_absolute_path"; then
33543        # Path to executable is not absolute. Find it.
33544        IFS_save="$IFS"
33545        IFS=:
33546        for p in $PATH; do
33547          if test -f "$p/$path" && test -x "$p/$path"; then
33548            new_path="$p/$path"
33549            break
33550          fi
33551        done
33552        IFS="$IFS_save"
33553      else
33554        # This is an absolute path, we can use it without further modifications.
33555        new_path="$path"
33556      fi
33557
33558      if test "x$new_path" = x; then
33559        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33560$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33561        has_space=`$ECHO "$complete" | $GREP " "`
33562        if test "x$has_space" != x; then
33563          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33564$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33565        fi
33566        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33567      fi
33568    fi
33569
33570    # Now join together the path and the arguments once again
33571    if test "x$arguments" != xEOL; then
33572      new_complete="$new_path ${arguments% *}"
33573    else
33574      new_complete="$new_path"
33575    fi
33576
33577    if test "x$complete" != "x$new_complete"; then
33578      CC="$new_complete"
33579      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33580$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33581    fi
33582  fi
33583
33584  TEST_COMPILER="$CC"
33585
33586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33587$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33588  SYMLINK_ORIGINAL="$TEST_COMPILER"
33589
33590  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33591    # Follow a chain of symbolic links. Use readlink
33592    # where it exists, else fall back to horribly
33593    # complicated shell code.
33594    if test "x$READLINK_TESTED" != yes; then
33595      # On MacOSX there is a readlink tool with a different
33596      # purpose than the GNU readlink tool. Check the found readlink.
33597      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33598      if test "x$ISGNU" = x; then
33599        # A readlink that we do not know how to use.
33600        # Are there other non-GNU readlinks out there?
33601        READLINK_TESTED=yes
33602        READLINK=
33603      fi
33604    fi
33605
33606    if test "x$READLINK" != x; then
33607      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33608    else
33609      # Save the current directory for restoring afterwards
33610      STARTDIR=$PWD
33611      COUNTER=0
33612      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33613      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33614      cd $sym_link_dir
33615      # Use -P flag to resolve symlinks in directories.
33616      cd `$THEPWDCMD -P`
33617      sym_link_dir=`$THEPWDCMD -P`
33618      # Resolve file symlinks
33619      while test $COUNTER -lt 20; do
33620        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33621        if test "x$ISLINK" == x; then
33622          # This is not a symbolic link! We are done!
33623          break
33624        fi
33625        # Again resolve directory symlinks since the target of the just found
33626        # link could be in a different directory
33627        cd `$DIRNAME $ISLINK`
33628        sym_link_dir=`$THEPWDCMD -P`
33629        sym_link_file=`$BASENAME $ISLINK`
33630        let COUNTER=COUNTER+1
33631      done
33632      cd $STARTDIR
33633      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33634    fi
33635  fi
33636
33637  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33639$as_echo "no symlink" >&6; }
33640  else
33641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33642$as_echo "$SYMLINK_ORIGINAL" >&6; }
33643
33644    # We can't handle ccache by gcc wrappers, since we need to know if we're
33645    # using ccache. Instead ccache usage must be controlled by a configure option.
33646    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33647    if test "x$COMPILER_BASENAME" = "xccache"; then
33648      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33649$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33650      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33651    fi
33652  fi
33653
33654
33655  COMPILER=$CC
33656  COMPILER_NAME=$COMPILER_NAME
33657
33658  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33659    # cc -V output typically looks like
33660    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33661    # or
33662    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33663    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33664    # Check that this is likely to be the Solaris Studio cc.
33665    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33666    if test $? -ne 0; then
33667      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33668      { $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
33669$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33670      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33671$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33672      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33673$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33674      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33675    fi
33676    # Remove usage instructions (if present), and
33677    # collapse compiler output into a single line
33678    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33679        $SED -e 's/ *[Uu]sage:.*//'`
33680    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33681        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33682  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33683    # xlc -qversion output typically looks like
33684    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33685    #     Version: 11.01.0000.0015
33686    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33687    # Check that this is likely to be the IBM XL C compiler.
33688    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33689    if test $? -ne 0; then
33690      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33691      { $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
33692$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33693      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33694$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33695      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33696$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33697      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33698    fi
33699    # Collapse compiler output into a single line
33700    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33701    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33702        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33703  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33704    # There is no specific version flag, but all output starts with a version string.
33705    # First line typically looks something like:
33706    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33707    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33708    # Check that this is likely to be Microsoft CL.EXE.
33709    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33710    if test $? -ne 0; then
33711      { $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
33712$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33713      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33714$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33715      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33716    fi
33717    # Collapse compiler output into a single line
33718    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33719    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33720        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33721  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33722    # gcc --version output typically looks like
33723    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33724    #     Copyright (C) 2013 Free Software Foundation, Inc.
33725    #     This is free software; see the source for copying conditions.  There is NO
33726    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33727    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33728    # Check that this is likely to be GCC.
33729    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33730    if test $? -ne 0; then
33731      { $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
33732$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33733      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33734$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33735      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33736    fi
33737    # Remove Copyright and legalese from version string, and
33738    # collapse into a single line
33739    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33740        $SED -e 's/ *Copyright .*//'`
33741    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33742        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33743  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33744    # clang --version output typically looks like
33745    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33746    #    clang version 3.3 (tags/RELEASE_33/final)
33747    # or
33748    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33749    #    Target: x86_64-pc-linux-gnu
33750    #    Thread model: posix
33751    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33752    # Check that this is likely to be clang
33753    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33754    if test $? -ne 0; then
33755      { $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
33756$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33757      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33758$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33759      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33760    fi
33761    # Collapse compiler output into a single line
33762    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33763    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33764        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33765  else
33766      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33767  fi
33768  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33769  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33770  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33771  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33772
33773  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33774$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33775
33776
33777  # Now that we have resolved CC ourself, let autoconf have its go at it
33778  ac_ext=c
33779ac_cpp='$CPP $CPPFLAGS'
33780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33782ac_compiler_gnu=$ac_cv_c_compiler_gnu
33783if test -n "$ac_tool_prefix"; then
33784  for ac_prog in $CC
33785  do
33786    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33787set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33789$as_echo_n "checking for $ac_word... " >&6; }
33790if ${ac_cv_prog_CC+:} false; then :
33791  $as_echo_n "(cached) " >&6
33792else
33793  if test -n "$CC"; then
33794  ac_cv_prog_CC="$CC" # Let the user override the test.
33795else
33796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33797for as_dir in $PATH
33798do
33799  IFS=$as_save_IFS
33800  test -z "$as_dir" && as_dir=.
33801    for ac_exec_ext in '' $ac_executable_extensions; do
33802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33803    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33805    break 2
33806  fi
33807done
33808  done
33809IFS=$as_save_IFS
33810
33811fi
33812fi
33813CC=$ac_cv_prog_CC
33814if test -n "$CC"; then
33815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33816$as_echo "$CC" >&6; }
33817else
33818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33819$as_echo "no" >&6; }
33820fi
33821
33822
33823    test -n "$CC" && break
33824  done
33825fi
33826if test -z "$CC"; then
33827  ac_ct_CC=$CC
33828  for ac_prog in $CC
33829do
33830  # Extract the first word of "$ac_prog", so it can be a program name with args.
33831set dummy $ac_prog; ac_word=$2
33832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33833$as_echo_n "checking for $ac_word... " >&6; }
33834if ${ac_cv_prog_ac_ct_CC+:} false; then :
33835  $as_echo_n "(cached) " >&6
33836else
33837  if test -n "$ac_ct_CC"; then
33838  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33839else
33840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33841for as_dir in $PATH
33842do
33843  IFS=$as_save_IFS
33844  test -z "$as_dir" && as_dir=.
33845    for ac_exec_ext in '' $ac_executable_extensions; do
33846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33847    ac_cv_prog_ac_ct_CC="$ac_prog"
33848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33849    break 2
33850  fi
33851done
33852  done
33853IFS=$as_save_IFS
33854
33855fi
33856fi
33857ac_ct_CC=$ac_cv_prog_ac_ct_CC
33858if test -n "$ac_ct_CC"; then
33859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33860$as_echo "$ac_ct_CC" >&6; }
33861else
33862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33863$as_echo "no" >&6; }
33864fi
33865
33866
33867  test -n "$ac_ct_CC" && break
33868done
33869
33870  if test "x$ac_ct_CC" = x; then
33871    CC=""
33872  else
33873    case $cross_compiling:$ac_tool_warned in
33874yes:)
33875{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33876$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33877ac_tool_warned=yes ;;
33878esac
33879    CC=$ac_ct_CC
33880  fi
33881fi
33882
33883
33884test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33886as_fn_error $? "no acceptable C compiler found in \$PATH
33887See \`config.log' for more details" "$LINENO" 5; }
33888
33889# Provide some information about the compiler.
33890$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33891set X $ac_compile
33892ac_compiler=$2
33893for ac_option in --version -v -V -qversion; do
33894  { { ac_try="$ac_compiler $ac_option >&5"
33895case "(($ac_try" in
33896  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33897  *) ac_try_echo=$ac_try;;
33898esac
33899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33900$as_echo "$ac_try_echo"; } >&5
33901  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33902  ac_status=$?
33903  if test -s conftest.err; then
33904    sed '10a\
33905... rest of stderr output deleted ...
33906         10q' conftest.err >conftest.er1
33907    cat conftest.er1 >&5
33908  fi
33909  rm -f conftest.er1 conftest.err
33910  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33911  test $ac_status = 0; }
33912done
33913
33914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33915/* end confdefs.h.  */
33916
33917int
33918main ()
33919{
33920
33921  ;
33922  return 0;
33923}
33924_ACEOF
33925ac_clean_files_save=$ac_clean_files
33926ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33927# Try to create an executable without -o first, disregard a.out.
33928# It will help us diagnose broken compilers, and finding out an intuition
33929# of exeext.
33930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33931$as_echo_n "checking whether the C compiler works... " >&6; }
33932ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33933
33934# The possible output files:
33935ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33936
33937ac_rmfiles=
33938for ac_file in $ac_files
33939do
33940  case $ac_file in
33941    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33942    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33943  esac
33944done
33945rm -f $ac_rmfiles
33946
33947if { { ac_try="$ac_link_default"
33948case "(($ac_try" in
33949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33950  *) ac_try_echo=$ac_try;;
33951esac
33952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33953$as_echo "$ac_try_echo"; } >&5
33954  (eval "$ac_link_default") 2>&5
33955  ac_status=$?
33956  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33957  test $ac_status = 0; }; then :
33958  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33959# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33960# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33961# so that the user can short-circuit this test for compilers unknown to
33962# Autoconf.
33963for ac_file in $ac_files ''
33964do
33965  test -f "$ac_file" || continue
33966  case $ac_file in
33967    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33968	;;
33969    [ab].out )
33970	# We found the default executable, but exeext='' is most
33971	# certainly right.
33972	break;;
33973    *.* )
33974	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33975	then :; else
33976	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33977	fi
33978	# We set ac_cv_exeext here because the later test for it is not
33979	# safe: cross compilers may not add the suffix if given an `-o'
33980	# argument, so we may need to know it at that point already.
33981	# Even if this section looks crufty: it has the advantage of
33982	# actually working.
33983	break;;
33984    * )
33985	break;;
33986  esac
33987done
33988test "$ac_cv_exeext" = no && ac_cv_exeext=
33989
33990else
33991  ac_file=''
33992fi
33993if test -z "$ac_file"; then :
33994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33995$as_echo "no" >&6; }
33996$as_echo "$as_me: failed program was:" >&5
33997sed 's/^/| /' conftest.$ac_ext >&5
33998
33999{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34001as_fn_error 77 "C compiler cannot create executables
34002See \`config.log' for more details" "$LINENO" 5; }
34003else
34004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34005$as_echo "yes" >&6; }
34006fi
34007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34008$as_echo_n "checking for C compiler default output file name... " >&6; }
34009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34010$as_echo "$ac_file" >&6; }
34011ac_exeext=$ac_cv_exeext
34012
34013rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34014ac_clean_files=$ac_clean_files_save
34015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34016$as_echo_n "checking for suffix of executables... " >&6; }
34017if { { ac_try="$ac_link"
34018case "(($ac_try" in
34019  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34020  *) ac_try_echo=$ac_try;;
34021esac
34022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34023$as_echo "$ac_try_echo"; } >&5
34024  (eval "$ac_link") 2>&5
34025  ac_status=$?
34026  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34027  test $ac_status = 0; }; then :
34028  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34029# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34030# work properly (i.e., refer to `conftest.exe'), while it won't with
34031# `rm'.
34032for ac_file in conftest.exe conftest conftest.*; do
34033  test -f "$ac_file" || continue
34034  case $ac_file in
34035    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34036    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34037	  break;;
34038    * ) break;;
34039  esac
34040done
34041else
34042  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34044as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34045See \`config.log' for more details" "$LINENO" 5; }
34046fi
34047rm -f conftest conftest$ac_cv_exeext
34048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34049$as_echo "$ac_cv_exeext" >&6; }
34050
34051rm -f conftest.$ac_ext
34052EXEEXT=$ac_cv_exeext
34053ac_exeext=$EXEEXT
34054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34055/* end confdefs.h.  */
34056#include <stdio.h>
34057int
34058main ()
34059{
34060FILE *f = fopen ("conftest.out", "w");
34061 return ferror (f) || fclose (f) != 0;
34062
34063  ;
34064  return 0;
34065}
34066_ACEOF
34067ac_clean_files="$ac_clean_files conftest.out"
34068# Check that the compiler produces executables we can run.  If not, either
34069# the compiler is broken, or we cross compile.
34070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34071$as_echo_n "checking whether we are cross compiling... " >&6; }
34072if test "$cross_compiling" != yes; then
34073  { { ac_try="$ac_link"
34074case "(($ac_try" in
34075  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34076  *) ac_try_echo=$ac_try;;
34077esac
34078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34079$as_echo "$ac_try_echo"; } >&5
34080  (eval "$ac_link") 2>&5
34081  ac_status=$?
34082  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34083  test $ac_status = 0; }
34084  if { ac_try='./conftest$ac_cv_exeext'
34085  { { case "(($ac_try" in
34086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34087  *) ac_try_echo=$ac_try;;
34088esac
34089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34090$as_echo "$ac_try_echo"; } >&5
34091  (eval "$ac_try") 2>&5
34092  ac_status=$?
34093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34094  test $ac_status = 0; }; }; then
34095    cross_compiling=no
34096  else
34097    if test "$cross_compiling" = maybe; then
34098	cross_compiling=yes
34099    else
34100	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34102as_fn_error $? "cannot run C compiled programs.
34103If you meant to cross compile, use \`--host'.
34104See \`config.log' for more details" "$LINENO" 5; }
34105    fi
34106  fi
34107fi
34108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34109$as_echo "$cross_compiling" >&6; }
34110
34111rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34112ac_clean_files=$ac_clean_files_save
34113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34114$as_echo_n "checking for suffix of object files... " >&6; }
34115if ${ac_cv_objext+:} false; then :
34116  $as_echo_n "(cached) " >&6
34117else
34118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34119/* end confdefs.h.  */
34120
34121int
34122main ()
34123{
34124
34125  ;
34126  return 0;
34127}
34128_ACEOF
34129rm -f conftest.o conftest.obj
34130if { { ac_try="$ac_compile"
34131case "(($ac_try" in
34132  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34133  *) ac_try_echo=$ac_try;;
34134esac
34135eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34136$as_echo "$ac_try_echo"; } >&5
34137  (eval "$ac_compile") 2>&5
34138  ac_status=$?
34139  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34140  test $ac_status = 0; }; then :
34141  for ac_file in conftest.o conftest.obj conftest.*; do
34142  test -f "$ac_file" || continue;
34143  case $ac_file in
34144    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34145    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34146       break;;
34147  esac
34148done
34149else
34150  $as_echo "$as_me: failed program was:" >&5
34151sed 's/^/| /' conftest.$ac_ext >&5
34152
34153{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34155as_fn_error $? "cannot compute suffix of object files: cannot compile
34156See \`config.log' for more details" "$LINENO" 5; }
34157fi
34158rm -f conftest.$ac_cv_objext conftest.$ac_ext
34159fi
34160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34161$as_echo "$ac_cv_objext" >&6; }
34162OBJEXT=$ac_cv_objext
34163ac_objext=$OBJEXT
34164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34165$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34166if ${ac_cv_c_compiler_gnu+:} false; then :
34167  $as_echo_n "(cached) " >&6
34168else
34169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34170/* end confdefs.h.  */
34171
34172int
34173main ()
34174{
34175#ifndef __GNUC__
34176       choke me
34177#endif
34178
34179  ;
34180  return 0;
34181}
34182_ACEOF
34183if ac_fn_c_try_compile "$LINENO"; then :
34184  ac_compiler_gnu=yes
34185else
34186  ac_compiler_gnu=no
34187fi
34188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34189ac_cv_c_compiler_gnu=$ac_compiler_gnu
34190
34191fi
34192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34193$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34194if test $ac_compiler_gnu = yes; then
34195  GCC=yes
34196else
34197  GCC=
34198fi
34199ac_test_CFLAGS=${CFLAGS+set}
34200ac_save_CFLAGS=$CFLAGS
34201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34202$as_echo_n "checking whether $CC accepts -g... " >&6; }
34203if ${ac_cv_prog_cc_g+:} false; then :
34204  $as_echo_n "(cached) " >&6
34205else
34206  ac_save_c_werror_flag=$ac_c_werror_flag
34207   ac_c_werror_flag=yes
34208   ac_cv_prog_cc_g=no
34209   CFLAGS="-g"
34210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34211/* end confdefs.h.  */
34212
34213int
34214main ()
34215{
34216
34217  ;
34218  return 0;
34219}
34220_ACEOF
34221if ac_fn_c_try_compile "$LINENO"; then :
34222  ac_cv_prog_cc_g=yes
34223else
34224  CFLAGS=""
34225      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34226/* end confdefs.h.  */
34227
34228int
34229main ()
34230{
34231
34232  ;
34233  return 0;
34234}
34235_ACEOF
34236if ac_fn_c_try_compile "$LINENO"; then :
34237
34238else
34239  ac_c_werror_flag=$ac_save_c_werror_flag
34240	 CFLAGS="-g"
34241	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34242/* end confdefs.h.  */
34243
34244int
34245main ()
34246{
34247
34248  ;
34249  return 0;
34250}
34251_ACEOF
34252if ac_fn_c_try_compile "$LINENO"; then :
34253  ac_cv_prog_cc_g=yes
34254fi
34255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34256fi
34257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34258fi
34259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34260   ac_c_werror_flag=$ac_save_c_werror_flag
34261fi
34262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34263$as_echo "$ac_cv_prog_cc_g" >&6; }
34264if test "$ac_test_CFLAGS" = set; then
34265  CFLAGS=$ac_save_CFLAGS
34266elif test $ac_cv_prog_cc_g = yes; then
34267  if test "$GCC" = yes; then
34268    CFLAGS="-g -O2"
34269  else
34270    CFLAGS="-g"
34271  fi
34272else
34273  if test "$GCC" = yes; then
34274    CFLAGS="-O2"
34275  else
34276    CFLAGS=
34277  fi
34278fi
34279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34280$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34281if ${ac_cv_prog_cc_c89+:} false; then :
34282  $as_echo_n "(cached) " >&6
34283else
34284  ac_cv_prog_cc_c89=no
34285ac_save_CC=$CC
34286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34287/* end confdefs.h.  */
34288#include <stdarg.h>
34289#include <stdio.h>
34290struct stat;
34291/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34292struct buf { int x; };
34293FILE * (*rcsopen) (struct buf *, struct stat *, int);
34294static char *e (p, i)
34295     char **p;
34296     int i;
34297{
34298  return p[i];
34299}
34300static char *f (char * (*g) (char **, int), char **p, ...)
34301{
34302  char *s;
34303  va_list v;
34304  va_start (v,p);
34305  s = g (p, va_arg (v,int));
34306  va_end (v);
34307  return s;
34308}
34309
34310/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34311   function prototypes and stuff, but not '\xHH' hex character constants.
34312   These don't provoke an error unfortunately, instead are silently treated
34313   as 'x'.  The following induces an error, until -std is added to get
34314   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34315   array size at least.  It's necessary to write '\x00'==0 to get something
34316   that's true only with -std.  */
34317int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34318
34319/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34320   inside strings and character constants.  */
34321#define FOO(x) 'x'
34322int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34323
34324int test (int i, double x);
34325struct s1 {int (*f) (int a);};
34326struct s2 {int (*f) (double a);};
34327int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34328int argc;
34329char **argv;
34330int
34331main ()
34332{
34333return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34334  ;
34335  return 0;
34336}
34337_ACEOF
34338for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34339	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34340do
34341  CC="$ac_save_CC $ac_arg"
34342  if ac_fn_c_try_compile "$LINENO"; then :
34343  ac_cv_prog_cc_c89=$ac_arg
34344fi
34345rm -f core conftest.err conftest.$ac_objext
34346  test "x$ac_cv_prog_cc_c89" != "xno" && break
34347done
34348rm -f conftest.$ac_ext
34349CC=$ac_save_CC
34350
34351fi
34352# AC_CACHE_VAL
34353case "x$ac_cv_prog_cc_c89" in
34354  x)
34355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34356$as_echo "none needed" >&6; } ;;
34357  xno)
34358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34359$as_echo "unsupported" >&6; } ;;
34360  *)
34361    CC="$CC $ac_cv_prog_cc_c89"
34362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34363$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34364esac
34365if test "x$ac_cv_prog_cc_c89" != xno; then :
34366
34367fi
34368
34369ac_ext=cpp
34370ac_cpp='$CXXCPP $CPPFLAGS'
34371ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34372ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34373ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34374
34375
34376
34377  COMPILER_NAME=C++
34378  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34379
34380  if test "x$CXX" != x; then
34381    # User has supplied compiler name already, always let that override.
34382    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34383$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34384    if test "x`basename $CXX`" = "x$CXX"; then
34385      # A command without a complete path is provided, search $PATH.
34386
34387      for ac_prog in $CXX
34388do
34389  # Extract the first word of "$ac_prog", so it can be a program name with args.
34390set dummy $ac_prog; ac_word=$2
34391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34392$as_echo_n "checking for $ac_word... " >&6; }
34393if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34394  $as_echo_n "(cached) " >&6
34395else
34396  case $POTENTIAL_CXX in
34397  [\\/]* | ?:[\\/]*)
34398  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34399  ;;
34400  *)
34401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34402for as_dir in $PATH
34403do
34404  IFS=$as_save_IFS
34405  test -z "$as_dir" && as_dir=.
34406    for ac_exec_ext in '' $ac_executable_extensions; do
34407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34408    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34410    break 2
34411  fi
34412done
34413  done
34414IFS=$as_save_IFS
34415
34416  ;;
34417esac
34418fi
34419POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34420if test -n "$POTENTIAL_CXX"; then
34421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34422$as_echo "$POTENTIAL_CXX" >&6; }
34423else
34424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34425$as_echo "no" >&6; }
34426fi
34427
34428
34429  test -n "$POTENTIAL_CXX" && break
34430done
34431
34432      if test "x$POTENTIAL_CXX" != x; then
34433        CXX=$POTENTIAL_CXX
34434      else
34435        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34436      fi
34437    else
34438      # Otherwise it might already be a complete path
34439      if test ! -x "$CXX"; then
34440        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34441      fi
34442    fi
34443  else
34444    # No user supplied value. Locate compiler ourselves.
34445
34446    # If we are cross compiling, assume cross compilation tools follows the
34447    # cross compilation standard where they are prefixed with the autoconf
34448    # standard name for the target. For example the binary
34449    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34450    # If we are not cross compiling, then the default compiler name will be
34451    # used.
34452
34453    CXX=
34454    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34455    # before checking the rest of the PATH.
34456    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34457    # step, this should not be necessary.
34458    if test -n "$TOOLCHAIN_PATH"; then
34459      PATH_save="$PATH"
34460      PATH="$TOOLCHAIN_PATH"
34461      for ac_prog in $SEARCH_LIST
34462do
34463  # Extract the first word of "$ac_prog", so it can be a program name with args.
34464set dummy $ac_prog; ac_word=$2
34465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34466$as_echo_n "checking for $ac_word... " >&6; }
34467if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34468  $as_echo_n "(cached) " >&6
34469else
34470  case $TOOLCHAIN_PATH_CXX in
34471  [\\/]* | ?:[\\/]*)
34472  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34473  ;;
34474  *)
34475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34476for as_dir in $PATH
34477do
34478  IFS=$as_save_IFS
34479  test -z "$as_dir" && as_dir=.
34480    for ac_exec_ext in '' $ac_executable_extensions; do
34481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34482    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34484    break 2
34485  fi
34486done
34487  done
34488IFS=$as_save_IFS
34489
34490  ;;
34491esac
34492fi
34493TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34494if test -n "$TOOLCHAIN_PATH_CXX"; then
34495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34496$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34497else
34498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34499$as_echo "no" >&6; }
34500fi
34501
34502
34503  test -n "$TOOLCHAIN_PATH_CXX" && break
34504done
34505
34506      CXX=$TOOLCHAIN_PATH_CXX
34507      PATH="$PATH_save"
34508    fi
34509
34510    # AC_PATH_PROGS can't be run multiple times with the same variable,
34511    # so create a new name for this run.
34512    if test "x$CXX" = x; then
34513      for ac_prog in $SEARCH_LIST
34514do
34515  # Extract the first word of "$ac_prog", so it can be a program name with args.
34516set dummy $ac_prog; ac_word=$2
34517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34518$as_echo_n "checking for $ac_word... " >&6; }
34519if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34520  $as_echo_n "(cached) " >&6
34521else
34522  case $POTENTIAL_CXX in
34523  [\\/]* | ?:[\\/]*)
34524  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34525  ;;
34526  *)
34527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34528for as_dir in $PATH
34529do
34530  IFS=$as_save_IFS
34531  test -z "$as_dir" && as_dir=.
34532    for ac_exec_ext in '' $ac_executable_extensions; do
34533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34534    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34536    break 2
34537  fi
34538done
34539  done
34540IFS=$as_save_IFS
34541
34542  ;;
34543esac
34544fi
34545POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34546if test -n "$POTENTIAL_CXX"; then
34547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34548$as_echo "$POTENTIAL_CXX" >&6; }
34549else
34550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34551$as_echo "no" >&6; }
34552fi
34553
34554
34555  test -n "$POTENTIAL_CXX" && break
34556done
34557
34558      CXX=$POTENTIAL_CXX
34559    fi
34560
34561    if test "x$CXX" = x; then
34562
34563  # Print a helpful message on how to acquire the necessary build dependency.
34564  # devkit is the help tag: freetype, cups, alsa etc
34565  MISSING_DEPENDENCY=devkit
34566
34567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34568    cygwin_help $MISSING_DEPENDENCY
34569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34570    msys_help $MISSING_DEPENDENCY
34571  else
34572    PKGHANDLER_COMMAND=
34573
34574    case $PKGHANDLER in
34575      apt-get)
34576        apt_help     $MISSING_DEPENDENCY ;;
34577      yum)
34578        yum_help     $MISSING_DEPENDENCY ;;
34579      brew)
34580        brew_help    $MISSING_DEPENDENCY ;;
34581      port)
34582        port_help    $MISSING_DEPENDENCY ;;
34583      pkgutil)
34584        pkgutil_help $MISSING_DEPENDENCY ;;
34585      pkgadd)
34586        pkgadd_help  $MISSING_DEPENDENCY ;;
34587    esac
34588
34589    if test "x$PKGHANDLER_COMMAND" != x; then
34590      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34591    fi
34592  fi
34593
34594      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34595    fi
34596  fi
34597
34598  # Now we have a compiler binary in CXX. Make sure it's okay.
34599
34600  # Only process if variable expands to non-empty
34601
34602  if test "x$CXX" != x; then
34603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34604
34605  # First separate the path from the arguments. This will split at the first
34606  # space.
34607  complete="$CXX"
34608  path="${complete%% *}"
34609  tmp="$complete EOL"
34610  arguments="${tmp#* }"
34611
34612  # Input might be given as Windows format, start by converting to
34613  # unix format.
34614  new_path=`$CYGPATH -u "$path"`
34615
34616  # Now try to locate executable using which
34617  new_path=`$WHICH "$new_path" 2> /dev/null`
34618  # bat and cmd files are not always considered executable in cygwin causing which
34619  # to not find them
34620  if test "x$new_path" = x \
34621      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34622      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34623    new_path=`$CYGPATH -u "$path"`
34624  fi
34625  if test "x$new_path" = x; then
34626    # Oops. Which didn't find the executable.
34627    # The splitting of arguments from the executable at a space might have been incorrect,
34628    # since paths with space are more likely in Windows. Give it another try with the whole
34629    # argument.
34630    path="$complete"
34631    arguments="EOL"
34632    new_path=`$CYGPATH -u "$path"`
34633    new_path=`$WHICH "$new_path" 2> /dev/null`
34634    # bat and cmd files are not always considered executable in cygwin causing which
34635    # to not find them
34636    if test "x$new_path" = x \
34637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34639      new_path=`$CYGPATH -u "$path"`
34640    fi
34641    if test "x$new_path" = x; then
34642      # It's still not found. Now this is an unrecoverable error.
34643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34644$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34645      has_space=`$ECHO "$complete" | $GREP " "`
34646      if test "x$has_space" != x; then
34647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34649      fi
34650      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34651    fi
34652  fi
34653
34654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34657  # "foo.exe" is OK but "foo" is an error.
34658  #
34659  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34660  # It is also a way to make sure we got the proper file name for the real test later on.
34661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34662  if test "x$test_shortpath" = x; then
34663    # Short path failed, file does not exist as specified.
34664    # Try adding .exe or .cmd
34665    if test -f "${new_path}.exe"; then
34666      input_to_shortpath="${new_path}.exe"
34667    elif test -f "${new_path}.cmd"; then
34668      input_to_shortpath="${new_path}.cmd"
34669    else
34670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34671$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34674      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34675    fi
34676  else
34677    input_to_shortpath="$new_path"
34678  fi
34679
34680  # Call helper function which possibly converts this using DOS-style short mode.
34681  # If so, the updated path is stored in $new_path.
34682  new_path="$input_to_shortpath"
34683
34684  input_path="$input_to_shortpath"
34685  # Check if we need to convert this using DOS-style short mode. If the path
34686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34687  # take no chances and rewrite it.
34688  # Note: m4 eats our [], so we need to use [ and ] instead.
34689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34690  if test "x$has_forbidden_chars" != x; then
34691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34695      # Going to short mode and back again did indeed matter. Since short mode is
34696      # case insensitive, let's make it lowercase to improve readability.
34697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34698      # Now convert it back to Unix-style (cygpath)
34699      input_path=`$CYGPATH -u "$shortmode_path"`
34700      new_path="$input_path"
34701    fi
34702  fi
34703
34704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34705  if test "x$test_cygdrive_prefix" = x; then
34706    # As a simple fix, exclude /usr/bin since it's not a real path.
34707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34709      # a path prefixed by /cygdrive for fixpath to work.
34710      new_path="$CYGWIN_ROOT_PATH$input_path"
34711    fi
34712  fi
34713
34714  # remove trailing .exe if any
34715  new_path="${new_path/%.exe/}"
34716
34717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34718
34719  # First separate the path from the arguments. This will split at the first
34720  # space.
34721  complete="$CXX"
34722  path="${complete%% *}"
34723  tmp="$complete EOL"
34724  arguments="${tmp#* }"
34725
34726  # Input might be given as Windows format, start by converting to
34727  # unix format.
34728  new_path="$path"
34729
34730  windows_path="$new_path"
34731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34732    unix_path=`$CYGPATH -u "$windows_path"`
34733    new_path="$unix_path"
34734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34736    new_path="$unix_path"
34737  fi
34738
34739
34740  # Now try to locate executable using which
34741  new_path=`$WHICH "$new_path" 2> /dev/null`
34742
34743  if test "x$new_path" = x; then
34744    # Oops. Which didn't find the executable.
34745    # The splitting of arguments from the executable at a space might have been incorrect,
34746    # since paths with space are more likely in Windows. Give it another try with the whole
34747    # argument.
34748    path="$complete"
34749    arguments="EOL"
34750    new_path="$path"
34751
34752  windows_path="$new_path"
34753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34754    unix_path=`$CYGPATH -u "$windows_path"`
34755    new_path="$unix_path"
34756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34758    new_path="$unix_path"
34759  fi
34760
34761
34762    new_path=`$WHICH "$new_path" 2> /dev/null`
34763    # bat and cmd files are not always considered executable in MSYS causing which
34764    # to not find them
34765    if test "x$new_path" = x \
34766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34768      new_path="$path"
34769
34770  windows_path="$new_path"
34771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34772    unix_path=`$CYGPATH -u "$windows_path"`
34773    new_path="$unix_path"
34774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34776    new_path="$unix_path"
34777  fi
34778
34779    fi
34780
34781    if test "x$new_path" = x; then
34782      # It's still not found. Now this is an unrecoverable error.
34783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34784$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34785      has_space=`$ECHO "$complete" | $GREP " "`
34786      if test "x$has_space" != x; then
34787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34789      fi
34790      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34791    fi
34792  fi
34793
34794  # Now new_path has a complete unix path to the binary
34795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34796    # Keep paths in /bin as-is, but remove trailing .exe if any
34797    new_path="${new_path/%.exe/}"
34798    # Do not save /bin paths to all_fixpath_prefixes!
34799  else
34800    # Not in mixed or Windows style, start by that.
34801    new_path=`cmd //c echo $new_path`
34802
34803  input_path="$new_path"
34804  # Check if we need to convert this using DOS-style short mode. If the path
34805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34806  # take no chances and rewrite it.
34807  # Note: m4 eats our [], so we need to use [ and ] instead.
34808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34809  if test "x$has_forbidden_chars" != x; then
34810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34812  fi
34813
34814    # Output is in $new_path
34815
34816  windows_path="$new_path"
34817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34818    unix_path=`$CYGPATH -u "$windows_path"`
34819    new_path="$unix_path"
34820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34822    new_path="$unix_path"
34823  fi
34824
34825    # remove trailing .exe if any
34826    new_path="${new_path/%.exe/}"
34827
34828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34830  fi
34831
34832    else
34833      # We're on a unix platform. Hooray! :)
34834      # First separate the path from the arguments. This will split at the first
34835      # space.
34836      complete="$CXX"
34837      path="${complete%% *}"
34838      tmp="$complete EOL"
34839      arguments="${tmp#* }"
34840
34841      # Cannot rely on the command "which" here since it doesn't always work.
34842      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34843      if test -z "$is_absolute_path"; then
34844        # Path to executable is not absolute. Find it.
34845        IFS_save="$IFS"
34846        IFS=:
34847        for p in $PATH; do
34848          if test -f "$p/$path" && test -x "$p/$path"; then
34849            new_path="$p/$path"
34850            break
34851          fi
34852        done
34853        IFS="$IFS_save"
34854      else
34855        # This is an absolute path, we can use it without further modifications.
34856        new_path="$path"
34857      fi
34858
34859      if test "x$new_path" = x; then
34860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34861$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34862        has_space=`$ECHO "$complete" | $GREP " "`
34863        if test "x$has_space" != x; then
34864          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34865$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34866        fi
34867        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34868      fi
34869    fi
34870
34871    # Now join together the path and the arguments once again
34872    if test "x$arguments" != xEOL; then
34873      new_complete="$new_path ${arguments% *}"
34874    else
34875      new_complete="$new_path"
34876    fi
34877
34878    if test "x$complete" != "x$new_complete"; then
34879      CXX="$new_complete"
34880      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34881$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34882    fi
34883  fi
34884
34885  TEST_COMPILER="$CXX"
34886
34887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34888$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34889  SYMLINK_ORIGINAL="$TEST_COMPILER"
34890
34891  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34892    # Follow a chain of symbolic links. Use readlink
34893    # where it exists, else fall back to horribly
34894    # complicated shell code.
34895    if test "x$READLINK_TESTED" != yes; then
34896      # On MacOSX there is a readlink tool with a different
34897      # purpose than the GNU readlink tool. Check the found readlink.
34898      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34899      if test "x$ISGNU" = x; then
34900        # A readlink that we do not know how to use.
34901        # Are there other non-GNU readlinks out there?
34902        READLINK_TESTED=yes
34903        READLINK=
34904      fi
34905    fi
34906
34907    if test "x$READLINK" != x; then
34908      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34909    else
34910      # Save the current directory for restoring afterwards
34911      STARTDIR=$PWD
34912      COUNTER=0
34913      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34914      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34915      cd $sym_link_dir
34916      # Use -P flag to resolve symlinks in directories.
34917      cd `$THEPWDCMD -P`
34918      sym_link_dir=`$THEPWDCMD -P`
34919      # Resolve file symlinks
34920      while test $COUNTER -lt 20; do
34921        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34922        if test "x$ISLINK" == x; then
34923          # This is not a symbolic link! We are done!
34924          break
34925        fi
34926        # Again resolve directory symlinks since the target of the just found
34927        # link could be in a different directory
34928        cd `$DIRNAME $ISLINK`
34929        sym_link_dir=`$THEPWDCMD -P`
34930        sym_link_file=`$BASENAME $ISLINK`
34931        let COUNTER=COUNTER+1
34932      done
34933      cd $STARTDIR
34934      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34935    fi
34936  fi
34937
34938  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34940$as_echo "no symlink" >&6; }
34941  else
34942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34943$as_echo "$SYMLINK_ORIGINAL" >&6; }
34944
34945    # We can't handle ccache by gcc wrappers, since we need to know if we're
34946    # using ccache. Instead ccache usage must be controlled by a configure option.
34947    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34948    if test "x$COMPILER_BASENAME" = "xccache"; then
34949      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34950$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34951      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34952    fi
34953  fi
34954
34955
34956  COMPILER=$CXX
34957  COMPILER_NAME=$COMPILER_NAME
34958
34959  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34960    # cc -V output typically looks like
34961    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34962    # or
34963    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34964    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34965    # Check that this is likely to be the Solaris Studio cc.
34966    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34967    if test $? -ne 0; then
34968      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34969      { $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
34970$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34971      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34972$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34973      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34974$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34975      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34976    fi
34977    # Remove usage instructions (if present), and
34978    # collapse compiler output into a single line
34979    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34980        $SED -e 's/ *[Uu]sage:.*//'`
34981    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34982        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34983  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34984    # xlc -qversion output typically looks like
34985    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34986    #     Version: 11.01.0000.0015
34987    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34988    # Check that this is likely to be the IBM XL C compiler.
34989    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34990    if test $? -ne 0; then
34991      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34992      { $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
34993$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34994      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34995$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34997$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34998      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34999    fi
35000    # Collapse compiler output into a single line
35001    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35002    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35003        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35004  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35005    # There is no specific version flag, but all output starts with a version string.
35006    # First line typically looks something like:
35007    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35008    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35009    # Check that this is likely to be Microsoft CL.EXE.
35010    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35011    if test $? -ne 0; then
35012      { $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
35013$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35014      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35015$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35016      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35017    fi
35018    # Collapse compiler output into a single line
35019    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35020    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35021        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35022  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35023    # gcc --version output typically looks like
35024    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35025    #     Copyright (C) 2013 Free Software Foundation, Inc.
35026    #     This is free software; see the source for copying conditions.  There is NO
35027    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35028    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35029    # Check that this is likely to be GCC.
35030    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35031    if test $? -ne 0; then
35032      { $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
35033$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35034      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35035$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35036      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35037    fi
35038    # Remove Copyright and legalese from version string, and
35039    # collapse into a single line
35040    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35041        $SED -e 's/ *Copyright .*//'`
35042    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35043        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35044  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35045    # clang --version output typically looks like
35046    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35047    #    clang version 3.3 (tags/RELEASE_33/final)
35048    # or
35049    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35050    #    Target: x86_64-pc-linux-gnu
35051    #    Thread model: posix
35052    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35053    # Check that this is likely to be clang
35054    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35055    if test $? -ne 0; then
35056      { $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
35057$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35058      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35059$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35060      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35061    fi
35062    # Collapse compiler output into a single line
35063    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35064    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35065        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35066  else
35067      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35068  fi
35069  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35070  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35071  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35072  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35073
35074  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35075$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35076
35077
35078  # Now that we have resolved CXX ourself, let autoconf have its go at it
35079  ac_ext=cpp
35080ac_cpp='$CXXCPP $CPPFLAGS'
35081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35084if test -z "$CXX"; then
35085  if test -n "$CCC"; then
35086    CXX=$CCC
35087  else
35088    if test -n "$ac_tool_prefix"; then
35089  for ac_prog in $CXX
35090  do
35091    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35094$as_echo_n "checking for $ac_word... " >&6; }
35095if ${ac_cv_prog_CXX+:} false; then :
35096  $as_echo_n "(cached) " >&6
35097else
35098  if test -n "$CXX"; then
35099  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35100else
35101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35102for as_dir in $PATH
35103do
35104  IFS=$as_save_IFS
35105  test -z "$as_dir" && as_dir=.
35106    for ac_exec_ext in '' $ac_executable_extensions; do
35107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35108    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35110    break 2
35111  fi
35112done
35113  done
35114IFS=$as_save_IFS
35115
35116fi
35117fi
35118CXX=$ac_cv_prog_CXX
35119if test -n "$CXX"; then
35120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35121$as_echo "$CXX" >&6; }
35122else
35123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35124$as_echo "no" >&6; }
35125fi
35126
35127
35128    test -n "$CXX" && break
35129  done
35130fi
35131if test -z "$CXX"; then
35132  ac_ct_CXX=$CXX
35133  for ac_prog in $CXX
35134do
35135  # Extract the first word of "$ac_prog", so it can be a program name with args.
35136set dummy $ac_prog; ac_word=$2
35137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35138$as_echo_n "checking for $ac_word... " >&6; }
35139if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35140  $as_echo_n "(cached) " >&6
35141else
35142  if test -n "$ac_ct_CXX"; then
35143  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35144else
35145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35146for as_dir in $PATH
35147do
35148  IFS=$as_save_IFS
35149  test -z "$as_dir" && as_dir=.
35150    for ac_exec_ext in '' $ac_executable_extensions; do
35151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35152    ac_cv_prog_ac_ct_CXX="$ac_prog"
35153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35154    break 2
35155  fi
35156done
35157  done
35158IFS=$as_save_IFS
35159
35160fi
35161fi
35162ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35163if test -n "$ac_ct_CXX"; then
35164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35165$as_echo "$ac_ct_CXX" >&6; }
35166else
35167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35168$as_echo "no" >&6; }
35169fi
35170
35171
35172  test -n "$ac_ct_CXX" && break
35173done
35174
35175  if test "x$ac_ct_CXX" = x; then
35176    CXX="g++"
35177  else
35178    case $cross_compiling:$ac_tool_warned in
35179yes:)
35180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35182ac_tool_warned=yes ;;
35183esac
35184    CXX=$ac_ct_CXX
35185  fi
35186fi
35187
35188  fi
35189fi
35190# Provide some information about the compiler.
35191$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35192set X $ac_compile
35193ac_compiler=$2
35194for ac_option in --version -v -V -qversion; do
35195  { { ac_try="$ac_compiler $ac_option >&5"
35196case "(($ac_try" in
35197  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35198  *) ac_try_echo=$ac_try;;
35199esac
35200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35201$as_echo "$ac_try_echo"; } >&5
35202  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35203  ac_status=$?
35204  if test -s conftest.err; then
35205    sed '10a\
35206... rest of stderr output deleted ...
35207         10q' conftest.err >conftest.er1
35208    cat conftest.er1 >&5
35209  fi
35210  rm -f conftest.er1 conftest.err
35211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35212  test $ac_status = 0; }
35213done
35214
35215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35216$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35217if ${ac_cv_cxx_compiler_gnu+:} false; then :
35218  $as_echo_n "(cached) " >&6
35219else
35220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35221/* end confdefs.h.  */
35222
35223int
35224main ()
35225{
35226#ifndef __GNUC__
35227       choke me
35228#endif
35229
35230  ;
35231  return 0;
35232}
35233_ACEOF
35234if ac_fn_cxx_try_compile "$LINENO"; then :
35235  ac_compiler_gnu=yes
35236else
35237  ac_compiler_gnu=no
35238fi
35239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35240ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35241
35242fi
35243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35244$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35245if test $ac_compiler_gnu = yes; then
35246  GXX=yes
35247else
35248  GXX=
35249fi
35250ac_test_CXXFLAGS=${CXXFLAGS+set}
35251ac_save_CXXFLAGS=$CXXFLAGS
35252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35253$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35254if ${ac_cv_prog_cxx_g+:} false; then :
35255  $as_echo_n "(cached) " >&6
35256else
35257  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35258   ac_cxx_werror_flag=yes
35259   ac_cv_prog_cxx_g=no
35260   CXXFLAGS="-g"
35261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35262/* end confdefs.h.  */
35263
35264int
35265main ()
35266{
35267
35268  ;
35269  return 0;
35270}
35271_ACEOF
35272if ac_fn_cxx_try_compile "$LINENO"; then :
35273  ac_cv_prog_cxx_g=yes
35274else
35275  CXXFLAGS=""
35276      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35277/* end confdefs.h.  */
35278
35279int
35280main ()
35281{
35282
35283  ;
35284  return 0;
35285}
35286_ACEOF
35287if ac_fn_cxx_try_compile "$LINENO"; then :
35288
35289else
35290  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35291	 CXXFLAGS="-g"
35292	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35293/* end confdefs.h.  */
35294
35295int
35296main ()
35297{
35298
35299  ;
35300  return 0;
35301}
35302_ACEOF
35303if ac_fn_cxx_try_compile "$LINENO"; then :
35304  ac_cv_prog_cxx_g=yes
35305fi
35306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35307fi
35308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35309fi
35310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35311   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35312fi
35313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35314$as_echo "$ac_cv_prog_cxx_g" >&6; }
35315if test "$ac_test_CXXFLAGS" = set; then
35316  CXXFLAGS=$ac_save_CXXFLAGS
35317elif test $ac_cv_prog_cxx_g = yes; then
35318  if test "$GXX" = yes; then
35319    CXXFLAGS="-g -O2"
35320  else
35321    CXXFLAGS="-g"
35322  fi
35323else
35324  if test "$GXX" = yes; then
35325    CXXFLAGS="-O2"
35326  else
35327    CXXFLAGS=
35328  fi
35329fi
35330ac_ext=cpp
35331ac_cpp='$CXXCPP $CPPFLAGS'
35332ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35333ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35334ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35335
35336
35337  # This is the compiler version number on the form X.Y[.Z]
35338
35339
35340
35341
35342  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35343    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35344$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35345    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35346$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35347  fi
35348
35349  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35350  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35351    { $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
35352$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;}
35353  fi
35354
35355  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35356    { $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
35357$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35358  fi
35359
35360  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35361
35362
35363  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413    # Execute function body
35414
35415  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35416  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35417
35418  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35419    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35420  fi
35421
35422  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35423    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35424  fi
35425
35426  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35427  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35428
35429  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35430    :
35431
35432  else
35433    :
35434
35435          { $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
35436$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35437
35438
35439  fi
35440
35441
35442
35443
35444
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454  fi
35455
35456  #
35457  # Setup the preprocessor (CPP and CXXCPP)
35458  #
35459  ac_ext=c
35460ac_cpp='$CPP $CPPFLAGS'
35461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35463ac_compiler_gnu=$ac_cv_c_compiler_gnu
35464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35465$as_echo_n "checking how to run the C preprocessor... " >&6; }
35466# On Suns, sometimes $CPP names a directory.
35467if test -n "$CPP" && test -d "$CPP"; then
35468  CPP=
35469fi
35470if test -z "$CPP"; then
35471  if ${ac_cv_prog_CPP+:} false; then :
35472  $as_echo_n "(cached) " >&6
35473else
35474      # Double quotes because CPP needs to be expanded
35475    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35476    do
35477      ac_preproc_ok=false
35478for ac_c_preproc_warn_flag in '' yes
35479do
35480  # Use a header file that comes with gcc, so configuring glibc
35481  # with a fresh cross-compiler works.
35482  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35483  # <limits.h> exists even on freestanding compilers.
35484  # On the NeXT, cc -E runs the code through the compiler's parser,
35485  # not just through cpp. "Syntax error" is here to catch this case.
35486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35487/* end confdefs.h.  */
35488#ifdef __STDC__
35489# include <limits.h>
35490#else
35491# include <assert.h>
35492#endif
35493		     Syntax error
35494_ACEOF
35495if ac_fn_c_try_cpp "$LINENO"; then :
35496
35497else
35498  # Broken: fails on valid input.
35499continue
35500fi
35501rm -f conftest.err conftest.i conftest.$ac_ext
35502
35503  # OK, works on sane cases.  Now check whether nonexistent headers
35504  # can be detected and how.
35505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35506/* end confdefs.h.  */
35507#include <ac_nonexistent.h>
35508_ACEOF
35509if ac_fn_c_try_cpp "$LINENO"; then :
35510  # Broken: success on invalid input.
35511continue
35512else
35513  # Passes both tests.
35514ac_preproc_ok=:
35515break
35516fi
35517rm -f conftest.err conftest.i conftest.$ac_ext
35518
35519done
35520# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35521rm -f conftest.i conftest.err conftest.$ac_ext
35522if $ac_preproc_ok; then :
35523  break
35524fi
35525
35526    done
35527    ac_cv_prog_CPP=$CPP
35528
35529fi
35530  CPP=$ac_cv_prog_CPP
35531else
35532  ac_cv_prog_CPP=$CPP
35533fi
35534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35535$as_echo "$CPP" >&6; }
35536ac_preproc_ok=false
35537for ac_c_preproc_warn_flag in '' yes
35538do
35539  # Use a header file that comes with gcc, so configuring glibc
35540  # with a fresh cross-compiler works.
35541  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35542  # <limits.h> exists even on freestanding compilers.
35543  # On the NeXT, cc -E runs the code through the compiler's parser,
35544  # not just through cpp. "Syntax error" is here to catch this case.
35545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35546/* end confdefs.h.  */
35547#ifdef __STDC__
35548# include <limits.h>
35549#else
35550# include <assert.h>
35551#endif
35552		     Syntax error
35553_ACEOF
35554if ac_fn_c_try_cpp "$LINENO"; then :
35555
35556else
35557  # Broken: fails on valid input.
35558continue
35559fi
35560rm -f conftest.err conftest.i conftest.$ac_ext
35561
35562  # OK, works on sane cases.  Now check whether nonexistent headers
35563  # can be detected and how.
35564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35565/* end confdefs.h.  */
35566#include <ac_nonexistent.h>
35567_ACEOF
35568if ac_fn_c_try_cpp "$LINENO"; then :
35569  # Broken: success on invalid input.
35570continue
35571else
35572  # Passes both tests.
35573ac_preproc_ok=:
35574break
35575fi
35576rm -f conftest.err conftest.i conftest.$ac_ext
35577
35578done
35579# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35580rm -f conftest.i conftest.err conftest.$ac_ext
35581if $ac_preproc_ok; then :
35582
35583else
35584  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35586as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35587See \`config.log' for more details" "$LINENO" 5; }
35588fi
35589
35590ac_ext=cpp
35591ac_cpp='$CXXCPP $CPPFLAGS'
35592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35595
35596
35597  # Only process if variable expands to non-empty
35598
35599  if test "x$CPP" != x; then
35600    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35601
35602  # First separate the path from the arguments. This will split at the first
35603  # space.
35604  complete="$CPP"
35605  path="${complete%% *}"
35606  tmp="$complete EOL"
35607  arguments="${tmp#* }"
35608
35609  # Input might be given as Windows format, start by converting to
35610  # unix format.
35611  new_path=`$CYGPATH -u "$path"`
35612
35613  # Now try to locate executable using which
35614  new_path=`$WHICH "$new_path" 2> /dev/null`
35615  # bat and cmd files are not always considered executable in cygwin causing which
35616  # to not find them
35617  if test "x$new_path" = x \
35618      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35619      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35620    new_path=`$CYGPATH -u "$path"`
35621  fi
35622  if test "x$new_path" = x; then
35623    # Oops. Which didn't find the executable.
35624    # The splitting of arguments from the executable at a space might have been incorrect,
35625    # since paths with space are more likely in Windows. Give it another try with the whole
35626    # argument.
35627    path="$complete"
35628    arguments="EOL"
35629    new_path=`$CYGPATH -u "$path"`
35630    new_path=`$WHICH "$new_path" 2> /dev/null`
35631    # bat and cmd files are not always considered executable in cygwin causing which
35632    # to not find them
35633    if test "x$new_path" = x \
35634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35636      new_path=`$CYGPATH -u "$path"`
35637    fi
35638    if test "x$new_path" = x; then
35639      # It's still not found. Now this is an unrecoverable error.
35640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35641$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35642      has_space=`$ECHO "$complete" | $GREP " "`
35643      if test "x$has_space" != x; then
35644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35646      fi
35647      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35648    fi
35649  fi
35650
35651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35654  # "foo.exe" is OK but "foo" is an error.
35655  #
35656  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35657  # It is also a way to make sure we got the proper file name for the real test later on.
35658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35659  if test "x$test_shortpath" = x; then
35660    # Short path failed, file does not exist as specified.
35661    # Try adding .exe or .cmd
35662    if test -f "${new_path}.exe"; then
35663      input_to_shortpath="${new_path}.exe"
35664    elif test -f "${new_path}.cmd"; then
35665      input_to_shortpath="${new_path}.cmd"
35666    else
35667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35668$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35669      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35670$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35671      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35672    fi
35673  else
35674    input_to_shortpath="$new_path"
35675  fi
35676
35677  # Call helper function which possibly converts this using DOS-style short mode.
35678  # If so, the updated path is stored in $new_path.
35679  new_path="$input_to_shortpath"
35680
35681  input_path="$input_to_shortpath"
35682  # Check if we need to convert this using DOS-style short mode. If the path
35683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35684  # take no chances and rewrite it.
35685  # Note: m4 eats our [], so we need to use [ and ] instead.
35686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35687  if test "x$has_forbidden_chars" != x; then
35688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35692      # Going to short mode and back again did indeed matter. Since short mode is
35693      # case insensitive, let's make it lowercase to improve readability.
35694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35695      # Now convert it back to Unix-style (cygpath)
35696      input_path=`$CYGPATH -u "$shortmode_path"`
35697      new_path="$input_path"
35698    fi
35699  fi
35700
35701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35702  if test "x$test_cygdrive_prefix" = x; then
35703    # As a simple fix, exclude /usr/bin since it's not a real path.
35704    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35706      # a path prefixed by /cygdrive for fixpath to work.
35707      new_path="$CYGWIN_ROOT_PATH$input_path"
35708    fi
35709  fi
35710
35711  # remove trailing .exe if any
35712  new_path="${new_path/%.exe/}"
35713
35714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35715
35716  # First separate the path from the arguments. This will split at the first
35717  # space.
35718  complete="$CPP"
35719  path="${complete%% *}"
35720  tmp="$complete EOL"
35721  arguments="${tmp#* }"
35722
35723  # Input might be given as Windows format, start by converting to
35724  # unix format.
35725  new_path="$path"
35726
35727  windows_path="$new_path"
35728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35729    unix_path=`$CYGPATH -u "$windows_path"`
35730    new_path="$unix_path"
35731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35733    new_path="$unix_path"
35734  fi
35735
35736
35737  # Now try to locate executable using which
35738  new_path=`$WHICH "$new_path" 2> /dev/null`
35739
35740  if test "x$new_path" = x; then
35741    # Oops. Which didn't find the executable.
35742    # The splitting of arguments from the executable at a space might have been incorrect,
35743    # since paths with space are more likely in Windows. Give it another try with the whole
35744    # argument.
35745    path="$complete"
35746    arguments="EOL"
35747    new_path="$path"
35748
35749  windows_path="$new_path"
35750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35751    unix_path=`$CYGPATH -u "$windows_path"`
35752    new_path="$unix_path"
35753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35755    new_path="$unix_path"
35756  fi
35757
35758
35759    new_path=`$WHICH "$new_path" 2> /dev/null`
35760    # bat and cmd files are not always considered executable in MSYS causing which
35761    # to not find them
35762    if test "x$new_path" = x \
35763        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35764        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35765      new_path="$path"
35766
35767  windows_path="$new_path"
35768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35769    unix_path=`$CYGPATH -u "$windows_path"`
35770    new_path="$unix_path"
35771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35773    new_path="$unix_path"
35774  fi
35775
35776    fi
35777
35778    if test "x$new_path" = x; then
35779      # It's still not found. Now this is an unrecoverable error.
35780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35781$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35782      has_space=`$ECHO "$complete" | $GREP " "`
35783      if test "x$has_space" != x; then
35784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35786      fi
35787      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35788    fi
35789  fi
35790
35791  # Now new_path has a complete unix path to the binary
35792  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35793    # Keep paths in /bin as-is, but remove trailing .exe if any
35794    new_path="${new_path/%.exe/}"
35795    # Do not save /bin paths to all_fixpath_prefixes!
35796  else
35797    # Not in mixed or Windows style, start by that.
35798    new_path=`cmd //c echo $new_path`
35799
35800  input_path="$new_path"
35801  # Check if we need to convert this using DOS-style short mode. If the path
35802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35803  # take no chances and rewrite it.
35804  # Note: m4 eats our [], so we need to use [ and ] instead.
35805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35806  if test "x$has_forbidden_chars" != x; then
35807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35809  fi
35810
35811    # Output is in $new_path
35812
35813  windows_path="$new_path"
35814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35815    unix_path=`$CYGPATH -u "$windows_path"`
35816    new_path="$unix_path"
35817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35819    new_path="$unix_path"
35820  fi
35821
35822    # remove trailing .exe if any
35823    new_path="${new_path/%.exe/}"
35824
35825    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35826    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35827  fi
35828
35829    else
35830      # We're on a unix platform. Hooray! :)
35831      # First separate the path from the arguments. This will split at the first
35832      # space.
35833      complete="$CPP"
35834      path="${complete%% *}"
35835      tmp="$complete EOL"
35836      arguments="${tmp#* }"
35837
35838      # Cannot rely on the command "which" here since it doesn't always work.
35839      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35840      if test -z "$is_absolute_path"; then
35841        # Path to executable is not absolute. Find it.
35842        IFS_save="$IFS"
35843        IFS=:
35844        for p in $PATH; do
35845          if test -f "$p/$path" && test -x "$p/$path"; then
35846            new_path="$p/$path"
35847            break
35848          fi
35849        done
35850        IFS="$IFS_save"
35851      else
35852        # This is an absolute path, we can use it without further modifications.
35853        new_path="$path"
35854      fi
35855
35856      if test "x$new_path" = x; then
35857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35858$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35859        has_space=`$ECHO "$complete" | $GREP " "`
35860        if test "x$has_space" != x; then
35861          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35862$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35863        fi
35864        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35865      fi
35866    fi
35867
35868    # Now join together the path and the arguments once again
35869    if test "x$arguments" != xEOL; then
35870      new_complete="$new_path ${arguments% *}"
35871    else
35872      new_complete="$new_path"
35873    fi
35874
35875    if test "x$complete" != "x$new_complete"; then
35876      CPP="$new_complete"
35877      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35878$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35879    fi
35880  fi
35881
35882  ac_ext=cpp
35883ac_cpp='$CXXCPP $CPPFLAGS'
35884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35888$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35889if test -z "$CXXCPP"; then
35890  if ${ac_cv_prog_CXXCPP+:} false; then :
35891  $as_echo_n "(cached) " >&6
35892else
35893      # Double quotes because CXXCPP needs to be expanded
35894    for CXXCPP in "$CXX -E" "/lib/cpp"
35895    do
35896      ac_preproc_ok=false
35897for ac_cxx_preproc_warn_flag in '' yes
35898do
35899  # Use a header file that comes with gcc, so configuring glibc
35900  # with a fresh cross-compiler works.
35901  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35902  # <limits.h> exists even on freestanding compilers.
35903  # On the NeXT, cc -E runs the code through the compiler's parser,
35904  # not just through cpp. "Syntax error" is here to catch this case.
35905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35906/* end confdefs.h.  */
35907#ifdef __STDC__
35908# include <limits.h>
35909#else
35910# include <assert.h>
35911#endif
35912		     Syntax error
35913_ACEOF
35914if ac_fn_cxx_try_cpp "$LINENO"; then :
35915
35916else
35917  # Broken: fails on valid input.
35918continue
35919fi
35920rm -f conftest.err conftest.i conftest.$ac_ext
35921
35922  # OK, works on sane cases.  Now check whether nonexistent headers
35923  # can be detected and how.
35924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35925/* end confdefs.h.  */
35926#include <ac_nonexistent.h>
35927_ACEOF
35928if ac_fn_cxx_try_cpp "$LINENO"; then :
35929  # Broken: success on invalid input.
35930continue
35931else
35932  # Passes both tests.
35933ac_preproc_ok=:
35934break
35935fi
35936rm -f conftest.err conftest.i conftest.$ac_ext
35937
35938done
35939# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35940rm -f conftest.i conftest.err conftest.$ac_ext
35941if $ac_preproc_ok; then :
35942  break
35943fi
35944
35945    done
35946    ac_cv_prog_CXXCPP=$CXXCPP
35947
35948fi
35949  CXXCPP=$ac_cv_prog_CXXCPP
35950else
35951  ac_cv_prog_CXXCPP=$CXXCPP
35952fi
35953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35954$as_echo "$CXXCPP" >&6; }
35955ac_preproc_ok=false
35956for ac_cxx_preproc_warn_flag in '' yes
35957do
35958  # Use a header file that comes with gcc, so configuring glibc
35959  # with a fresh cross-compiler works.
35960  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35961  # <limits.h> exists even on freestanding compilers.
35962  # On the NeXT, cc -E runs the code through the compiler's parser,
35963  # not just through cpp. "Syntax error" is here to catch this case.
35964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35965/* end confdefs.h.  */
35966#ifdef __STDC__
35967# include <limits.h>
35968#else
35969# include <assert.h>
35970#endif
35971		     Syntax error
35972_ACEOF
35973if ac_fn_cxx_try_cpp "$LINENO"; then :
35974
35975else
35976  # Broken: fails on valid input.
35977continue
35978fi
35979rm -f conftest.err conftest.i conftest.$ac_ext
35980
35981  # OK, works on sane cases.  Now check whether nonexistent headers
35982  # can be detected and how.
35983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35984/* end confdefs.h.  */
35985#include <ac_nonexistent.h>
35986_ACEOF
35987if ac_fn_cxx_try_cpp "$LINENO"; then :
35988  # Broken: success on invalid input.
35989continue
35990else
35991  # Passes both tests.
35992ac_preproc_ok=:
35993break
35994fi
35995rm -f conftest.err conftest.i conftest.$ac_ext
35996
35997done
35998# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35999rm -f conftest.i conftest.err conftest.$ac_ext
36000if $ac_preproc_ok; then :
36001
36002else
36003  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36005as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36006See \`config.log' for more details" "$LINENO" 5; }
36007fi
36008
36009ac_ext=cpp
36010ac_cpp='$CXXCPP $CPPFLAGS'
36011ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36012ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36013ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36014
36015
36016  # Only process if variable expands to non-empty
36017
36018  if test "x$CXXCPP" != x; then
36019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36020
36021  # First separate the path from the arguments. This will split at the first
36022  # space.
36023  complete="$CXXCPP"
36024  path="${complete%% *}"
36025  tmp="$complete EOL"
36026  arguments="${tmp#* }"
36027
36028  # Input might be given as Windows format, start by converting to
36029  # unix format.
36030  new_path=`$CYGPATH -u "$path"`
36031
36032  # Now try to locate executable using which
36033  new_path=`$WHICH "$new_path" 2> /dev/null`
36034  # bat and cmd files are not always considered executable in cygwin causing which
36035  # to not find them
36036  if test "x$new_path" = x \
36037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36039    new_path=`$CYGPATH -u "$path"`
36040  fi
36041  if test "x$new_path" = x; then
36042    # Oops. Which didn't find the executable.
36043    # The splitting of arguments from the executable at a space might have been incorrect,
36044    # since paths with space are more likely in Windows. Give it another try with the whole
36045    # argument.
36046    path="$complete"
36047    arguments="EOL"
36048    new_path=`$CYGPATH -u "$path"`
36049    new_path=`$WHICH "$new_path" 2> /dev/null`
36050    # bat and cmd files are not always considered executable in cygwin causing which
36051    # to not find them
36052    if test "x$new_path" = x \
36053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36055      new_path=`$CYGPATH -u "$path"`
36056    fi
36057    if test "x$new_path" = x; then
36058      # It's still not found. Now this is an unrecoverable error.
36059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36060$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36061      has_space=`$ECHO "$complete" | $GREP " "`
36062      if test "x$has_space" != x; then
36063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36065      fi
36066      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36067    fi
36068  fi
36069
36070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36073  # "foo.exe" is OK but "foo" is an error.
36074  #
36075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36076  # It is also a way to make sure we got the proper file name for the real test later on.
36077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36078  if test "x$test_shortpath" = x; then
36079    # Short path failed, file does not exist as specified.
36080    # Try adding .exe or .cmd
36081    if test -f "${new_path}.exe"; then
36082      input_to_shortpath="${new_path}.exe"
36083    elif test -f "${new_path}.cmd"; then
36084      input_to_shortpath="${new_path}.cmd"
36085    else
36086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36087$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36090      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36091    fi
36092  else
36093    input_to_shortpath="$new_path"
36094  fi
36095
36096  # Call helper function which possibly converts this using DOS-style short mode.
36097  # If so, the updated path is stored in $new_path.
36098  new_path="$input_to_shortpath"
36099
36100  input_path="$input_to_shortpath"
36101  # Check if we need to convert this using DOS-style short mode. If the path
36102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36103  # take no chances and rewrite it.
36104  # Note: m4 eats our [], so we need to use [ and ] instead.
36105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36106  if test "x$has_forbidden_chars" != x; then
36107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36111      # Going to short mode and back again did indeed matter. Since short mode is
36112      # case insensitive, let's make it lowercase to improve readability.
36113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36114      # Now convert it back to Unix-style (cygpath)
36115      input_path=`$CYGPATH -u "$shortmode_path"`
36116      new_path="$input_path"
36117    fi
36118  fi
36119
36120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36121  if test "x$test_cygdrive_prefix" = x; then
36122    # As a simple fix, exclude /usr/bin since it's not a real path.
36123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36125      # a path prefixed by /cygdrive for fixpath to work.
36126      new_path="$CYGWIN_ROOT_PATH$input_path"
36127    fi
36128  fi
36129
36130  # remove trailing .exe if any
36131  new_path="${new_path/%.exe/}"
36132
36133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36134
36135  # First separate the path from the arguments. This will split at the first
36136  # space.
36137  complete="$CXXCPP"
36138  path="${complete%% *}"
36139  tmp="$complete EOL"
36140  arguments="${tmp#* }"
36141
36142  # Input might be given as Windows format, start by converting to
36143  # unix format.
36144  new_path="$path"
36145
36146  windows_path="$new_path"
36147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36148    unix_path=`$CYGPATH -u "$windows_path"`
36149    new_path="$unix_path"
36150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36152    new_path="$unix_path"
36153  fi
36154
36155
36156  # Now try to locate executable using which
36157  new_path=`$WHICH "$new_path" 2> /dev/null`
36158
36159  if test "x$new_path" = x; then
36160    # Oops. Which didn't find the executable.
36161    # The splitting of arguments from the executable at a space might have been incorrect,
36162    # since paths with space are more likely in Windows. Give it another try with the whole
36163    # argument.
36164    path="$complete"
36165    arguments="EOL"
36166    new_path="$path"
36167
36168  windows_path="$new_path"
36169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36170    unix_path=`$CYGPATH -u "$windows_path"`
36171    new_path="$unix_path"
36172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36174    new_path="$unix_path"
36175  fi
36176
36177
36178    new_path=`$WHICH "$new_path" 2> /dev/null`
36179    # bat and cmd files are not always considered executable in MSYS causing which
36180    # to not find them
36181    if test "x$new_path" = x \
36182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36184      new_path="$path"
36185
36186  windows_path="$new_path"
36187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36188    unix_path=`$CYGPATH -u "$windows_path"`
36189    new_path="$unix_path"
36190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36192    new_path="$unix_path"
36193  fi
36194
36195    fi
36196
36197    if test "x$new_path" = x; then
36198      # It's still not found. Now this is an unrecoverable error.
36199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36200$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36201      has_space=`$ECHO "$complete" | $GREP " "`
36202      if test "x$has_space" != x; then
36203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36205      fi
36206      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36207    fi
36208  fi
36209
36210  # Now new_path has a complete unix path to the binary
36211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36212    # Keep paths in /bin as-is, but remove trailing .exe if any
36213    new_path="${new_path/%.exe/}"
36214    # Do not save /bin paths to all_fixpath_prefixes!
36215  else
36216    # Not in mixed or Windows style, start by that.
36217    new_path=`cmd //c echo $new_path`
36218
36219  input_path="$new_path"
36220  # Check if we need to convert this using DOS-style short mode. If the path
36221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36222  # take no chances and rewrite it.
36223  # Note: m4 eats our [], so we need to use [ and ] instead.
36224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36225  if test "x$has_forbidden_chars" != x; then
36226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36228  fi
36229
36230    # Output is in $new_path
36231
36232  windows_path="$new_path"
36233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36234    unix_path=`$CYGPATH -u "$windows_path"`
36235    new_path="$unix_path"
36236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36238    new_path="$unix_path"
36239  fi
36240
36241    # remove trailing .exe if any
36242    new_path="${new_path/%.exe/}"
36243
36244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36246  fi
36247
36248    else
36249      # We're on a unix platform. Hooray! :)
36250      # First separate the path from the arguments. This will split at the first
36251      # space.
36252      complete="$CXXCPP"
36253      path="${complete%% *}"
36254      tmp="$complete EOL"
36255      arguments="${tmp#* }"
36256
36257      # Cannot rely on the command "which" here since it doesn't always work.
36258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36259      if test -z "$is_absolute_path"; then
36260        # Path to executable is not absolute. Find it.
36261        IFS_save="$IFS"
36262        IFS=:
36263        for p in $PATH; do
36264          if test -f "$p/$path" && test -x "$p/$path"; then
36265            new_path="$p/$path"
36266            break
36267          fi
36268        done
36269        IFS="$IFS_save"
36270      else
36271        # This is an absolute path, we can use it without further modifications.
36272        new_path="$path"
36273      fi
36274
36275      if test "x$new_path" = x; then
36276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36277$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36278        has_space=`$ECHO "$complete" | $GREP " "`
36279        if test "x$has_space" != x; then
36280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36282        fi
36283        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36284      fi
36285    fi
36286
36287    # Now join together the path and the arguments once again
36288    if test "x$arguments" != xEOL; then
36289      new_complete="$new_path ${arguments% *}"
36290    else
36291      new_complete="$new_path"
36292    fi
36293
36294    if test "x$complete" != "x$new_complete"; then
36295      CXXCPP="$new_complete"
36296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36297$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36298    fi
36299  fi
36300
36301
36302  #
36303  # Setup the linker (LD)
36304  #
36305  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36306    # In the Microsoft toolchain we have a separate LD command "link".
36307    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36308    # a cygwin program for something completely different.
36309    # Extract the first word of "link", so it can be a program name with args.
36310set dummy link; ac_word=$2
36311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36312$as_echo_n "checking for $ac_word... " >&6; }
36313if ${ac_cv_prog_LD+:} false; then :
36314  $as_echo_n "(cached) " >&6
36315else
36316  if test -n "$LD"; then
36317  ac_cv_prog_LD="$LD" # Let the user override the test.
36318else
36319  ac_prog_rejected=no
36320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36321for as_dir in $PATH
36322do
36323  IFS=$as_save_IFS
36324  test -z "$as_dir" && as_dir=.
36325    for ac_exec_ext in '' $ac_executable_extensions; do
36326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36327    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36328       ac_prog_rejected=yes
36329       continue
36330     fi
36331    ac_cv_prog_LD="link"
36332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36333    break 2
36334  fi
36335done
36336  done
36337IFS=$as_save_IFS
36338
36339if test $ac_prog_rejected = yes; then
36340  # We found a bogon in the path, so make sure we never use it.
36341  set dummy $ac_cv_prog_LD
36342  shift
36343  if test $# != 0; then
36344    # We chose a different compiler from the bogus one.
36345    # However, it has the same basename, so the bogon will be chosen
36346    # first if we set LD to just the basename; use the full file name.
36347    shift
36348    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36349  fi
36350fi
36351fi
36352fi
36353LD=$ac_cv_prog_LD
36354if test -n "$LD"; then
36355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36356$as_echo "$LD" >&6; }
36357else
36358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36359$as_echo "no" >&6; }
36360fi
36361
36362
36363
36364  # Only process if variable expands to non-empty
36365
36366  if test "x$LD" != x; then
36367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36368
36369  # First separate the path from the arguments. This will split at the first
36370  # space.
36371  complete="$LD"
36372  path="${complete%% *}"
36373  tmp="$complete EOL"
36374  arguments="${tmp#* }"
36375
36376  # Input might be given as Windows format, start by converting to
36377  # unix format.
36378  new_path=`$CYGPATH -u "$path"`
36379
36380  # Now try to locate executable using which
36381  new_path=`$WHICH "$new_path" 2> /dev/null`
36382  # bat and cmd files are not always considered executable in cygwin causing which
36383  # to not find them
36384  if test "x$new_path" = x \
36385      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36386      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36387    new_path=`$CYGPATH -u "$path"`
36388  fi
36389  if test "x$new_path" = x; then
36390    # Oops. Which didn't find the executable.
36391    # The splitting of arguments from the executable at a space might have been incorrect,
36392    # since paths with space are more likely in Windows. Give it another try with the whole
36393    # argument.
36394    path="$complete"
36395    arguments="EOL"
36396    new_path=`$CYGPATH -u "$path"`
36397    new_path=`$WHICH "$new_path" 2> /dev/null`
36398    # bat and cmd files are not always considered executable in cygwin causing which
36399    # to not find them
36400    if test "x$new_path" = x \
36401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36403      new_path=`$CYGPATH -u "$path"`
36404    fi
36405    if test "x$new_path" = x; then
36406      # It's still not found. Now this is an unrecoverable error.
36407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36408$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36409      has_space=`$ECHO "$complete" | $GREP " "`
36410      if test "x$has_space" != x; then
36411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36413      fi
36414      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36415    fi
36416  fi
36417
36418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36421  # "foo.exe" is OK but "foo" is an error.
36422  #
36423  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36424  # It is also a way to make sure we got the proper file name for the real test later on.
36425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36426  if test "x$test_shortpath" = x; then
36427    # Short path failed, file does not exist as specified.
36428    # Try adding .exe or .cmd
36429    if test -f "${new_path}.exe"; then
36430      input_to_shortpath="${new_path}.exe"
36431    elif test -f "${new_path}.cmd"; then
36432      input_to_shortpath="${new_path}.cmd"
36433    else
36434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36435$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36436      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36437$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36438      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36439    fi
36440  else
36441    input_to_shortpath="$new_path"
36442  fi
36443
36444  # Call helper function which possibly converts this using DOS-style short mode.
36445  # If so, the updated path is stored in $new_path.
36446  new_path="$input_to_shortpath"
36447
36448  input_path="$input_to_shortpath"
36449  # Check if we need to convert this using DOS-style short mode. If the path
36450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36451  # take no chances and rewrite it.
36452  # Note: m4 eats our [], so we need to use [ and ] instead.
36453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36454  if test "x$has_forbidden_chars" != x; then
36455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36459      # Going to short mode and back again did indeed matter. Since short mode is
36460      # case insensitive, let's make it lowercase to improve readability.
36461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36462      # Now convert it back to Unix-style (cygpath)
36463      input_path=`$CYGPATH -u "$shortmode_path"`
36464      new_path="$input_path"
36465    fi
36466  fi
36467
36468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36469  if test "x$test_cygdrive_prefix" = x; then
36470    # As a simple fix, exclude /usr/bin since it's not a real path.
36471    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36473      # a path prefixed by /cygdrive for fixpath to work.
36474      new_path="$CYGWIN_ROOT_PATH$input_path"
36475    fi
36476  fi
36477
36478  # remove trailing .exe if any
36479  new_path="${new_path/%.exe/}"
36480
36481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36482
36483  # First separate the path from the arguments. This will split at the first
36484  # space.
36485  complete="$LD"
36486  path="${complete%% *}"
36487  tmp="$complete EOL"
36488  arguments="${tmp#* }"
36489
36490  # Input might be given as Windows format, start by converting to
36491  # unix format.
36492  new_path="$path"
36493
36494  windows_path="$new_path"
36495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36496    unix_path=`$CYGPATH -u "$windows_path"`
36497    new_path="$unix_path"
36498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36500    new_path="$unix_path"
36501  fi
36502
36503
36504  # Now try to locate executable using which
36505  new_path=`$WHICH "$new_path" 2> /dev/null`
36506
36507  if test "x$new_path" = x; then
36508    # Oops. Which didn't find the executable.
36509    # The splitting of arguments from the executable at a space might have been incorrect,
36510    # since paths with space are more likely in Windows. Give it another try with the whole
36511    # argument.
36512    path="$complete"
36513    arguments="EOL"
36514    new_path="$path"
36515
36516  windows_path="$new_path"
36517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36518    unix_path=`$CYGPATH -u "$windows_path"`
36519    new_path="$unix_path"
36520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36522    new_path="$unix_path"
36523  fi
36524
36525
36526    new_path=`$WHICH "$new_path" 2> /dev/null`
36527    # bat and cmd files are not always considered executable in MSYS causing which
36528    # to not find them
36529    if test "x$new_path" = x \
36530        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36531        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36532      new_path="$path"
36533
36534  windows_path="$new_path"
36535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36536    unix_path=`$CYGPATH -u "$windows_path"`
36537    new_path="$unix_path"
36538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36540    new_path="$unix_path"
36541  fi
36542
36543    fi
36544
36545    if test "x$new_path" = x; then
36546      # It's still not found. Now this is an unrecoverable error.
36547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36548$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36549      has_space=`$ECHO "$complete" | $GREP " "`
36550      if test "x$has_space" != x; then
36551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36553      fi
36554      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36555    fi
36556  fi
36557
36558  # Now new_path has a complete unix path to the binary
36559  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36560    # Keep paths in /bin as-is, but remove trailing .exe if any
36561    new_path="${new_path/%.exe/}"
36562    # Do not save /bin paths to all_fixpath_prefixes!
36563  else
36564    # Not in mixed or Windows style, start by that.
36565    new_path=`cmd //c echo $new_path`
36566
36567  input_path="$new_path"
36568  # Check if we need to convert this using DOS-style short mode. If the path
36569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36570  # take no chances and rewrite it.
36571  # Note: m4 eats our [], so we need to use [ and ] instead.
36572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36573  if test "x$has_forbidden_chars" != x; then
36574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36576  fi
36577
36578    # Output is in $new_path
36579
36580  windows_path="$new_path"
36581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36582    unix_path=`$CYGPATH -u "$windows_path"`
36583    new_path="$unix_path"
36584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36586    new_path="$unix_path"
36587  fi
36588
36589    # remove trailing .exe if any
36590    new_path="${new_path/%.exe/}"
36591
36592    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36593    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36594  fi
36595
36596    else
36597      # We're on a unix platform. Hooray! :)
36598      # First separate the path from the arguments. This will split at the first
36599      # space.
36600      complete="$LD"
36601      path="${complete%% *}"
36602      tmp="$complete EOL"
36603      arguments="${tmp#* }"
36604
36605      # Cannot rely on the command "which" here since it doesn't always work.
36606      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36607      if test -z "$is_absolute_path"; then
36608        # Path to executable is not absolute. Find it.
36609        IFS_save="$IFS"
36610        IFS=:
36611        for p in $PATH; do
36612          if test -f "$p/$path" && test -x "$p/$path"; then
36613            new_path="$p/$path"
36614            break
36615          fi
36616        done
36617        IFS="$IFS_save"
36618      else
36619        # This is an absolute path, we can use it without further modifications.
36620        new_path="$path"
36621      fi
36622
36623      if test "x$new_path" = x; then
36624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36625$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36626        has_space=`$ECHO "$complete" | $GREP " "`
36627        if test "x$has_space" != x; then
36628          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36629$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36630        fi
36631        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36632      fi
36633    fi
36634
36635    # Now join together the path and the arguments once again
36636    if test "x$arguments" != xEOL; then
36637      new_complete="$new_path ${arguments% *}"
36638    else
36639      new_complete="$new_path"
36640    fi
36641
36642    if test "x$complete" != "x$new_complete"; then
36643      LD="$new_complete"
36644      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36645$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36646    fi
36647  fi
36648
36649    # Verify that we indeed succeeded with this trick.
36650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36651$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36652    "$LD" --version > /dev/null
36653    if test $? -eq 0 ; then
36654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36655$as_echo "no" >&6; }
36656      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36657    else
36658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36659$as_echo "yes" >&6; }
36660    fi
36661    LDCXX="$LD"
36662  else
36663    # All other toolchains use the compiler to link.
36664    LD="$CC"
36665    LDCXX="$CXX"
36666  fi
36667
36668  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36669
36670
36671  #
36672  # Setup the assembler (AS)
36673  #
36674  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36675
36676
36677  # Publish this variable in the help.
36678
36679
36680  if [ -z "${AS+x}" ]; then
36681    # The variable is not set by user, try to locate tool using the code snippet
36682    for ac_prog in as
36683do
36684  # Extract the first word of "$ac_prog", so it can be a program name with args.
36685set dummy $ac_prog; ac_word=$2
36686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36687$as_echo_n "checking for $ac_word... " >&6; }
36688if ${ac_cv_path_AS+:} false; then :
36689  $as_echo_n "(cached) " >&6
36690else
36691  case $AS in
36692  [\\/]* | ?:[\\/]*)
36693  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36694  ;;
36695  *)
36696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36697for as_dir in $PATH
36698do
36699  IFS=$as_save_IFS
36700  test -z "$as_dir" && as_dir=.
36701    for ac_exec_ext in '' $ac_executable_extensions; do
36702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36703    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36705    break 2
36706  fi
36707done
36708  done
36709IFS=$as_save_IFS
36710
36711  ;;
36712esac
36713fi
36714AS=$ac_cv_path_AS
36715if test -n "$AS"; then
36716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36717$as_echo "$AS" >&6; }
36718else
36719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36720$as_echo "no" >&6; }
36721fi
36722
36723
36724  test -n "$AS" && break
36725done
36726
36727  else
36728    # The variable is set, but is it from the command line or the environment?
36729
36730    # Try to remove the string !AS! from our list.
36731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36732    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36733      # If it failed, the variable was not from the command line. Ignore it,
36734      # but warn the user (except for BASH, which is always set by the calling BASH).
36735      if test "xAS" != xBASH; then
36736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36737$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36738      fi
36739      # Try to locate tool using the code snippet
36740      for ac_prog in as
36741do
36742  # Extract the first word of "$ac_prog", so it can be a program name with args.
36743set dummy $ac_prog; ac_word=$2
36744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36745$as_echo_n "checking for $ac_word... " >&6; }
36746if ${ac_cv_path_AS+:} false; then :
36747  $as_echo_n "(cached) " >&6
36748else
36749  case $AS in
36750  [\\/]* | ?:[\\/]*)
36751  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36752  ;;
36753  *)
36754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36755for as_dir in $PATH
36756do
36757  IFS=$as_save_IFS
36758  test -z "$as_dir" && as_dir=.
36759    for ac_exec_ext in '' $ac_executable_extensions; do
36760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36761    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36763    break 2
36764  fi
36765done
36766  done
36767IFS=$as_save_IFS
36768
36769  ;;
36770esac
36771fi
36772AS=$ac_cv_path_AS
36773if test -n "$AS"; then
36774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36775$as_echo "$AS" >&6; }
36776else
36777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36778$as_echo "no" >&6; }
36779fi
36780
36781
36782  test -n "$AS" && break
36783done
36784
36785    else
36786      # If it succeeded, then it was overridden by the user. We will use it
36787      # for the tool.
36788
36789      # First remove it from the list of overridden variables, so we can test
36790      # for unknown variables in the end.
36791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36792
36793      # Check if we try to supply an empty value
36794      if test "x$AS" = x; then
36795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36796$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36798$as_echo_n "checking for AS... " >&6; }
36799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36800$as_echo "disabled" >&6; }
36801      else
36802        # Check if the provided tool contains a complete path.
36803        tool_specified="$AS"
36804        tool_basename="${tool_specified##*/}"
36805        if test "x$tool_basename" = "x$tool_specified"; then
36806          # A command without a complete path is provided, search $PATH.
36807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36808$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36809          # Extract the first word of "$tool_basename", so it can be a program name with args.
36810set dummy $tool_basename; ac_word=$2
36811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36812$as_echo_n "checking for $ac_word... " >&6; }
36813if ${ac_cv_path_AS+:} false; then :
36814  $as_echo_n "(cached) " >&6
36815else
36816  case $AS in
36817  [\\/]* | ?:[\\/]*)
36818  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36819  ;;
36820  *)
36821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36822for as_dir in $PATH
36823do
36824  IFS=$as_save_IFS
36825  test -z "$as_dir" && as_dir=.
36826    for ac_exec_ext in '' $ac_executable_extensions; do
36827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36828    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36830    break 2
36831  fi
36832done
36833  done
36834IFS=$as_save_IFS
36835
36836  ;;
36837esac
36838fi
36839AS=$ac_cv_path_AS
36840if test -n "$AS"; then
36841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36842$as_echo "$AS" >&6; }
36843else
36844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36845$as_echo "no" >&6; }
36846fi
36847
36848
36849          if test "x$AS" = x; then
36850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36851          fi
36852        else
36853          # Otherwise we believe it is a complete path. Use it as it is.
36854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36855$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36857$as_echo_n "checking for AS... " >&6; }
36858          if test ! -x "$tool_specified"; then
36859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36860$as_echo "not found" >&6; }
36861            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36862          fi
36863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36864$as_echo "$tool_specified" >&6; }
36865        fi
36866      fi
36867    fi
36868
36869  fi
36870
36871
36872
36873  # Only process if variable expands to non-empty
36874
36875  if test "x$AS" != x; then
36876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36877
36878  # First separate the path from the arguments. This will split at the first
36879  # space.
36880  complete="$AS"
36881  path="${complete%% *}"
36882  tmp="$complete EOL"
36883  arguments="${tmp#* }"
36884
36885  # Input might be given as Windows format, start by converting to
36886  # unix format.
36887  new_path=`$CYGPATH -u "$path"`
36888
36889  # Now try to locate executable using which
36890  new_path=`$WHICH "$new_path" 2> /dev/null`
36891  # bat and cmd files are not always considered executable in cygwin causing which
36892  # to not find them
36893  if test "x$new_path" = x \
36894      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36895      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36896    new_path=`$CYGPATH -u "$path"`
36897  fi
36898  if test "x$new_path" = x; then
36899    # Oops. Which didn't find the executable.
36900    # The splitting of arguments from the executable at a space might have been incorrect,
36901    # since paths with space are more likely in Windows. Give it another try with the whole
36902    # argument.
36903    path="$complete"
36904    arguments="EOL"
36905    new_path=`$CYGPATH -u "$path"`
36906    new_path=`$WHICH "$new_path" 2> /dev/null`
36907    # bat and cmd files are not always considered executable in cygwin causing which
36908    # to not find them
36909    if test "x$new_path" = x \
36910        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36911        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36912      new_path=`$CYGPATH -u "$path"`
36913    fi
36914    if test "x$new_path" = x; then
36915      # It's still not found. Now this is an unrecoverable error.
36916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36917$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36918      has_space=`$ECHO "$complete" | $GREP " "`
36919      if test "x$has_space" != x; then
36920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36922      fi
36923      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36924    fi
36925  fi
36926
36927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36930  # "foo.exe" is OK but "foo" is an error.
36931  #
36932  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36933  # It is also a way to make sure we got the proper file name for the real test later on.
36934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36935  if test "x$test_shortpath" = x; then
36936    # Short path failed, file does not exist as specified.
36937    # Try adding .exe or .cmd
36938    if test -f "${new_path}.exe"; then
36939      input_to_shortpath="${new_path}.exe"
36940    elif test -f "${new_path}.cmd"; then
36941      input_to_shortpath="${new_path}.cmd"
36942    else
36943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36944$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36945      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36946$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36947      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36948    fi
36949  else
36950    input_to_shortpath="$new_path"
36951  fi
36952
36953  # Call helper function which possibly converts this using DOS-style short mode.
36954  # If so, the updated path is stored in $new_path.
36955  new_path="$input_to_shortpath"
36956
36957  input_path="$input_to_shortpath"
36958  # Check if we need to convert this using DOS-style short mode. If the path
36959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36960  # take no chances and rewrite it.
36961  # Note: m4 eats our [], so we need to use [ and ] instead.
36962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36963  if test "x$has_forbidden_chars" != x; then
36964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36968      # Going to short mode and back again did indeed matter. Since short mode is
36969      # case insensitive, let's make it lowercase to improve readability.
36970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36971      # Now convert it back to Unix-style (cygpath)
36972      input_path=`$CYGPATH -u "$shortmode_path"`
36973      new_path="$input_path"
36974    fi
36975  fi
36976
36977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36978  if test "x$test_cygdrive_prefix" = x; then
36979    # As a simple fix, exclude /usr/bin since it's not a real path.
36980    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36982      # a path prefixed by /cygdrive for fixpath to work.
36983      new_path="$CYGWIN_ROOT_PATH$input_path"
36984    fi
36985  fi
36986
36987  # remove trailing .exe if any
36988  new_path="${new_path/%.exe/}"
36989
36990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36991
36992  # First separate the path from the arguments. This will split at the first
36993  # space.
36994  complete="$AS"
36995  path="${complete%% *}"
36996  tmp="$complete EOL"
36997  arguments="${tmp#* }"
36998
36999  # Input might be given as Windows format, start by converting to
37000  # unix format.
37001  new_path="$path"
37002
37003  windows_path="$new_path"
37004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37005    unix_path=`$CYGPATH -u "$windows_path"`
37006    new_path="$unix_path"
37007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37009    new_path="$unix_path"
37010  fi
37011
37012
37013  # Now try to locate executable using which
37014  new_path=`$WHICH "$new_path" 2> /dev/null`
37015
37016  if test "x$new_path" = x; then
37017    # Oops. Which didn't find the executable.
37018    # The splitting of arguments from the executable at a space might have been incorrect,
37019    # since paths with space are more likely in Windows. Give it another try with the whole
37020    # argument.
37021    path="$complete"
37022    arguments="EOL"
37023    new_path="$path"
37024
37025  windows_path="$new_path"
37026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37027    unix_path=`$CYGPATH -u "$windows_path"`
37028    new_path="$unix_path"
37029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37031    new_path="$unix_path"
37032  fi
37033
37034
37035    new_path=`$WHICH "$new_path" 2> /dev/null`
37036    # bat and cmd files are not always considered executable in MSYS causing which
37037    # to not find them
37038    if test "x$new_path" = x \
37039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37041      new_path="$path"
37042
37043  windows_path="$new_path"
37044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37045    unix_path=`$CYGPATH -u "$windows_path"`
37046    new_path="$unix_path"
37047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37049    new_path="$unix_path"
37050  fi
37051
37052    fi
37053
37054    if test "x$new_path" = x; then
37055      # It's still not found. Now this is an unrecoverable error.
37056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37057$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37058      has_space=`$ECHO "$complete" | $GREP " "`
37059      if test "x$has_space" != x; then
37060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37062      fi
37063      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37064    fi
37065  fi
37066
37067  # Now new_path has a complete unix path to the binary
37068  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37069    # Keep paths in /bin as-is, but remove trailing .exe if any
37070    new_path="${new_path/%.exe/}"
37071    # Do not save /bin paths to all_fixpath_prefixes!
37072  else
37073    # Not in mixed or Windows style, start by that.
37074    new_path=`cmd //c echo $new_path`
37075
37076  input_path="$new_path"
37077  # Check if we need to convert this using DOS-style short mode. If the path
37078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37079  # take no chances and rewrite it.
37080  # Note: m4 eats our [], so we need to use [ and ] instead.
37081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37082  if test "x$has_forbidden_chars" != x; then
37083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37085  fi
37086
37087    # Output is in $new_path
37088
37089  windows_path="$new_path"
37090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37091    unix_path=`$CYGPATH -u "$windows_path"`
37092    new_path="$unix_path"
37093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37095    new_path="$unix_path"
37096  fi
37097
37098    # remove trailing .exe if any
37099    new_path="${new_path/%.exe/}"
37100
37101    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37102    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37103  fi
37104
37105    else
37106      # We're on a unix platform. Hooray! :)
37107      # First separate the path from the arguments. This will split at the first
37108      # space.
37109      complete="$AS"
37110      path="${complete%% *}"
37111      tmp="$complete EOL"
37112      arguments="${tmp#* }"
37113
37114      # Cannot rely on the command "which" here since it doesn't always work.
37115      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37116      if test -z "$is_absolute_path"; then
37117        # Path to executable is not absolute. Find it.
37118        IFS_save="$IFS"
37119        IFS=:
37120        for p in $PATH; do
37121          if test -f "$p/$path" && test -x "$p/$path"; then
37122            new_path="$p/$path"
37123            break
37124          fi
37125        done
37126        IFS="$IFS_save"
37127      else
37128        # This is an absolute path, we can use it without further modifications.
37129        new_path="$path"
37130      fi
37131
37132      if test "x$new_path" = x; then
37133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37134$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37135        has_space=`$ECHO "$complete" | $GREP " "`
37136        if test "x$has_space" != x; then
37137          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37138$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37139        fi
37140        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37141      fi
37142    fi
37143
37144    # Now join together the path and the arguments once again
37145    if test "x$arguments" != xEOL; then
37146      new_complete="$new_path ${arguments% *}"
37147    else
37148      new_complete="$new_path"
37149    fi
37150
37151    if test "x$complete" != "x$new_complete"; then
37152      AS="$new_complete"
37153      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37154$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37155    fi
37156  fi
37157
37158    if test "x$AS" = x; then
37159      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37160    fi
37161  else
37162    # FIXME: is this correct for microsoft?
37163    AS="$CC -c"
37164  fi
37165
37166
37167  #
37168  # Setup the archiver (AR)
37169  #
37170  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37171    # The corresponding ar tool is lib.exe (used to create static libraries)
37172    # Extract the first word of "lib", so it can be a program name with args.
37173set dummy lib; ac_word=$2
37174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37175$as_echo_n "checking for $ac_word... " >&6; }
37176if ${ac_cv_prog_AR+:} false; then :
37177  $as_echo_n "(cached) " >&6
37178else
37179  if test -n "$AR"; then
37180  ac_cv_prog_AR="$AR" # Let the user override the test.
37181else
37182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37183for as_dir in $PATH
37184do
37185  IFS=$as_save_IFS
37186  test -z "$as_dir" && as_dir=.
37187    for ac_exec_ext in '' $ac_executable_extensions; do
37188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37189    ac_cv_prog_AR="lib"
37190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37191    break 2
37192  fi
37193done
37194  done
37195IFS=$as_save_IFS
37196
37197fi
37198fi
37199AR=$ac_cv_prog_AR
37200if test -n "$AR"; then
37201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37202$as_echo "$AR" >&6; }
37203else
37204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37205$as_echo "no" >&6; }
37206fi
37207
37208
37209  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37210
37211
37212  # Publish this variable in the help.
37213
37214
37215  if [ -z "${AR+x}" ]; then
37216    # The variable is not set by user, try to locate tool using the code snippet
37217    if test -n "$ac_tool_prefix"; then
37218  for ac_prog in ar gcc-ar
37219  do
37220    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37221set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37223$as_echo_n "checking for $ac_word... " >&6; }
37224if ${ac_cv_prog_AR+:} false; then :
37225  $as_echo_n "(cached) " >&6
37226else
37227  if test -n "$AR"; then
37228  ac_cv_prog_AR="$AR" # Let the user override the test.
37229else
37230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37231for as_dir in $PATH
37232do
37233  IFS=$as_save_IFS
37234  test -z "$as_dir" && as_dir=.
37235    for ac_exec_ext in '' $ac_executable_extensions; do
37236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37237    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37239    break 2
37240  fi
37241done
37242  done
37243IFS=$as_save_IFS
37244
37245fi
37246fi
37247AR=$ac_cv_prog_AR
37248if test -n "$AR"; then
37249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37250$as_echo "$AR" >&6; }
37251else
37252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37253$as_echo "no" >&6; }
37254fi
37255
37256
37257    test -n "$AR" && break
37258  done
37259fi
37260if test -z "$AR"; then
37261  ac_ct_AR=$AR
37262  for ac_prog in ar gcc-ar
37263do
37264  # Extract the first word of "$ac_prog", so it can be a program name with args.
37265set dummy $ac_prog; ac_word=$2
37266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37267$as_echo_n "checking for $ac_word... " >&6; }
37268if ${ac_cv_prog_ac_ct_AR+:} false; then :
37269  $as_echo_n "(cached) " >&6
37270else
37271  if test -n "$ac_ct_AR"; then
37272  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37273else
37274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37275for as_dir in $PATH
37276do
37277  IFS=$as_save_IFS
37278  test -z "$as_dir" && as_dir=.
37279    for ac_exec_ext in '' $ac_executable_extensions; do
37280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37281    ac_cv_prog_ac_ct_AR="$ac_prog"
37282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37283    break 2
37284  fi
37285done
37286  done
37287IFS=$as_save_IFS
37288
37289fi
37290fi
37291ac_ct_AR=$ac_cv_prog_ac_ct_AR
37292if test -n "$ac_ct_AR"; then
37293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37294$as_echo "$ac_ct_AR" >&6; }
37295else
37296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37297$as_echo "no" >&6; }
37298fi
37299
37300
37301  test -n "$ac_ct_AR" && break
37302done
37303
37304  if test "x$ac_ct_AR" = x; then
37305    AR=""
37306  else
37307    case $cross_compiling:$ac_tool_warned in
37308yes:)
37309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37311ac_tool_warned=yes ;;
37312esac
37313    AR=$ac_ct_AR
37314  fi
37315fi
37316
37317  else
37318    # The variable is set, but is it from the command line or the environment?
37319
37320    # Try to remove the string !AR! from our list.
37321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37323      # If it failed, the variable was not from the command line. Ignore it,
37324      # but warn the user (except for BASH, which is always set by the calling BASH).
37325      if test "xAR" != xBASH; then
37326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37327$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37328      fi
37329      # Try to locate tool using the code snippet
37330      if test -n "$ac_tool_prefix"; then
37331  for ac_prog in ar gcc-ar
37332  do
37333    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37334set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37336$as_echo_n "checking for $ac_word... " >&6; }
37337if ${ac_cv_prog_AR+:} false; then :
37338  $as_echo_n "(cached) " >&6
37339else
37340  if test -n "$AR"; then
37341  ac_cv_prog_AR="$AR" # Let the user override the test.
37342else
37343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37344for as_dir in $PATH
37345do
37346  IFS=$as_save_IFS
37347  test -z "$as_dir" && as_dir=.
37348    for ac_exec_ext in '' $ac_executable_extensions; do
37349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37350    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37352    break 2
37353  fi
37354done
37355  done
37356IFS=$as_save_IFS
37357
37358fi
37359fi
37360AR=$ac_cv_prog_AR
37361if test -n "$AR"; then
37362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37363$as_echo "$AR" >&6; }
37364else
37365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37366$as_echo "no" >&6; }
37367fi
37368
37369
37370    test -n "$AR" && break
37371  done
37372fi
37373if test -z "$AR"; then
37374  ac_ct_AR=$AR
37375  for ac_prog in ar gcc-ar
37376do
37377  # Extract the first word of "$ac_prog", so it can be a program name with args.
37378set dummy $ac_prog; ac_word=$2
37379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37380$as_echo_n "checking for $ac_word... " >&6; }
37381if ${ac_cv_prog_ac_ct_AR+:} false; then :
37382  $as_echo_n "(cached) " >&6
37383else
37384  if test -n "$ac_ct_AR"; then
37385  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37386else
37387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37388for as_dir in $PATH
37389do
37390  IFS=$as_save_IFS
37391  test -z "$as_dir" && as_dir=.
37392    for ac_exec_ext in '' $ac_executable_extensions; do
37393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37394    ac_cv_prog_ac_ct_AR="$ac_prog"
37395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37396    break 2
37397  fi
37398done
37399  done
37400IFS=$as_save_IFS
37401
37402fi
37403fi
37404ac_ct_AR=$ac_cv_prog_ac_ct_AR
37405if test -n "$ac_ct_AR"; then
37406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37407$as_echo "$ac_ct_AR" >&6; }
37408else
37409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37410$as_echo "no" >&6; }
37411fi
37412
37413
37414  test -n "$ac_ct_AR" && break
37415done
37416
37417  if test "x$ac_ct_AR" = x; then
37418    AR=""
37419  else
37420    case $cross_compiling:$ac_tool_warned in
37421yes:)
37422{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37423$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37424ac_tool_warned=yes ;;
37425esac
37426    AR=$ac_ct_AR
37427  fi
37428fi
37429
37430    else
37431      # If it succeeded, then it was overridden by the user. We will use it
37432      # for the tool.
37433
37434      # First remove it from the list of overridden variables, so we can test
37435      # for unknown variables in the end.
37436      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37437
37438      # Check if we try to supply an empty value
37439      if test "x$AR" = x; then
37440        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37441$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37443$as_echo_n "checking for AR... " >&6; }
37444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37445$as_echo "disabled" >&6; }
37446      else
37447        # Check if the provided tool contains a complete path.
37448        tool_specified="$AR"
37449        tool_basename="${tool_specified##*/}"
37450        if test "x$tool_basename" = "x$tool_specified"; then
37451          # A command without a complete path is provided, search $PATH.
37452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37453$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37454          # Extract the first word of "$tool_basename", so it can be a program name with args.
37455set dummy $tool_basename; ac_word=$2
37456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37457$as_echo_n "checking for $ac_word... " >&6; }
37458if ${ac_cv_path_AR+:} false; then :
37459  $as_echo_n "(cached) " >&6
37460else
37461  case $AR in
37462  [\\/]* | ?:[\\/]*)
37463  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37464  ;;
37465  *)
37466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37467for as_dir in $PATH
37468do
37469  IFS=$as_save_IFS
37470  test -z "$as_dir" && as_dir=.
37471    for ac_exec_ext in '' $ac_executable_extensions; do
37472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37473    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37475    break 2
37476  fi
37477done
37478  done
37479IFS=$as_save_IFS
37480
37481  ;;
37482esac
37483fi
37484AR=$ac_cv_path_AR
37485if test -n "$AR"; then
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37487$as_echo "$AR" >&6; }
37488else
37489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37490$as_echo "no" >&6; }
37491fi
37492
37493
37494          if test "x$AR" = x; then
37495            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37496          fi
37497        else
37498          # Otherwise we believe it is a complete path. Use it as it is.
37499          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37500$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37501          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37502$as_echo_n "checking for AR... " >&6; }
37503          if test ! -x "$tool_specified"; then
37504            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37505$as_echo "not found" >&6; }
37506            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37507          fi
37508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37509$as_echo "$tool_specified" >&6; }
37510        fi
37511      fi
37512    fi
37513
37514  fi
37515
37516
37517  else
37518
37519
37520  # Publish this variable in the help.
37521
37522
37523  if [ -z "${AR+x}" ]; then
37524    # The variable is not set by user, try to locate tool using the code snippet
37525    if test -n "$ac_tool_prefix"; then
37526  for ac_prog in ar
37527  do
37528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37531$as_echo_n "checking for $ac_word... " >&6; }
37532if ${ac_cv_prog_AR+:} false; then :
37533  $as_echo_n "(cached) " >&6
37534else
37535  if test -n "$AR"; then
37536  ac_cv_prog_AR="$AR" # Let the user override the test.
37537else
37538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37539for as_dir in $PATH
37540do
37541  IFS=$as_save_IFS
37542  test -z "$as_dir" && as_dir=.
37543    for ac_exec_ext in '' $ac_executable_extensions; do
37544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37545    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37547    break 2
37548  fi
37549done
37550  done
37551IFS=$as_save_IFS
37552
37553fi
37554fi
37555AR=$ac_cv_prog_AR
37556if test -n "$AR"; then
37557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37558$as_echo "$AR" >&6; }
37559else
37560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561$as_echo "no" >&6; }
37562fi
37563
37564
37565    test -n "$AR" && break
37566  done
37567fi
37568if test -z "$AR"; then
37569  ac_ct_AR=$AR
37570  for ac_prog in ar
37571do
37572  # Extract the first word of "$ac_prog", so it can be a program name with args.
37573set dummy $ac_prog; ac_word=$2
37574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37575$as_echo_n "checking for $ac_word... " >&6; }
37576if ${ac_cv_prog_ac_ct_AR+:} false; then :
37577  $as_echo_n "(cached) " >&6
37578else
37579  if test -n "$ac_ct_AR"; then
37580  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37581else
37582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37583for as_dir in $PATH
37584do
37585  IFS=$as_save_IFS
37586  test -z "$as_dir" && as_dir=.
37587    for ac_exec_ext in '' $ac_executable_extensions; do
37588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37589    ac_cv_prog_ac_ct_AR="$ac_prog"
37590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37591    break 2
37592  fi
37593done
37594  done
37595IFS=$as_save_IFS
37596
37597fi
37598fi
37599ac_ct_AR=$ac_cv_prog_ac_ct_AR
37600if test -n "$ac_ct_AR"; then
37601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37602$as_echo "$ac_ct_AR" >&6; }
37603else
37604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37605$as_echo "no" >&6; }
37606fi
37607
37608
37609  test -n "$ac_ct_AR" && break
37610done
37611
37612  if test "x$ac_ct_AR" = x; then
37613    AR=""
37614  else
37615    case $cross_compiling:$ac_tool_warned in
37616yes:)
37617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37619ac_tool_warned=yes ;;
37620esac
37621    AR=$ac_ct_AR
37622  fi
37623fi
37624
37625  else
37626    # The variable is set, but is it from the command line or the environment?
37627
37628    # Try to remove the string !AR! from our list.
37629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37631      # If it failed, the variable was not from the command line. Ignore it,
37632      # but warn the user (except for BASH, which is always set by the calling BASH).
37633      if test "xAR" != xBASH; then
37634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37635$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37636      fi
37637      # Try to locate tool using the code snippet
37638      if test -n "$ac_tool_prefix"; then
37639  for ac_prog in ar
37640  do
37641    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37644$as_echo_n "checking for $ac_word... " >&6; }
37645if ${ac_cv_prog_AR+:} false; then :
37646  $as_echo_n "(cached) " >&6
37647else
37648  if test -n "$AR"; then
37649  ac_cv_prog_AR="$AR" # Let the user override the test.
37650else
37651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37652for as_dir in $PATH
37653do
37654  IFS=$as_save_IFS
37655  test -z "$as_dir" && as_dir=.
37656    for ac_exec_ext in '' $ac_executable_extensions; do
37657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37658    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37660    break 2
37661  fi
37662done
37663  done
37664IFS=$as_save_IFS
37665
37666fi
37667fi
37668AR=$ac_cv_prog_AR
37669if test -n "$AR"; then
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37671$as_echo "$AR" >&6; }
37672else
37673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37674$as_echo "no" >&6; }
37675fi
37676
37677
37678    test -n "$AR" && break
37679  done
37680fi
37681if test -z "$AR"; then
37682  ac_ct_AR=$AR
37683  for ac_prog in ar
37684do
37685  # Extract the first word of "$ac_prog", so it can be a program name with args.
37686set dummy $ac_prog; ac_word=$2
37687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37688$as_echo_n "checking for $ac_word... " >&6; }
37689if ${ac_cv_prog_ac_ct_AR+:} false; then :
37690  $as_echo_n "(cached) " >&6
37691else
37692  if test -n "$ac_ct_AR"; then
37693  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37694else
37695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37696for as_dir in $PATH
37697do
37698  IFS=$as_save_IFS
37699  test -z "$as_dir" && as_dir=.
37700    for ac_exec_ext in '' $ac_executable_extensions; do
37701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37702    ac_cv_prog_ac_ct_AR="$ac_prog"
37703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37704    break 2
37705  fi
37706done
37707  done
37708IFS=$as_save_IFS
37709
37710fi
37711fi
37712ac_ct_AR=$ac_cv_prog_ac_ct_AR
37713if test -n "$ac_ct_AR"; then
37714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37715$as_echo "$ac_ct_AR" >&6; }
37716else
37717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37718$as_echo "no" >&6; }
37719fi
37720
37721
37722  test -n "$ac_ct_AR" && break
37723done
37724
37725  if test "x$ac_ct_AR" = x; then
37726    AR=""
37727  else
37728    case $cross_compiling:$ac_tool_warned in
37729yes:)
37730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37732ac_tool_warned=yes ;;
37733esac
37734    AR=$ac_ct_AR
37735  fi
37736fi
37737
37738    else
37739      # If it succeeded, then it was overridden by the user. We will use it
37740      # for the tool.
37741
37742      # First remove it from the list of overridden variables, so we can test
37743      # for unknown variables in the end.
37744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37745
37746      # Check if we try to supply an empty value
37747      if test "x$AR" = x; then
37748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37749$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37751$as_echo_n "checking for AR... " >&6; }
37752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37753$as_echo "disabled" >&6; }
37754      else
37755        # Check if the provided tool contains a complete path.
37756        tool_specified="$AR"
37757        tool_basename="${tool_specified##*/}"
37758        if test "x$tool_basename" = "x$tool_specified"; then
37759          # A command without a complete path is provided, search $PATH.
37760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37761$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37762          # Extract the first word of "$tool_basename", so it can be a program name with args.
37763set dummy $tool_basename; ac_word=$2
37764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37765$as_echo_n "checking for $ac_word... " >&6; }
37766if ${ac_cv_path_AR+:} false; then :
37767  $as_echo_n "(cached) " >&6
37768else
37769  case $AR in
37770  [\\/]* | ?:[\\/]*)
37771  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37772  ;;
37773  *)
37774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37775for as_dir in $PATH
37776do
37777  IFS=$as_save_IFS
37778  test -z "$as_dir" && as_dir=.
37779    for ac_exec_ext in '' $ac_executable_extensions; do
37780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37781    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37783    break 2
37784  fi
37785done
37786  done
37787IFS=$as_save_IFS
37788
37789  ;;
37790esac
37791fi
37792AR=$ac_cv_path_AR
37793if test -n "$AR"; then
37794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37795$as_echo "$AR" >&6; }
37796else
37797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37798$as_echo "no" >&6; }
37799fi
37800
37801
37802          if test "x$AR" = x; then
37803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37804          fi
37805        else
37806          # Otherwise we believe it is a complete path. Use it as it is.
37807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37808$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37810$as_echo_n "checking for AR... " >&6; }
37811          if test ! -x "$tool_specified"; then
37812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37813$as_echo "not found" >&6; }
37814            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37815          fi
37816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37817$as_echo "$tool_specified" >&6; }
37818        fi
37819      fi
37820    fi
37821
37822  fi
37823
37824
37825  fi
37826
37827  # Only process if variable expands to non-empty
37828
37829  if test "x$AR" != x; then
37830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37831
37832  # First separate the path from the arguments. This will split at the first
37833  # space.
37834  complete="$AR"
37835  path="${complete%% *}"
37836  tmp="$complete EOL"
37837  arguments="${tmp#* }"
37838
37839  # Input might be given as Windows format, start by converting to
37840  # unix format.
37841  new_path=`$CYGPATH -u "$path"`
37842
37843  # Now try to locate executable using which
37844  new_path=`$WHICH "$new_path" 2> /dev/null`
37845  # bat and cmd files are not always considered executable in cygwin causing which
37846  # to not find them
37847  if test "x$new_path" = x \
37848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37850    new_path=`$CYGPATH -u "$path"`
37851  fi
37852  if test "x$new_path" = x; then
37853    # Oops. Which didn't find the executable.
37854    # The splitting of arguments from the executable at a space might have been incorrect,
37855    # since paths with space are more likely in Windows. Give it another try with the whole
37856    # argument.
37857    path="$complete"
37858    arguments="EOL"
37859    new_path=`$CYGPATH -u "$path"`
37860    new_path=`$WHICH "$new_path" 2> /dev/null`
37861    # bat and cmd files are not always considered executable in cygwin causing which
37862    # to not find them
37863    if test "x$new_path" = x \
37864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37866      new_path=`$CYGPATH -u "$path"`
37867    fi
37868    if test "x$new_path" = x; then
37869      # It's still not found. Now this is an unrecoverable error.
37870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37871$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37872      has_space=`$ECHO "$complete" | $GREP " "`
37873      if test "x$has_space" != x; then
37874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37876      fi
37877      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37878    fi
37879  fi
37880
37881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37884  # "foo.exe" is OK but "foo" is an error.
37885  #
37886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37887  # It is also a way to make sure we got the proper file name for the real test later on.
37888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37889  if test "x$test_shortpath" = x; then
37890    # Short path failed, file does not exist as specified.
37891    # Try adding .exe or .cmd
37892    if test -f "${new_path}.exe"; then
37893      input_to_shortpath="${new_path}.exe"
37894    elif test -f "${new_path}.cmd"; then
37895      input_to_shortpath="${new_path}.cmd"
37896    else
37897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37898$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37901      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37902    fi
37903  else
37904    input_to_shortpath="$new_path"
37905  fi
37906
37907  # Call helper function which possibly converts this using DOS-style short mode.
37908  # If so, the updated path is stored in $new_path.
37909  new_path="$input_to_shortpath"
37910
37911  input_path="$input_to_shortpath"
37912  # Check if we need to convert this using DOS-style short mode. If the path
37913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37914  # take no chances and rewrite it.
37915  # Note: m4 eats our [], so we need to use [ and ] instead.
37916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37917  if test "x$has_forbidden_chars" != x; then
37918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37922      # Going to short mode and back again did indeed matter. Since short mode is
37923      # case insensitive, let's make it lowercase to improve readability.
37924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37925      # Now convert it back to Unix-style (cygpath)
37926      input_path=`$CYGPATH -u "$shortmode_path"`
37927      new_path="$input_path"
37928    fi
37929  fi
37930
37931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37932  if test "x$test_cygdrive_prefix" = x; then
37933    # As a simple fix, exclude /usr/bin since it's not a real path.
37934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37936      # a path prefixed by /cygdrive for fixpath to work.
37937      new_path="$CYGWIN_ROOT_PATH$input_path"
37938    fi
37939  fi
37940
37941  # remove trailing .exe if any
37942  new_path="${new_path/%.exe/}"
37943
37944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37945
37946  # First separate the path from the arguments. This will split at the first
37947  # space.
37948  complete="$AR"
37949  path="${complete%% *}"
37950  tmp="$complete EOL"
37951  arguments="${tmp#* }"
37952
37953  # Input might be given as Windows format, start by converting to
37954  # unix format.
37955  new_path="$path"
37956
37957  windows_path="$new_path"
37958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37959    unix_path=`$CYGPATH -u "$windows_path"`
37960    new_path="$unix_path"
37961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37963    new_path="$unix_path"
37964  fi
37965
37966
37967  # Now try to locate executable using which
37968  new_path=`$WHICH "$new_path" 2> /dev/null`
37969
37970  if test "x$new_path" = x; then
37971    # Oops. Which didn't find the executable.
37972    # The splitting of arguments from the executable at a space might have been incorrect,
37973    # since paths with space are more likely in Windows. Give it another try with the whole
37974    # argument.
37975    path="$complete"
37976    arguments="EOL"
37977    new_path="$path"
37978
37979  windows_path="$new_path"
37980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37981    unix_path=`$CYGPATH -u "$windows_path"`
37982    new_path="$unix_path"
37983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37985    new_path="$unix_path"
37986  fi
37987
37988
37989    new_path=`$WHICH "$new_path" 2> /dev/null`
37990    # bat and cmd files are not always considered executable in MSYS causing which
37991    # to not find them
37992    if test "x$new_path" = x \
37993        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37994        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37995      new_path="$path"
37996
37997  windows_path="$new_path"
37998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37999    unix_path=`$CYGPATH -u "$windows_path"`
38000    new_path="$unix_path"
38001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38003    new_path="$unix_path"
38004  fi
38005
38006    fi
38007
38008    if test "x$new_path" = x; then
38009      # It's still not found. Now this is an unrecoverable error.
38010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38011$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38012      has_space=`$ECHO "$complete" | $GREP " "`
38013      if test "x$has_space" != x; then
38014        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38015$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38016      fi
38017      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38018    fi
38019  fi
38020
38021  # Now new_path has a complete unix path to the binary
38022  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38023    # Keep paths in /bin as-is, but remove trailing .exe if any
38024    new_path="${new_path/%.exe/}"
38025    # Do not save /bin paths to all_fixpath_prefixes!
38026  else
38027    # Not in mixed or Windows style, start by that.
38028    new_path=`cmd //c echo $new_path`
38029
38030  input_path="$new_path"
38031  # Check if we need to convert this using DOS-style short mode. If the path
38032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38033  # take no chances and rewrite it.
38034  # Note: m4 eats our [], so we need to use [ and ] instead.
38035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38036  if test "x$has_forbidden_chars" != x; then
38037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38039  fi
38040
38041    # Output is in $new_path
38042
38043  windows_path="$new_path"
38044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38045    unix_path=`$CYGPATH -u "$windows_path"`
38046    new_path="$unix_path"
38047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38049    new_path="$unix_path"
38050  fi
38051
38052    # remove trailing .exe if any
38053    new_path="${new_path/%.exe/}"
38054
38055    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38056    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38057  fi
38058
38059    else
38060      # We're on a unix platform. Hooray! :)
38061      # First separate the path from the arguments. This will split at the first
38062      # space.
38063      complete="$AR"
38064      path="${complete%% *}"
38065      tmp="$complete EOL"
38066      arguments="${tmp#* }"
38067
38068      # Cannot rely on the command "which" here since it doesn't always work.
38069      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38070      if test -z "$is_absolute_path"; then
38071        # Path to executable is not absolute. Find it.
38072        IFS_save="$IFS"
38073        IFS=:
38074        for p in $PATH; do
38075          if test -f "$p/$path" && test -x "$p/$path"; then
38076            new_path="$p/$path"
38077            break
38078          fi
38079        done
38080        IFS="$IFS_save"
38081      else
38082        # This is an absolute path, we can use it without further modifications.
38083        new_path="$path"
38084      fi
38085
38086      if test "x$new_path" = x; then
38087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38088$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38089        has_space=`$ECHO "$complete" | $GREP " "`
38090        if test "x$has_space" != x; then
38091          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38092$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38093        fi
38094        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38095      fi
38096    fi
38097
38098    # Now join together the path and the arguments once again
38099    if test "x$arguments" != xEOL; then
38100      new_complete="$new_path ${arguments% *}"
38101    else
38102      new_complete="$new_path"
38103    fi
38104
38105    if test "x$complete" != "x$new_complete"; then
38106      AR="$new_complete"
38107      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38108$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38109    fi
38110  fi
38111
38112
38113
38114  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38115
38116
38117  # Publish this variable in the help.
38118
38119
38120  if [ -z "${LIPO+x}" ]; then
38121    # The variable is not set by user, try to locate tool using the code snippet
38122    for ac_prog in lipo
38123do
38124  # Extract the first word of "$ac_prog", so it can be a program name with args.
38125set dummy $ac_prog; ac_word=$2
38126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38127$as_echo_n "checking for $ac_word... " >&6; }
38128if ${ac_cv_path_LIPO+:} false; then :
38129  $as_echo_n "(cached) " >&6
38130else
38131  case $LIPO in
38132  [\\/]* | ?:[\\/]*)
38133  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38134  ;;
38135  *)
38136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38137for as_dir in $PATH
38138do
38139  IFS=$as_save_IFS
38140  test -z "$as_dir" && as_dir=.
38141    for ac_exec_ext in '' $ac_executable_extensions; do
38142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38143    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38145    break 2
38146  fi
38147done
38148  done
38149IFS=$as_save_IFS
38150
38151  ;;
38152esac
38153fi
38154LIPO=$ac_cv_path_LIPO
38155if test -n "$LIPO"; then
38156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38157$as_echo "$LIPO" >&6; }
38158else
38159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38160$as_echo "no" >&6; }
38161fi
38162
38163
38164  test -n "$LIPO" && break
38165done
38166
38167  else
38168    # The variable is set, but is it from the command line or the environment?
38169
38170    # Try to remove the string !LIPO! from our list.
38171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38173      # If it failed, the variable was not from the command line. Ignore it,
38174      # but warn the user (except for BASH, which is always set by the calling BASH).
38175      if test "xLIPO" != xBASH; then
38176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38177$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38178      fi
38179      # Try to locate tool using the code snippet
38180      for ac_prog in lipo
38181do
38182  # Extract the first word of "$ac_prog", so it can be a program name with args.
38183set dummy $ac_prog; ac_word=$2
38184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38185$as_echo_n "checking for $ac_word... " >&6; }
38186if ${ac_cv_path_LIPO+:} false; then :
38187  $as_echo_n "(cached) " >&6
38188else
38189  case $LIPO in
38190  [\\/]* | ?:[\\/]*)
38191  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38192  ;;
38193  *)
38194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38195for as_dir in $PATH
38196do
38197  IFS=$as_save_IFS
38198  test -z "$as_dir" && as_dir=.
38199    for ac_exec_ext in '' $ac_executable_extensions; do
38200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38201    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38203    break 2
38204  fi
38205done
38206  done
38207IFS=$as_save_IFS
38208
38209  ;;
38210esac
38211fi
38212LIPO=$ac_cv_path_LIPO
38213if test -n "$LIPO"; then
38214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38215$as_echo "$LIPO" >&6; }
38216else
38217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38218$as_echo "no" >&6; }
38219fi
38220
38221
38222  test -n "$LIPO" && break
38223done
38224
38225    else
38226      # If it succeeded, then it was overridden by the user. We will use it
38227      # for the tool.
38228
38229      # First remove it from the list of overridden variables, so we can test
38230      # for unknown variables in the end.
38231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38232
38233      # Check if we try to supply an empty value
38234      if test "x$LIPO" = x; then
38235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38236$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38238$as_echo_n "checking for LIPO... " >&6; }
38239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38240$as_echo "disabled" >&6; }
38241      else
38242        # Check if the provided tool contains a complete path.
38243        tool_specified="$LIPO"
38244        tool_basename="${tool_specified##*/}"
38245        if test "x$tool_basename" = "x$tool_specified"; then
38246          # A command without a complete path is provided, search $PATH.
38247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38248$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38249          # Extract the first word of "$tool_basename", so it can be a program name with args.
38250set dummy $tool_basename; 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_path_LIPO+:} false; then :
38254  $as_echo_n "(cached) " >&6
38255else
38256  case $LIPO in
38257  [\\/]* | ?:[\\/]*)
38258  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38259  ;;
38260  *)
38261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38262for as_dir in $PATH
38263do
38264  IFS=$as_save_IFS
38265  test -z "$as_dir" && as_dir=.
38266    for ac_exec_ext in '' $ac_executable_extensions; do
38267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38268    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38270    break 2
38271  fi
38272done
38273  done
38274IFS=$as_save_IFS
38275
38276  ;;
38277esac
38278fi
38279LIPO=$ac_cv_path_LIPO
38280if test -n "$LIPO"; then
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38282$as_echo "$LIPO" >&6; }
38283else
38284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38285$as_echo "no" >&6; }
38286fi
38287
38288
38289          if test "x$LIPO" = x; then
38290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38291          fi
38292        else
38293          # Otherwise we believe it is a complete path. Use it as it is.
38294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38295$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38297$as_echo_n "checking for LIPO... " >&6; }
38298          if test ! -x "$tool_specified"; then
38299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38300$as_echo "not found" >&6; }
38301            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38302          fi
38303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38304$as_echo "$tool_specified" >&6; }
38305        fi
38306      fi
38307    fi
38308
38309  fi
38310
38311
38312
38313  # Only process if variable expands to non-empty
38314
38315  if test "x$LIPO" != x; then
38316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38317
38318  # First separate the path from the arguments. This will split at the first
38319  # space.
38320  complete="$LIPO"
38321  path="${complete%% *}"
38322  tmp="$complete EOL"
38323  arguments="${tmp#* }"
38324
38325  # Input might be given as Windows format, start by converting to
38326  # unix format.
38327  new_path=`$CYGPATH -u "$path"`
38328
38329  # Now try to locate executable using which
38330  new_path=`$WHICH "$new_path" 2> /dev/null`
38331  # bat and cmd files are not always considered executable in cygwin causing which
38332  # to not find them
38333  if test "x$new_path" = x \
38334      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38335      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38336    new_path=`$CYGPATH -u "$path"`
38337  fi
38338  if test "x$new_path" = x; then
38339    # Oops. Which didn't find the executable.
38340    # The splitting of arguments from the executable at a space might have been incorrect,
38341    # since paths with space are more likely in Windows. Give it another try with the whole
38342    # argument.
38343    path="$complete"
38344    arguments="EOL"
38345    new_path=`$CYGPATH -u "$path"`
38346    new_path=`$WHICH "$new_path" 2> /dev/null`
38347    # bat and cmd files are not always considered executable in cygwin causing which
38348    # to not find them
38349    if test "x$new_path" = x \
38350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38352      new_path=`$CYGPATH -u "$path"`
38353    fi
38354    if test "x$new_path" = x; then
38355      # It's still not found. Now this is an unrecoverable error.
38356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38357$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38358      has_space=`$ECHO "$complete" | $GREP " "`
38359      if test "x$has_space" != x; then
38360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38362      fi
38363      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38364    fi
38365  fi
38366
38367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38370  # "foo.exe" is OK but "foo" is an error.
38371  #
38372  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38373  # It is also a way to make sure we got the proper file name for the real test later on.
38374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38375  if test "x$test_shortpath" = x; then
38376    # Short path failed, file does not exist as specified.
38377    # Try adding .exe or .cmd
38378    if test -f "${new_path}.exe"; then
38379      input_to_shortpath="${new_path}.exe"
38380    elif test -f "${new_path}.cmd"; then
38381      input_to_shortpath="${new_path}.cmd"
38382    else
38383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38384$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38387      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38388    fi
38389  else
38390    input_to_shortpath="$new_path"
38391  fi
38392
38393  # Call helper function which possibly converts this using DOS-style short mode.
38394  # If so, the updated path is stored in $new_path.
38395  new_path="$input_to_shortpath"
38396
38397  input_path="$input_to_shortpath"
38398  # Check if we need to convert this using DOS-style short mode. If the path
38399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38400  # take no chances and rewrite it.
38401  # Note: m4 eats our [], so we need to use [ and ] instead.
38402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38403  if test "x$has_forbidden_chars" != x; then
38404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38408      # Going to short mode and back again did indeed matter. Since short mode is
38409      # case insensitive, let's make it lowercase to improve readability.
38410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38411      # Now convert it back to Unix-style (cygpath)
38412      input_path=`$CYGPATH -u "$shortmode_path"`
38413      new_path="$input_path"
38414    fi
38415  fi
38416
38417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38418  if test "x$test_cygdrive_prefix" = x; then
38419    # As a simple fix, exclude /usr/bin since it's not a real path.
38420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38422      # a path prefixed by /cygdrive for fixpath to work.
38423      new_path="$CYGWIN_ROOT_PATH$input_path"
38424    fi
38425  fi
38426
38427  # remove trailing .exe if any
38428  new_path="${new_path/%.exe/}"
38429
38430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38431
38432  # First separate the path from the arguments. This will split at the first
38433  # space.
38434  complete="$LIPO"
38435  path="${complete%% *}"
38436  tmp="$complete EOL"
38437  arguments="${tmp#* }"
38438
38439  # Input might be given as Windows format, start by converting to
38440  # unix format.
38441  new_path="$path"
38442
38443  windows_path="$new_path"
38444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38445    unix_path=`$CYGPATH -u "$windows_path"`
38446    new_path="$unix_path"
38447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38449    new_path="$unix_path"
38450  fi
38451
38452
38453  # Now try to locate executable using which
38454  new_path=`$WHICH "$new_path" 2> /dev/null`
38455
38456  if test "x$new_path" = x; then
38457    # Oops. Which didn't find the executable.
38458    # The splitting of arguments from the executable at a space might have been incorrect,
38459    # since paths with space are more likely in Windows. Give it another try with the whole
38460    # argument.
38461    path="$complete"
38462    arguments="EOL"
38463    new_path="$path"
38464
38465  windows_path="$new_path"
38466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38467    unix_path=`$CYGPATH -u "$windows_path"`
38468    new_path="$unix_path"
38469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38471    new_path="$unix_path"
38472  fi
38473
38474
38475    new_path=`$WHICH "$new_path" 2> /dev/null`
38476    # bat and cmd files are not always considered executable in MSYS causing which
38477    # to not find them
38478    if test "x$new_path" = x \
38479        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38480        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38481      new_path="$path"
38482
38483  windows_path="$new_path"
38484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38485    unix_path=`$CYGPATH -u "$windows_path"`
38486    new_path="$unix_path"
38487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38489    new_path="$unix_path"
38490  fi
38491
38492    fi
38493
38494    if test "x$new_path" = x; then
38495      # It's still not found. Now this is an unrecoverable error.
38496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38497$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38498      has_space=`$ECHO "$complete" | $GREP " "`
38499      if test "x$has_space" != x; then
38500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38502      fi
38503      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38504    fi
38505  fi
38506
38507  # Now new_path has a complete unix path to the binary
38508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38509    # Keep paths in /bin as-is, but remove trailing .exe if any
38510    new_path="${new_path/%.exe/}"
38511    # Do not save /bin paths to all_fixpath_prefixes!
38512  else
38513    # Not in mixed or Windows style, start by that.
38514    new_path=`cmd //c echo $new_path`
38515
38516  input_path="$new_path"
38517  # Check if we need to convert this using DOS-style short mode. If the path
38518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38519  # take no chances and rewrite it.
38520  # Note: m4 eats our [], so we need to use [ and ] instead.
38521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38522  if test "x$has_forbidden_chars" != x; then
38523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38525  fi
38526
38527    # Output is in $new_path
38528
38529  windows_path="$new_path"
38530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38531    unix_path=`$CYGPATH -u "$windows_path"`
38532    new_path="$unix_path"
38533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38535    new_path="$unix_path"
38536  fi
38537
38538    # remove trailing .exe if any
38539    new_path="${new_path/%.exe/}"
38540
38541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38543  fi
38544
38545    else
38546      # We're on a unix platform. Hooray! :)
38547      # First separate the path from the arguments. This will split at the first
38548      # space.
38549      complete="$LIPO"
38550      path="${complete%% *}"
38551      tmp="$complete EOL"
38552      arguments="${tmp#* }"
38553
38554      # Cannot rely on the command "which" here since it doesn't always work.
38555      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38556      if test -z "$is_absolute_path"; then
38557        # Path to executable is not absolute. Find it.
38558        IFS_save="$IFS"
38559        IFS=:
38560        for p in $PATH; do
38561          if test -f "$p/$path" && test -x "$p/$path"; then
38562            new_path="$p/$path"
38563            break
38564          fi
38565        done
38566        IFS="$IFS_save"
38567      else
38568        # This is an absolute path, we can use it without further modifications.
38569        new_path="$path"
38570      fi
38571
38572      if test "x$new_path" = x; then
38573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38574$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38575        has_space=`$ECHO "$complete" | $GREP " "`
38576        if test "x$has_space" != x; then
38577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38579        fi
38580        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38581      fi
38582    fi
38583
38584    # Now join together the path and the arguments once again
38585    if test "x$arguments" != xEOL; then
38586      new_complete="$new_path ${arguments% *}"
38587    else
38588      new_complete="$new_path"
38589    fi
38590
38591    if test "x$complete" != "x$new_complete"; then
38592      LIPO="$new_complete"
38593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38594$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38595    fi
38596  fi
38597
38598  fi
38599
38600  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38601    # Extract the first word of "mt", so it can be a program name with args.
38602set dummy mt; ac_word=$2
38603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38604$as_echo_n "checking for $ac_word... " >&6; }
38605if ${ac_cv_prog_MT+:} false; then :
38606  $as_echo_n "(cached) " >&6
38607else
38608  if test -n "$MT"; then
38609  ac_cv_prog_MT="$MT" # Let the user override the test.
38610else
38611  ac_prog_rejected=no
38612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38613for as_dir in $PATH
38614do
38615  IFS=$as_save_IFS
38616  test -z "$as_dir" && as_dir=.
38617    for ac_exec_ext in '' $ac_executable_extensions; do
38618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38619    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38620       ac_prog_rejected=yes
38621       continue
38622     fi
38623    ac_cv_prog_MT="mt"
38624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38625    break 2
38626  fi
38627done
38628  done
38629IFS=$as_save_IFS
38630
38631if test $ac_prog_rejected = yes; then
38632  # We found a bogon in the path, so make sure we never use it.
38633  set dummy $ac_cv_prog_MT
38634  shift
38635  if test $# != 0; then
38636    # We chose a different compiler from the bogus one.
38637    # However, it has the same basename, so the bogon will be chosen
38638    # first if we set MT to just the basename; use the full file name.
38639    shift
38640    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38641  fi
38642fi
38643fi
38644fi
38645MT=$ac_cv_prog_MT
38646if test -n "$MT"; then
38647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38648$as_echo "$MT" >&6; }
38649else
38650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38651$as_echo "no" >&6; }
38652fi
38653
38654
38655
38656  # Only process if variable expands to non-empty
38657
38658  if test "x$MT" != x; then
38659    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38660
38661  # First separate the path from the arguments. This will split at the first
38662  # space.
38663  complete="$MT"
38664  path="${complete%% *}"
38665  tmp="$complete EOL"
38666  arguments="${tmp#* }"
38667
38668  # Input might be given as Windows format, start by converting to
38669  # unix format.
38670  new_path=`$CYGPATH -u "$path"`
38671
38672  # Now try to locate executable using which
38673  new_path=`$WHICH "$new_path" 2> /dev/null`
38674  # bat and cmd files are not always considered executable in cygwin causing which
38675  # to not find them
38676  if test "x$new_path" = x \
38677      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38678      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38679    new_path=`$CYGPATH -u "$path"`
38680  fi
38681  if test "x$new_path" = x; then
38682    # Oops. Which didn't find the executable.
38683    # The splitting of arguments from the executable at a space might have been incorrect,
38684    # since paths with space are more likely in Windows. Give it another try with the whole
38685    # argument.
38686    path="$complete"
38687    arguments="EOL"
38688    new_path=`$CYGPATH -u "$path"`
38689    new_path=`$WHICH "$new_path" 2> /dev/null`
38690    # bat and cmd files are not always considered executable in cygwin causing which
38691    # to not find them
38692    if test "x$new_path" = x \
38693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38695      new_path=`$CYGPATH -u "$path"`
38696    fi
38697    if test "x$new_path" = x; then
38698      # It's still not found. Now this is an unrecoverable error.
38699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38700$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38701      has_space=`$ECHO "$complete" | $GREP " "`
38702      if test "x$has_space" != x; then
38703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38705      fi
38706      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38707    fi
38708  fi
38709
38710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38713  # "foo.exe" is OK but "foo" is an error.
38714  #
38715  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38716  # It is also a way to make sure we got the proper file name for the real test later on.
38717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38718  if test "x$test_shortpath" = x; then
38719    # Short path failed, file does not exist as specified.
38720    # Try adding .exe or .cmd
38721    if test -f "${new_path}.exe"; then
38722      input_to_shortpath="${new_path}.exe"
38723    elif test -f "${new_path}.cmd"; then
38724      input_to_shortpath="${new_path}.cmd"
38725    else
38726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38727$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38728      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38729$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38730      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38731    fi
38732  else
38733    input_to_shortpath="$new_path"
38734  fi
38735
38736  # Call helper function which possibly converts this using DOS-style short mode.
38737  # If so, the updated path is stored in $new_path.
38738  new_path="$input_to_shortpath"
38739
38740  input_path="$input_to_shortpath"
38741  # Check if we need to convert this using DOS-style short mode. If the path
38742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38743  # take no chances and rewrite it.
38744  # Note: m4 eats our [], so we need to use [ and ] instead.
38745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38746  if test "x$has_forbidden_chars" != x; then
38747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38751      # Going to short mode and back again did indeed matter. Since short mode is
38752      # case insensitive, let's make it lowercase to improve readability.
38753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38754      # Now convert it back to Unix-style (cygpath)
38755      input_path=`$CYGPATH -u "$shortmode_path"`
38756      new_path="$input_path"
38757    fi
38758  fi
38759
38760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38761  if test "x$test_cygdrive_prefix" = x; then
38762    # As a simple fix, exclude /usr/bin since it's not a real path.
38763    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38765      # a path prefixed by /cygdrive for fixpath to work.
38766      new_path="$CYGWIN_ROOT_PATH$input_path"
38767    fi
38768  fi
38769
38770  # remove trailing .exe if any
38771  new_path="${new_path/%.exe/}"
38772
38773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38774
38775  # First separate the path from the arguments. This will split at the first
38776  # space.
38777  complete="$MT"
38778  path="${complete%% *}"
38779  tmp="$complete EOL"
38780  arguments="${tmp#* }"
38781
38782  # Input might be given as Windows format, start by converting to
38783  # unix format.
38784  new_path="$path"
38785
38786  windows_path="$new_path"
38787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38788    unix_path=`$CYGPATH -u "$windows_path"`
38789    new_path="$unix_path"
38790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38792    new_path="$unix_path"
38793  fi
38794
38795
38796  # Now try to locate executable using which
38797  new_path=`$WHICH "$new_path" 2> /dev/null`
38798
38799  if test "x$new_path" = x; then
38800    # Oops. Which didn't find the executable.
38801    # The splitting of arguments from the executable at a space might have been incorrect,
38802    # since paths with space are more likely in Windows. Give it another try with the whole
38803    # argument.
38804    path="$complete"
38805    arguments="EOL"
38806    new_path="$path"
38807
38808  windows_path="$new_path"
38809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38810    unix_path=`$CYGPATH -u "$windows_path"`
38811    new_path="$unix_path"
38812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38814    new_path="$unix_path"
38815  fi
38816
38817
38818    new_path=`$WHICH "$new_path" 2> /dev/null`
38819    # bat and cmd files are not always considered executable in MSYS causing which
38820    # to not find them
38821    if test "x$new_path" = x \
38822        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38823        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38824      new_path="$path"
38825
38826  windows_path="$new_path"
38827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38828    unix_path=`$CYGPATH -u "$windows_path"`
38829    new_path="$unix_path"
38830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38832    new_path="$unix_path"
38833  fi
38834
38835    fi
38836
38837    if test "x$new_path" = x; then
38838      # It's still not found. Now this is an unrecoverable error.
38839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38840$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38841      has_space=`$ECHO "$complete" | $GREP " "`
38842      if test "x$has_space" != x; then
38843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38845      fi
38846      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38847    fi
38848  fi
38849
38850  # Now new_path has a complete unix path to the binary
38851  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38852    # Keep paths in /bin as-is, but remove trailing .exe if any
38853    new_path="${new_path/%.exe/}"
38854    # Do not save /bin paths to all_fixpath_prefixes!
38855  else
38856    # Not in mixed or Windows style, start by that.
38857    new_path=`cmd //c echo $new_path`
38858
38859  input_path="$new_path"
38860  # Check if we need to convert this using DOS-style short mode. If the path
38861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38862  # take no chances and rewrite it.
38863  # Note: m4 eats our [], so we need to use [ and ] instead.
38864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38865  if test "x$has_forbidden_chars" != x; then
38866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38868  fi
38869
38870    # Output is in $new_path
38871
38872  windows_path="$new_path"
38873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38874    unix_path=`$CYGPATH -u "$windows_path"`
38875    new_path="$unix_path"
38876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38878    new_path="$unix_path"
38879  fi
38880
38881    # remove trailing .exe if any
38882    new_path="${new_path/%.exe/}"
38883
38884    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38885    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38886  fi
38887
38888    else
38889      # We're on a unix platform. Hooray! :)
38890      # First separate the path from the arguments. This will split at the first
38891      # space.
38892      complete="$MT"
38893      path="${complete%% *}"
38894      tmp="$complete EOL"
38895      arguments="${tmp#* }"
38896
38897      # Cannot rely on the command "which" here since it doesn't always work.
38898      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38899      if test -z "$is_absolute_path"; then
38900        # Path to executable is not absolute. Find it.
38901        IFS_save="$IFS"
38902        IFS=:
38903        for p in $PATH; do
38904          if test -f "$p/$path" && test -x "$p/$path"; then
38905            new_path="$p/$path"
38906            break
38907          fi
38908        done
38909        IFS="$IFS_save"
38910      else
38911        # This is an absolute path, we can use it without further modifications.
38912        new_path="$path"
38913      fi
38914
38915      if test "x$new_path" = x; then
38916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38917$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38918        has_space=`$ECHO "$complete" | $GREP " "`
38919        if test "x$has_space" != x; then
38920          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38921$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38922        fi
38923        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38924      fi
38925    fi
38926
38927    # Now join together the path and the arguments once again
38928    if test "x$arguments" != xEOL; then
38929      new_complete="$new_path ${arguments% *}"
38930    else
38931      new_complete="$new_path"
38932    fi
38933
38934    if test "x$complete" != "x$new_complete"; then
38935      MT="$new_complete"
38936      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38937$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38938    fi
38939  fi
38940
38941    # Setup the resource compiler (RC)
38942    # Extract the first word of "rc", so it can be a program name with args.
38943set dummy rc; ac_word=$2
38944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38945$as_echo_n "checking for $ac_word... " >&6; }
38946if ${ac_cv_prog_RC+:} false; then :
38947  $as_echo_n "(cached) " >&6
38948else
38949  if test -n "$RC"; then
38950  ac_cv_prog_RC="$RC" # Let the user override the test.
38951else
38952  ac_prog_rejected=no
38953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38954for as_dir in $PATH
38955do
38956  IFS=$as_save_IFS
38957  test -z "$as_dir" && as_dir=.
38958    for ac_exec_ext in '' $ac_executable_extensions; do
38959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38960    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38961       ac_prog_rejected=yes
38962       continue
38963     fi
38964    ac_cv_prog_RC="rc"
38965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38966    break 2
38967  fi
38968done
38969  done
38970IFS=$as_save_IFS
38971
38972if test $ac_prog_rejected = yes; then
38973  # We found a bogon in the path, so make sure we never use it.
38974  set dummy $ac_cv_prog_RC
38975  shift
38976  if test $# != 0; then
38977    # We chose a different compiler from the bogus one.
38978    # However, it has the same basename, so the bogon will be chosen
38979    # first if we set RC to just the basename; use the full file name.
38980    shift
38981    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38982  fi
38983fi
38984fi
38985fi
38986RC=$ac_cv_prog_RC
38987if test -n "$RC"; then
38988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38989$as_echo "$RC" >&6; }
38990else
38991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38992$as_echo "no" >&6; }
38993fi
38994
38995
38996
38997  # Only process if variable expands to non-empty
38998
38999  if test "x$RC" != x; then
39000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39001
39002  # First separate the path from the arguments. This will split at the first
39003  # space.
39004  complete="$RC"
39005  path="${complete%% *}"
39006  tmp="$complete EOL"
39007  arguments="${tmp#* }"
39008
39009  # Input might be given as Windows format, start by converting to
39010  # unix format.
39011  new_path=`$CYGPATH -u "$path"`
39012
39013  # Now try to locate executable using which
39014  new_path=`$WHICH "$new_path" 2> /dev/null`
39015  # bat and cmd files are not always considered executable in cygwin causing which
39016  # to not find them
39017  if test "x$new_path" = x \
39018      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39019      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39020    new_path=`$CYGPATH -u "$path"`
39021  fi
39022  if test "x$new_path" = x; then
39023    # Oops. Which didn't find the executable.
39024    # The splitting of arguments from the executable at a space might have been incorrect,
39025    # since paths with space are more likely in Windows. Give it another try with the whole
39026    # argument.
39027    path="$complete"
39028    arguments="EOL"
39029    new_path=`$CYGPATH -u "$path"`
39030    new_path=`$WHICH "$new_path" 2> /dev/null`
39031    # bat and cmd files are not always considered executable in cygwin causing which
39032    # to not find them
39033    if test "x$new_path" = x \
39034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39036      new_path=`$CYGPATH -u "$path"`
39037    fi
39038    if test "x$new_path" = x; then
39039      # It's still not found. Now this is an unrecoverable error.
39040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39041$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39042      has_space=`$ECHO "$complete" | $GREP " "`
39043      if test "x$has_space" != x; then
39044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39046      fi
39047      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39048    fi
39049  fi
39050
39051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39054  # "foo.exe" is OK but "foo" is an error.
39055  #
39056  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39057  # It is also a way to make sure we got the proper file name for the real test later on.
39058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39059  if test "x$test_shortpath" = x; then
39060    # Short path failed, file does not exist as specified.
39061    # Try adding .exe or .cmd
39062    if test -f "${new_path}.exe"; then
39063      input_to_shortpath="${new_path}.exe"
39064    elif test -f "${new_path}.cmd"; then
39065      input_to_shortpath="${new_path}.cmd"
39066    else
39067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39068$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39071      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39072    fi
39073  else
39074    input_to_shortpath="$new_path"
39075  fi
39076
39077  # Call helper function which possibly converts this using DOS-style short mode.
39078  # If so, the updated path is stored in $new_path.
39079  new_path="$input_to_shortpath"
39080
39081  input_path="$input_to_shortpath"
39082  # Check if we need to convert this using DOS-style short mode. If the path
39083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39084  # take no chances and rewrite it.
39085  # Note: m4 eats our [], so we need to use [ and ] instead.
39086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39087  if test "x$has_forbidden_chars" != x; then
39088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39092      # Going to short mode and back again did indeed matter. Since short mode is
39093      # case insensitive, let's make it lowercase to improve readability.
39094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39095      # Now convert it back to Unix-style (cygpath)
39096      input_path=`$CYGPATH -u "$shortmode_path"`
39097      new_path="$input_path"
39098    fi
39099  fi
39100
39101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39102  if test "x$test_cygdrive_prefix" = x; then
39103    # As a simple fix, exclude /usr/bin since it's not a real path.
39104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39106      # a path prefixed by /cygdrive for fixpath to work.
39107      new_path="$CYGWIN_ROOT_PATH$input_path"
39108    fi
39109  fi
39110
39111  # remove trailing .exe if any
39112  new_path="${new_path/%.exe/}"
39113
39114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39115
39116  # First separate the path from the arguments. This will split at the first
39117  # space.
39118  complete="$RC"
39119  path="${complete%% *}"
39120  tmp="$complete EOL"
39121  arguments="${tmp#* }"
39122
39123  # Input might be given as Windows format, start by converting to
39124  # unix format.
39125  new_path="$path"
39126
39127  windows_path="$new_path"
39128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39129    unix_path=`$CYGPATH -u "$windows_path"`
39130    new_path="$unix_path"
39131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39133    new_path="$unix_path"
39134  fi
39135
39136
39137  # Now try to locate executable using which
39138  new_path=`$WHICH "$new_path" 2> /dev/null`
39139
39140  if test "x$new_path" = x; then
39141    # Oops. Which didn't find the executable.
39142    # The splitting of arguments from the executable at a space might have been incorrect,
39143    # since paths with space are more likely in Windows. Give it another try with the whole
39144    # argument.
39145    path="$complete"
39146    arguments="EOL"
39147    new_path="$path"
39148
39149  windows_path="$new_path"
39150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39151    unix_path=`$CYGPATH -u "$windows_path"`
39152    new_path="$unix_path"
39153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39155    new_path="$unix_path"
39156  fi
39157
39158
39159    new_path=`$WHICH "$new_path" 2> /dev/null`
39160    # bat and cmd files are not always considered executable in MSYS causing which
39161    # to not find them
39162    if test "x$new_path" = x \
39163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39165      new_path="$path"
39166
39167  windows_path="$new_path"
39168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39169    unix_path=`$CYGPATH -u "$windows_path"`
39170    new_path="$unix_path"
39171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39173    new_path="$unix_path"
39174  fi
39175
39176    fi
39177
39178    if test "x$new_path" = x; then
39179      # It's still not found. Now this is an unrecoverable error.
39180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39181$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39182      has_space=`$ECHO "$complete" | $GREP " "`
39183      if test "x$has_space" != x; then
39184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39186      fi
39187      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39188    fi
39189  fi
39190
39191  # Now new_path has a complete unix path to the binary
39192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39193    # Keep paths in /bin as-is, but remove trailing .exe if any
39194    new_path="${new_path/%.exe/}"
39195    # Do not save /bin paths to all_fixpath_prefixes!
39196  else
39197    # Not in mixed or Windows style, start by that.
39198    new_path=`cmd //c echo $new_path`
39199
39200  input_path="$new_path"
39201  # Check if we need to convert this using DOS-style short mode. If the path
39202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39203  # take no chances and rewrite it.
39204  # Note: m4 eats our [], so we need to use [ and ] instead.
39205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39206  if test "x$has_forbidden_chars" != x; then
39207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39209  fi
39210
39211    # Output is in $new_path
39212
39213  windows_path="$new_path"
39214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39215    unix_path=`$CYGPATH -u "$windows_path"`
39216    new_path="$unix_path"
39217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39219    new_path="$unix_path"
39220  fi
39221
39222    # remove trailing .exe if any
39223    new_path="${new_path/%.exe/}"
39224
39225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39227  fi
39228
39229    else
39230      # We're on a unix platform. Hooray! :)
39231      # First separate the path from the arguments. This will split at the first
39232      # space.
39233      complete="$RC"
39234      path="${complete%% *}"
39235      tmp="$complete EOL"
39236      arguments="${tmp#* }"
39237
39238      # Cannot rely on the command "which" here since it doesn't always work.
39239      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39240      if test -z "$is_absolute_path"; then
39241        # Path to executable is not absolute. Find it.
39242        IFS_save="$IFS"
39243        IFS=:
39244        for p in $PATH; do
39245          if test -f "$p/$path" && test -x "$p/$path"; then
39246            new_path="$p/$path"
39247            break
39248          fi
39249        done
39250        IFS="$IFS_save"
39251      else
39252        # This is an absolute path, we can use it without further modifications.
39253        new_path="$path"
39254      fi
39255
39256      if test "x$new_path" = x; then
39257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39258$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39259        has_space=`$ECHO "$complete" | $GREP " "`
39260        if test "x$has_space" != x; then
39261          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39263        fi
39264        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39265      fi
39266    fi
39267
39268    # Now join together the path and the arguments once again
39269    if test "x$arguments" != xEOL; then
39270      new_complete="$new_path ${arguments% *}"
39271    else
39272      new_complete="$new_path"
39273    fi
39274
39275    if test "x$complete" != "x$new_complete"; then
39276      RC="$new_complete"
39277      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39278$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39279    fi
39280  fi
39281
39282    # Extract the first word of "dumpbin", so it can be a program name with args.
39283set dummy dumpbin; ac_word=$2
39284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39285$as_echo_n "checking for $ac_word... " >&6; }
39286if ${ac_cv_prog_DUMPBIN+:} false; then :
39287  $as_echo_n "(cached) " >&6
39288else
39289  if test -n "$DUMPBIN"; then
39290  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39291else
39292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39293for as_dir in $PATH
39294do
39295  IFS=$as_save_IFS
39296  test -z "$as_dir" && as_dir=.
39297    for ac_exec_ext in '' $ac_executable_extensions; do
39298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39299    ac_cv_prog_DUMPBIN="dumpbin"
39300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39301    break 2
39302  fi
39303done
39304  done
39305IFS=$as_save_IFS
39306
39307fi
39308fi
39309DUMPBIN=$ac_cv_prog_DUMPBIN
39310if test -n "$DUMPBIN"; then
39311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39312$as_echo "$DUMPBIN" >&6; }
39313else
39314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39315$as_echo "no" >&6; }
39316fi
39317
39318
39319
39320  # Only process if variable expands to non-empty
39321
39322  if test "x$DUMPBIN" != x; then
39323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39324
39325  # First separate the path from the arguments. This will split at the first
39326  # space.
39327  complete="$DUMPBIN"
39328  path="${complete%% *}"
39329  tmp="$complete EOL"
39330  arguments="${tmp#* }"
39331
39332  # Input might be given as Windows format, start by converting to
39333  # unix format.
39334  new_path=`$CYGPATH -u "$path"`
39335
39336  # Now try to locate executable using which
39337  new_path=`$WHICH "$new_path" 2> /dev/null`
39338  # bat and cmd files are not always considered executable in cygwin causing which
39339  # to not find them
39340  if test "x$new_path" = x \
39341      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39342      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39343    new_path=`$CYGPATH -u "$path"`
39344  fi
39345  if test "x$new_path" = x; then
39346    # Oops. Which didn't find the executable.
39347    # The splitting of arguments from the executable at a space might have been incorrect,
39348    # since paths with space are more likely in Windows. Give it another try with the whole
39349    # argument.
39350    path="$complete"
39351    arguments="EOL"
39352    new_path=`$CYGPATH -u "$path"`
39353    new_path=`$WHICH "$new_path" 2> /dev/null`
39354    # bat and cmd files are not always considered executable in cygwin causing which
39355    # to not find them
39356    if test "x$new_path" = x \
39357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39359      new_path=`$CYGPATH -u "$path"`
39360    fi
39361    if test "x$new_path" = x; then
39362      # It's still not found. Now this is an unrecoverable error.
39363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39364$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39365      has_space=`$ECHO "$complete" | $GREP " "`
39366      if test "x$has_space" != x; then
39367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39369      fi
39370      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39371    fi
39372  fi
39373
39374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39377  # "foo.exe" is OK but "foo" is an error.
39378  #
39379  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39380  # It is also a way to make sure we got the proper file name for the real test later on.
39381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39382  if test "x$test_shortpath" = x; then
39383    # Short path failed, file does not exist as specified.
39384    # Try adding .exe or .cmd
39385    if test -f "${new_path}.exe"; then
39386      input_to_shortpath="${new_path}.exe"
39387    elif test -f "${new_path}.cmd"; then
39388      input_to_shortpath="${new_path}.cmd"
39389    else
39390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39391$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39392      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39393$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39394      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39395    fi
39396  else
39397    input_to_shortpath="$new_path"
39398  fi
39399
39400  # Call helper function which possibly converts this using DOS-style short mode.
39401  # If so, the updated path is stored in $new_path.
39402  new_path="$input_to_shortpath"
39403
39404  input_path="$input_to_shortpath"
39405  # Check if we need to convert this using DOS-style short mode. If the path
39406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39407  # take no chances and rewrite it.
39408  # Note: m4 eats our [], so we need to use [ and ] instead.
39409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39410  if test "x$has_forbidden_chars" != x; then
39411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39415      # Going to short mode and back again did indeed matter. Since short mode is
39416      # case insensitive, let's make it lowercase to improve readability.
39417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39418      # Now convert it back to Unix-style (cygpath)
39419      input_path=`$CYGPATH -u "$shortmode_path"`
39420      new_path="$input_path"
39421    fi
39422  fi
39423
39424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39425  if test "x$test_cygdrive_prefix" = x; then
39426    # As a simple fix, exclude /usr/bin since it's not a real path.
39427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39429      # a path prefixed by /cygdrive for fixpath to work.
39430      new_path="$CYGWIN_ROOT_PATH$input_path"
39431    fi
39432  fi
39433
39434  # remove trailing .exe if any
39435  new_path="${new_path/%.exe/}"
39436
39437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39438
39439  # First separate the path from the arguments. This will split at the first
39440  # space.
39441  complete="$DUMPBIN"
39442  path="${complete%% *}"
39443  tmp="$complete EOL"
39444  arguments="${tmp#* }"
39445
39446  # Input might be given as Windows format, start by converting to
39447  # unix format.
39448  new_path="$path"
39449
39450  windows_path="$new_path"
39451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39452    unix_path=`$CYGPATH -u "$windows_path"`
39453    new_path="$unix_path"
39454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39456    new_path="$unix_path"
39457  fi
39458
39459
39460  # Now try to locate executable using which
39461  new_path=`$WHICH "$new_path" 2> /dev/null`
39462
39463  if test "x$new_path" = x; then
39464    # Oops. Which didn't find the executable.
39465    # The splitting of arguments from the executable at a space might have been incorrect,
39466    # since paths with space are more likely in Windows. Give it another try with the whole
39467    # argument.
39468    path="$complete"
39469    arguments="EOL"
39470    new_path="$path"
39471
39472  windows_path="$new_path"
39473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39474    unix_path=`$CYGPATH -u "$windows_path"`
39475    new_path="$unix_path"
39476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39478    new_path="$unix_path"
39479  fi
39480
39481
39482    new_path=`$WHICH "$new_path" 2> /dev/null`
39483    # bat and cmd files are not always considered executable in MSYS causing which
39484    # to not find them
39485    if test "x$new_path" = x \
39486        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39487        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39488      new_path="$path"
39489
39490  windows_path="$new_path"
39491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39492    unix_path=`$CYGPATH -u "$windows_path"`
39493    new_path="$unix_path"
39494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39496    new_path="$unix_path"
39497  fi
39498
39499    fi
39500
39501    if test "x$new_path" = x; then
39502      # It's still not found. Now this is an unrecoverable error.
39503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39504$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39505      has_space=`$ECHO "$complete" | $GREP " "`
39506      if test "x$has_space" != x; then
39507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39509      fi
39510      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39511    fi
39512  fi
39513
39514  # Now new_path has a complete unix path to the binary
39515  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39516    # Keep paths in /bin as-is, but remove trailing .exe if any
39517    new_path="${new_path/%.exe/}"
39518    # Do not save /bin paths to all_fixpath_prefixes!
39519  else
39520    # Not in mixed or Windows style, start by that.
39521    new_path=`cmd //c echo $new_path`
39522
39523  input_path="$new_path"
39524  # Check if we need to convert this using DOS-style short mode. If the path
39525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39526  # take no chances and rewrite it.
39527  # Note: m4 eats our [], so we need to use [ and ] instead.
39528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39529  if test "x$has_forbidden_chars" != x; then
39530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39532  fi
39533
39534    # Output is in $new_path
39535
39536  windows_path="$new_path"
39537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39538    unix_path=`$CYGPATH -u "$windows_path"`
39539    new_path="$unix_path"
39540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39542    new_path="$unix_path"
39543  fi
39544
39545    # remove trailing .exe if any
39546    new_path="${new_path/%.exe/}"
39547
39548    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39549    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39550  fi
39551
39552    else
39553      # We're on a unix platform. Hooray! :)
39554      # First separate the path from the arguments. This will split at the first
39555      # space.
39556      complete="$DUMPBIN"
39557      path="${complete%% *}"
39558      tmp="$complete EOL"
39559      arguments="${tmp#* }"
39560
39561      # Cannot rely on the command "which" here since it doesn't always work.
39562      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39563      if test -z "$is_absolute_path"; then
39564        # Path to executable is not absolute. Find it.
39565        IFS_save="$IFS"
39566        IFS=:
39567        for p in $PATH; do
39568          if test -f "$p/$path" && test -x "$p/$path"; then
39569            new_path="$p/$path"
39570            break
39571          fi
39572        done
39573        IFS="$IFS_save"
39574      else
39575        # This is an absolute path, we can use it without further modifications.
39576        new_path="$path"
39577      fi
39578
39579      if test "x$new_path" = x; then
39580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39581$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39582        has_space=`$ECHO "$complete" | $GREP " "`
39583        if test "x$has_space" != x; then
39584          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39585$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39586        fi
39587        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39588      fi
39589    fi
39590
39591    # Now join together the path and the arguments once again
39592    if test "x$arguments" != xEOL; then
39593      new_complete="$new_path ${arguments% *}"
39594    else
39595      new_complete="$new_path"
39596    fi
39597
39598    if test "x$complete" != "x$new_complete"; then
39599      DUMPBIN="$new_complete"
39600      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39601$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39602    fi
39603  fi
39604
39605    # We need to check for 'msbuild.exe' because at the place where we expect to
39606    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39607    # won't find the 'msbuild.exe' executable in that case (and the
39608    # 'ac_executable_extensions' is unusable due to performance reasons).
39609    # Notice that we intentionally don't fix up the path to MSBUILD because we
39610    # will call it in a DOS shell during freetype detection on Windows (see
39611    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39612    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39613set dummy msbuild.exe; ac_word=$2
39614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39615$as_echo_n "checking for $ac_word... " >&6; }
39616if ${ac_cv_prog_MSBUILD+:} false; then :
39617  $as_echo_n "(cached) " >&6
39618else
39619  if test -n "$MSBUILD"; then
39620  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39621else
39622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39623for as_dir in $PATH
39624do
39625  IFS=$as_save_IFS
39626  test -z "$as_dir" && as_dir=.
39627    for ac_exec_ext in '' $ac_executable_extensions; do
39628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39629    ac_cv_prog_MSBUILD="msbuild.exe"
39630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39631    break 2
39632  fi
39633done
39634  done
39635IFS=$as_save_IFS
39636
39637fi
39638fi
39639MSBUILD=$ac_cv_prog_MSBUILD
39640if test -n "$MSBUILD"; then
39641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39642$as_echo "$MSBUILD" >&6; }
39643else
39644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39645$as_echo "no" >&6; }
39646fi
39647
39648
39649  fi
39650
39651  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39652
39653
39654  # Publish this variable in the help.
39655
39656
39657  if [ -z "${STRIP+x}" ]; then
39658    # The variable is not set by user, try to locate tool using the code snippet
39659    for ac_prog in strip
39660do
39661  # Extract the first word of "$ac_prog", so it can be a program name with args.
39662set dummy $ac_prog; ac_word=$2
39663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39664$as_echo_n "checking for $ac_word... " >&6; }
39665if ${ac_cv_path_STRIP+:} false; then :
39666  $as_echo_n "(cached) " >&6
39667else
39668  case $STRIP in
39669  [\\/]* | ?:[\\/]*)
39670  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39671  ;;
39672  *)
39673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39674for as_dir in $PATH
39675do
39676  IFS=$as_save_IFS
39677  test -z "$as_dir" && as_dir=.
39678    for ac_exec_ext in '' $ac_executable_extensions; do
39679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39680    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39682    break 2
39683  fi
39684done
39685  done
39686IFS=$as_save_IFS
39687
39688  ;;
39689esac
39690fi
39691STRIP=$ac_cv_path_STRIP
39692if test -n "$STRIP"; then
39693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39694$as_echo "$STRIP" >&6; }
39695else
39696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39697$as_echo "no" >&6; }
39698fi
39699
39700
39701  test -n "$STRIP" && break
39702done
39703
39704  else
39705    # The variable is set, but is it from the command line or the environment?
39706
39707    # Try to remove the string !STRIP! from our list.
39708    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39709    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39710      # If it failed, the variable was not from the command line. Ignore it,
39711      # but warn the user (except for BASH, which is always set by the calling BASH).
39712      if test "xSTRIP" != xBASH; then
39713        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39714$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39715      fi
39716      # Try to locate tool using the code snippet
39717      for ac_prog in strip
39718do
39719  # Extract the first word of "$ac_prog", so it can be a program name with args.
39720set dummy $ac_prog; ac_word=$2
39721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39722$as_echo_n "checking for $ac_word... " >&6; }
39723if ${ac_cv_path_STRIP+:} false; then :
39724  $as_echo_n "(cached) " >&6
39725else
39726  case $STRIP in
39727  [\\/]* | ?:[\\/]*)
39728  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39729  ;;
39730  *)
39731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39732for as_dir in $PATH
39733do
39734  IFS=$as_save_IFS
39735  test -z "$as_dir" && as_dir=.
39736    for ac_exec_ext in '' $ac_executable_extensions; do
39737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39738    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39740    break 2
39741  fi
39742done
39743  done
39744IFS=$as_save_IFS
39745
39746  ;;
39747esac
39748fi
39749STRIP=$ac_cv_path_STRIP
39750if test -n "$STRIP"; then
39751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39752$as_echo "$STRIP" >&6; }
39753else
39754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39755$as_echo "no" >&6; }
39756fi
39757
39758
39759  test -n "$STRIP" && break
39760done
39761
39762    else
39763      # If it succeeded, then it was overridden by the user. We will use it
39764      # for the tool.
39765
39766      # First remove it from the list of overridden variables, so we can test
39767      # for unknown variables in the end.
39768      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39769
39770      # Check if we try to supply an empty value
39771      if test "x$STRIP" = x; then
39772        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39773$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39775$as_echo_n "checking for STRIP... " >&6; }
39776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39777$as_echo "disabled" >&6; }
39778      else
39779        # Check if the provided tool contains a complete path.
39780        tool_specified="$STRIP"
39781        tool_basename="${tool_specified##*/}"
39782        if test "x$tool_basename" = "x$tool_specified"; then
39783          # A command without a complete path is provided, search $PATH.
39784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39785$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39786          # Extract the first word of "$tool_basename", so it can be a program name with args.
39787set dummy $tool_basename; ac_word=$2
39788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39789$as_echo_n "checking for $ac_word... " >&6; }
39790if ${ac_cv_path_STRIP+:} false; then :
39791  $as_echo_n "(cached) " >&6
39792else
39793  case $STRIP in
39794  [\\/]* | ?:[\\/]*)
39795  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39796  ;;
39797  *)
39798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39799for as_dir in $PATH
39800do
39801  IFS=$as_save_IFS
39802  test -z "$as_dir" && as_dir=.
39803    for ac_exec_ext in '' $ac_executable_extensions; do
39804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39805    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39807    break 2
39808  fi
39809done
39810  done
39811IFS=$as_save_IFS
39812
39813  ;;
39814esac
39815fi
39816STRIP=$ac_cv_path_STRIP
39817if test -n "$STRIP"; then
39818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39819$as_echo "$STRIP" >&6; }
39820else
39821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39822$as_echo "no" >&6; }
39823fi
39824
39825
39826          if test "x$STRIP" = x; then
39827            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39828          fi
39829        else
39830          # Otherwise we believe it is a complete path. Use it as it is.
39831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39832$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39834$as_echo_n "checking for STRIP... " >&6; }
39835          if test ! -x "$tool_specified"; then
39836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39837$as_echo "not found" >&6; }
39838            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39839          fi
39840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39841$as_echo "$tool_specified" >&6; }
39842        fi
39843      fi
39844    fi
39845
39846  fi
39847
39848
39849
39850  # Only process if variable expands to non-empty
39851
39852  if test "x$STRIP" != x; then
39853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39854
39855  # First separate the path from the arguments. This will split at the first
39856  # space.
39857  complete="$STRIP"
39858  path="${complete%% *}"
39859  tmp="$complete EOL"
39860  arguments="${tmp#* }"
39861
39862  # Input might be given as Windows format, start by converting to
39863  # unix format.
39864  new_path=`$CYGPATH -u "$path"`
39865
39866  # Now try to locate executable using which
39867  new_path=`$WHICH "$new_path" 2> /dev/null`
39868  # bat and cmd files are not always considered executable in cygwin causing which
39869  # to not find them
39870  if test "x$new_path" = x \
39871      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39872      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39873    new_path=`$CYGPATH -u "$path"`
39874  fi
39875  if test "x$new_path" = x; then
39876    # Oops. Which didn't find the executable.
39877    # The splitting of arguments from the executable at a space might have been incorrect,
39878    # since paths with space are more likely in Windows. Give it another try with the whole
39879    # argument.
39880    path="$complete"
39881    arguments="EOL"
39882    new_path=`$CYGPATH -u "$path"`
39883    new_path=`$WHICH "$new_path" 2> /dev/null`
39884    # bat and cmd files are not always considered executable in cygwin causing which
39885    # to not find them
39886    if test "x$new_path" = x \
39887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39889      new_path=`$CYGPATH -u "$path"`
39890    fi
39891    if test "x$new_path" = x; then
39892      # It's still not found. Now this is an unrecoverable error.
39893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39894$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39895      has_space=`$ECHO "$complete" | $GREP " "`
39896      if test "x$has_space" != x; then
39897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39899      fi
39900      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39901    fi
39902  fi
39903
39904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39907  # "foo.exe" is OK but "foo" is an error.
39908  #
39909  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39910  # It is also a way to make sure we got the proper file name for the real test later on.
39911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39912  if test "x$test_shortpath" = x; then
39913    # Short path failed, file does not exist as specified.
39914    # Try adding .exe or .cmd
39915    if test -f "${new_path}.exe"; then
39916      input_to_shortpath="${new_path}.exe"
39917    elif test -f "${new_path}.cmd"; then
39918      input_to_shortpath="${new_path}.cmd"
39919    else
39920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39921$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39922      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39923$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39924      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39925    fi
39926  else
39927    input_to_shortpath="$new_path"
39928  fi
39929
39930  # Call helper function which possibly converts this using DOS-style short mode.
39931  # If so, the updated path is stored in $new_path.
39932  new_path="$input_to_shortpath"
39933
39934  input_path="$input_to_shortpath"
39935  # Check if we need to convert this using DOS-style short mode. If the path
39936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39937  # take no chances and rewrite it.
39938  # Note: m4 eats our [], so we need to use [ and ] instead.
39939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39940  if test "x$has_forbidden_chars" != x; then
39941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39945      # Going to short mode and back again did indeed matter. Since short mode is
39946      # case insensitive, let's make it lowercase to improve readability.
39947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39948      # Now convert it back to Unix-style (cygpath)
39949      input_path=`$CYGPATH -u "$shortmode_path"`
39950      new_path="$input_path"
39951    fi
39952  fi
39953
39954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39955  if test "x$test_cygdrive_prefix" = x; then
39956    # As a simple fix, exclude /usr/bin since it's not a real path.
39957    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39959      # a path prefixed by /cygdrive for fixpath to work.
39960      new_path="$CYGWIN_ROOT_PATH$input_path"
39961    fi
39962  fi
39963
39964  # remove trailing .exe if any
39965  new_path="${new_path/%.exe/}"
39966
39967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39968
39969  # First separate the path from the arguments. This will split at the first
39970  # space.
39971  complete="$STRIP"
39972  path="${complete%% *}"
39973  tmp="$complete EOL"
39974  arguments="${tmp#* }"
39975
39976  # Input might be given as Windows format, start by converting to
39977  # unix format.
39978  new_path="$path"
39979
39980  windows_path="$new_path"
39981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39982    unix_path=`$CYGPATH -u "$windows_path"`
39983    new_path="$unix_path"
39984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39986    new_path="$unix_path"
39987  fi
39988
39989
39990  # Now try to locate executable using which
39991  new_path=`$WHICH "$new_path" 2> /dev/null`
39992
39993  if test "x$new_path" = x; then
39994    # Oops. Which didn't find the executable.
39995    # The splitting of arguments from the executable at a space might have been incorrect,
39996    # since paths with space are more likely in Windows. Give it another try with the whole
39997    # argument.
39998    path="$complete"
39999    arguments="EOL"
40000    new_path="$path"
40001
40002  windows_path="$new_path"
40003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40004    unix_path=`$CYGPATH -u "$windows_path"`
40005    new_path="$unix_path"
40006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40008    new_path="$unix_path"
40009  fi
40010
40011
40012    new_path=`$WHICH "$new_path" 2> /dev/null`
40013    # bat and cmd files are not always considered executable in MSYS causing which
40014    # to not find them
40015    if test "x$new_path" = x \
40016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40018      new_path="$path"
40019
40020  windows_path="$new_path"
40021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40022    unix_path=`$CYGPATH -u "$windows_path"`
40023    new_path="$unix_path"
40024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40026    new_path="$unix_path"
40027  fi
40028
40029    fi
40030
40031    if test "x$new_path" = x; then
40032      # It's still not found. Now this is an unrecoverable error.
40033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40034$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40035      has_space=`$ECHO "$complete" | $GREP " "`
40036      if test "x$has_space" != x; then
40037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40039      fi
40040      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40041    fi
40042  fi
40043
40044  # Now new_path has a complete unix path to the binary
40045  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40046    # Keep paths in /bin as-is, but remove trailing .exe if any
40047    new_path="${new_path/%.exe/}"
40048    # Do not save /bin paths to all_fixpath_prefixes!
40049  else
40050    # Not in mixed or Windows style, start by that.
40051    new_path=`cmd //c echo $new_path`
40052
40053  input_path="$new_path"
40054  # Check if we need to convert this using DOS-style short mode. If the path
40055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40056  # take no chances and rewrite it.
40057  # Note: m4 eats our [], so we need to use [ and ] instead.
40058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40059  if test "x$has_forbidden_chars" != x; then
40060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40062  fi
40063
40064    # Output is in $new_path
40065
40066  windows_path="$new_path"
40067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40068    unix_path=`$CYGPATH -u "$windows_path"`
40069    new_path="$unix_path"
40070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40072    new_path="$unix_path"
40073  fi
40074
40075    # remove trailing .exe if any
40076    new_path="${new_path/%.exe/}"
40077
40078    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40079    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40080  fi
40081
40082    else
40083      # We're on a unix platform. Hooray! :)
40084      # First separate the path from the arguments. This will split at the first
40085      # space.
40086      complete="$STRIP"
40087      path="${complete%% *}"
40088      tmp="$complete EOL"
40089      arguments="${tmp#* }"
40090
40091      # Cannot rely on the command "which" here since it doesn't always work.
40092      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40093      if test -z "$is_absolute_path"; then
40094        # Path to executable is not absolute. Find it.
40095        IFS_save="$IFS"
40096        IFS=:
40097        for p in $PATH; do
40098          if test -f "$p/$path" && test -x "$p/$path"; then
40099            new_path="$p/$path"
40100            break
40101          fi
40102        done
40103        IFS="$IFS_save"
40104      else
40105        # This is an absolute path, we can use it without further modifications.
40106        new_path="$path"
40107      fi
40108
40109      if test "x$new_path" = x; then
40110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40111$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40112        has_space=`$ECHO "$complete" | $GREP " "`
40113        if test "x$has_space" != x; then
40114          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40115$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40116        fi
40117        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40118      fi
40119    fi
40120
40121    # Now join together the path and the arguments once again
40122    if test "x$arguments" != xEOL; then
40123      new_complete="$new_path ${arguments% *}"
40124    else
40125      new_complete="$new_path"
40126    fi
40127
40128    if test "x$complete" != "x$new_complete"; then
40129      STRIP="$new_complete"
40130      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40131$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40132    fi
40133  fi
40134
40135
40136
40137  # Publish this variable in the help.
40138
40139
40140  if [ -z "${NM+x}" ]; then
40141    # The variable is not set by user, try to locate tool using the code snippet
40142    for ac_prog in nm
40143do
40144  # Extract the first word of "$ac_prog", so it can be a program name with args.
40145set dummy $ac_prog; ac_word=$2
40146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40147$as_echo_n "checking for $ac_word... " >&6; }
40148if ${ac_cv_path_NM+:} false; then :
40149  $as_echo_n "(cached) " >&6
40150else
40151  case $NM in
40152  [\\/]* | ?:[\\/]*)
40153  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40154  ;;
40155  *)
40156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40157for as_dir in $PATH
40158do
40159  IFS=$as_save_IFS
40160  test -z "$as_dir" && as_dir=.
40161    for ac_exec_ext in '' $ac_executable_extensions; do
40162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40163    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40165    break 2
40166  fi
40167done
40168  done
40169IFS=$as_save_IFS
40170
40171  ;;
40172esac
40173fi
40174NM=$ac_cv_path_NM
40175if test -n "$NM"; then
40176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40177$as_echo "$NM" >&6; }
40178else
40179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40180$as_echo "no" >&6; }
40181fi
40182
40183
40184  test -n "$NM" && break
40185done
40186
40187  else
40188    # The variable is set, but is it from the command line or the environment?
40189
40190    # Try to remove the string !NM! from our list.
40191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40193      # If it failed, the variable was not from the command line. Ignore it,
40194      # but warn the user (except for BASH, which is always set by the calling BASH).
40195      if test "xNM" != xBASH; then
40196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40197$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40198      fi
40199      # Try to locate tool using the code snippet
40200      for ac_prog in nm
40201do
40202  # Extract the first word of "$ac_prog", so it can be a program name with args.
40203set dummy $ac_prog; ac_word=$2
40204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40205$as_echo_n "checking for $ac_word... " >&6; }
40206if ${ac_cv_path_NM+:} false; then :
40207  $as_echo_n "(cached) " >&6
40208else
40209  case $NM in
40210  [\\/]* | ?:[\\/]*)
40211  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40212  ;;
40213  *)
40214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40215for as_dir in $PATH
40216do
40217  IFS=$as_save_IFS
40218  test -z "$as_dir" && as_dir=.
40219    for ac_exec_ext in '' $ac_executable_extensions; do
40220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40221    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40223    break 2
40224  fi
40225done
40226  done
40227IFS=$as_save_IFS
40228
40229  ;;
40230esac
40231fi
40232NM=$ac_cv_path_NM
40233if test -n "$NM"; then
40234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40235$as_echo "$NM" >&6; }
40236else
40237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40238$as_echo "no" >&6; }
40239fi
40240
40241
40242  test -n "$NM" && break
40243done
40244
40245    else
40246      # If it succeeded, then it was overridden by the user. We will use it
40247      # for the tool.
40248
40249      # First remove it from the list of overridden variables, so we can test
40250      # for unknown variables in the end.
40251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40252
40253      # Check if we try to supply an empty value
40254      if test "x$NM" = x; then
40255        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40256$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40258$as_echo_n "checking for NM... " >&6; }
40259        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40260$as_echo "disabled" >&6; }
40261      else
40262        # Check if the provided tool contains a complete path.
40263        tool_specified="$NM"
40264        tool_basename="${tool_specified##*/}"
40265        if test "x$tool_basename" = "x$tool_specified"; then
40266          # A command without a complete path is provided, search $PATH.
40267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40268$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40269          # Extract the first word of "$tool_basename", so it can be a program name with args.
40270set dummy $tool_basename; ac_word=$2
40271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40272$as_echo_n "checking for $ac_word... " >&6; }
40273if ${ac_cv_path_NM+:} false; then :
40274  $as_echo_n "(cached) " >&6
40275else
40276  case $NM in
40277  [\\/]* | ?:[\\/]*)
40278  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40279  ;;
40280  *)
40281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40282for as_dir in $PATH
40283do
40284  IFS=$as_save_IFS
40285  test -z "$as_dir" && as_dir=.
40286    for ac_exec_ext in '' $ac_executable_extensions; do
40287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40288    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40290    break 2
40291  fi
40292done
40293  done
40294IFS=$as_save_IFS
40295
40296  ;;
40297esac
40298fi
40299NM=$ac_cv_path_NM
40300if test -n "$NM"; then
40301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40302$as_echo "$NM" >&6; }
40303else
40304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40305$as_echo "no" >&6; }
40306fi
40307
40308
40309          if test "x$NM" = x; then
40310            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40311          fi
40312        else
40313          # Otherwise we believe it is a complete path. Use it as it is.
40314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40315$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40316          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40317$as_echo_n "checking for NM... " >&6; }
40318          if test ! -x "$tool_specified"; then
40319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40320$as_echo "not found" >&6; }
40321            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40322          fi
40323          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40324$as_echo "$tool_specified" >&6; }
40325        fi
40326      fi
40327    fi
40328
40329  fi
40330
40331
40332
40333  # Only process if variable expands to non-empty
40334
40335  if test "x$NM" != x; then
40336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40337
40338  # First separate the path from the arguments. This will split at the first
40339  # space.
40340  complete="$NM"
40341  path="${complete%% *}"
40342  tmp="$complete EOL"
40343  arguments="${tmp#* }"
40344
40345  # Input might be given as Windows format, start by converting to
40346  # unix format.
40347  new_path=`$CYGPATH -u "$path"`
40348
40349  # Now try to locate executable using which
40350  new_path=`$WHICH "$new_path" 2> /dev/null`
40351  # bat and cmd files are not always considered executable in cygwin causing which
40352  # to not find them
40353  if test "x$new_path" = x \
40354      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40355      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40356    new_path=`$CYGPATH -u "$path"`
40357  fi
40358  if test "x$new_path" = x; then
40359    # Oops. Which didn't find the executable.
40360    # The splitting of arguments from the executable at a space might have been incorrect,
40361    # since paths with space are more likely in Windows. Give it another try with the whole
40362    # argument.
40363    path="$complete"
40364    arguments="EOL"
40365    new_path=`$CYGPATH -u "$path"`
40366    new_path=`$WHICH "$new_path" 2> /dev/null`
40367    # bat and cmd files are not always considered executable in cygwin causing which
40368    # to not find them
40369    if test "x$new_path" = x \
40370        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40371        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40372      new_path=`$CYGPATH -u "$path"`
40373    fi
40374    if test "x$new_path" = x; then
40375      # It's still not found. Now this is an unrecoverable error.
40376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40377$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40378      has_space=`$ECHO "$complete" | $GREP " "`
40379      if test "x$has_space" != x; then
40380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40382      fi
40383      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40384    fi
40385  fi
40386
40387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40390  # "foo.exe" is OK but "foo" is an error.
40391  #
40392  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40393  # It is also a way to make sure we got the proper file name for the real test later on.
40394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40395  if test "x$test_shortpath" = x; then
40396    # Short path failed, file does not exist as specified.
40397    # Try adding .exe or .cmd
40398    if test -f "${new_path}.exe"; then
40399      input_to_shortpath="${new_path}.exe"
40400    elif test -f "${new_path}.cmd"; then
40401      input_to_shortpath="${new_path}.cmd"
40402    else
40403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40404$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40407      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40408    fi
40409  else
40410    input_to_shortpath="$new_path"
40411  fi
40412
40413  # Call helper function which possibly converts this using DOS-style short mode.
40414  # If so, the updated path is stored in $new_path.
40415  new_path="$input_to_shortpath"
40416
40417  input_path="$input_to_shortpath"
40418  # Check if we need to convert this using DOS-style short mode. If the path
40419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40420  # take no chances and rewrite it.
40421  # Note: m4 eats our [], so we need to use [ and ] instead.
40422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40423  if test "x$has_forbidden_chars" != x; then
40424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40428      # Going to short mode and back again did indeed matter. Since short mode is
40429      # case insensitive, let's make it lowercase to improve readability.
40430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40431      # Now convert it back to Unix-style (cygpath)
40432      input_path=`$CYGPATH -u "$shortmode_path"`
40433      new_path="$input_path"
40434    fi
40435  fi
40436
40437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40438  if test "x$test_cygdrive_prefix" = x; then
40439    # As a simple fix, exclude /usr/bin since it's not a real path.
40440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40442      # a path prefixed by /cygdrive for fixpath to work.
40443      new_path="$CYGWIN_ROOT_PATH$input_path"
40444    fi
40445  fi
40446
40447  # remove trailing .exe if any
40448  new_path="${new_path/%.exe/}"
40449
40450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40451
40452  # First separate the path from the arguments. This will split at the first
40453  # space.
40454  complete="$NM"
40455  path="${complete%% *}"
40456  tmp="$complete EOL"
40457  arguments="${tmp#* }"
40458
40459  # Input might be given as Windows format, start by converting to
40460  # unix format.
40461  new_path="$path"
40462
40463  windows_path="$new_path"
40464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40465    unix_path=`$CYGPATH -u "$windows_path"`
40466    new_path="$unix_path"
40467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40469    new_path="$unix_path"
40470  fi
40471
40472
40473  # Now try to locate executable using which
40474  new_path=`$WHICH "$new_path" 2> /dev/null`
40475
40476  if test "x$new_path" = x; then
40477    # Oops. Which didn't find the executable.
40478    # The splitting of arguments from the executable at a space might have been incorrect,
40479    # since paths with space are more likely in Windows. Give it another try with the whole
40480    # argument.
40481    path="$complete"
40482    arguments="EOL"
40483    new_path="$path"
40484
40485  windows_path="$new_path"
40486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40487    unix_path=`$CYGPATH -u "$windows_path"`
40488    new_path="$unix_path"
40489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40491    new_path="$unix_path"
40492  fi
40493
40494
40495    new_path=`$WHICH "$new_path" 2> /dev/null`
40496    # bat and cmd files are not always considered executable in MSYS causing which
40497    # to not find them
40498    if test "x$new_path" = x \
40499        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40500        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40501      new_path="$path"
40502
40503  windows_path="$new_path"
40504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40505    unix_path=`$CYGPATH -u "$windows_path"`
40506    new_path="$unix_path"
40507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40509    new_path="$unix_path"
40510  fi
40511
40512    fi
40513
40514    if test "x$new_path" = x; then
40515      # It's still not found. Now this is an unrecoverable error.
40516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40517$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40518      has_space=`$ECHO "$complete" | $GREP " "`
40519      if test "x$has_space" != x; then
40520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40522      fi
40523      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40524    fi
40525  fi
40526
40527  # Now new_path has a complete unix path to the binary
40528  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40529    # Keep paths in /bin as-is, but remove trailing .exe if any
40530    new_path="${new_path/%.exe/}"
40531    # Do not save /bin paths to all_fixpath_prefixes!
40532  else
40533    # Not in mixed or Windows style, start by that.
40534    new_path=`cmd //c echo $new_path`
40535
40536  input_path="$new_path"
40537  # Check if we need to convert this using DOS-style short mode. If the path
40538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40539  # take no chances and rewrite it.
40540  # Note: m4 eats our [], so we need to use [ and ] instead.
40541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40542  if test "x$has_forbidden_chars" != x; then
40543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40545  fi
40546
40547    # Output is in $new_path
40548
40549  windows_path="$new_path"
40550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40551    unix_path=`$CYGPATH -u "$windows_path"`
40552    new_path="$unix_path"
40553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40555    new_path="$unix_path"
40556  fi
40557
40558    # remove trailing .exe if any
40559    new_path="${new_path/%.exe/}"
40560
40561    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40562    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40563  fi
40564
40565    else
40566      # We're on a unix platform. Hooray! :)
40567      # First separate the path from the arguments. This will split at the first
40568      # space.
40569      complete="$NM"
40570      path="${complete%% *}"
40571      tmp="$complete EOL"
40572      arguments="${tmp#* }"
40573
40574      # Cannot rely on the command "which" here since it doesn't always work.
40575      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40576      if test -z "$is_absolute_path"; then
40577        # Path to executable is not absolute. Find it.
40578        IFS_save="$IFS"
40579        IFS=:
40580        for p in $PATH; do
40581          if test -f "$p/$path" && test -x "$p/$path"; then
40582            new_path="$p/$path"
40583            break
40584          fi
40585        done
40586        IFS="$IFS_save"
40587      else
40588        # This is an absolute path, we can use it without further modifications.
40589        new_path="$path"
40590      fi
40591
40592      if test "x$new_path" = x; then
40593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40594$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40595        has_space=`$ECHO "$complete" | $GREP " "`
40596        if test "x$has_space" != x; then
40597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40599        fi
40600        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40601      fi
40602    fi
40603
40604    # Now join together the path and the arguments once again
40605    if test "x$arguments" != xEOL; then
40606      new_complete="$new_path ${arguments% *}"
40607    else
40608      new_complete="$new_path"
40609    fi
40610
40611    if test "x$complete" != "x$new_complete"; then
40612      NM="$new_complete"
40613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40614$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40615    fi
40616  fi
40617
40618
40619
40620  # Publish this variable in the help.
40621
40622
40623  if [ -z "${GNM+x}" ]; then
40624    # The variable is not set by user, try to locate tool using the code snippet
40625    for ac_prog in gnm
40626do
40627  # Extract the first word of "$ac_prog", so it can be a program name with args.
40628set dummy $ac_prog; ac_word=$2
40629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40630$as_echo_n "checking for $ac_word... " >&6; }
40631if ${ac_cv_path_GNM+:} false; then :
40632  $as_echo_n "(cached) " >&6
40633else
40634  case $GNM in
40635  [\\/]* | ?:[\\/]*)
40636  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40637  ;;
40638  *)
40639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40640for as_dir in $PATH
40641do
40642  IFS=$as_save_IFS
40643  test -z "$as_dir" && as_dir=.
40644    for ac_exec_ext in '' $ac_executable_extensions; do
40645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40646    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40648    break 2
40649  fi
40650done
40651  done
40652IFS=$as_save_IFS
40653
40654  ;;
40655esac
40656fi
40657GNM=$ac_cv_path_GNM
40658if test -n "$GNM"; then
40659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40660$as_echo "$GNM" >&6; }
40661else
40662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40663$as_echo "no" >&6; }
40664fi
40665
40666
40667  test -n "$GNM" && break
40668done
40669
40670  else
40671    # The variable is set, but is it from the command line or the environment?
40672
40673    # Try to remove the string !GNM! from our list.
40674    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40675    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40676      # If it failed, the variable was not from the command line. Ignore it,
40677      # but warn the user (except for BASH, which is always set by the calling BASH).
40678      if test "xGNM" != xBASH; then
40679        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40680$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40681      fi
40682      # Try to locate tool using the code snippet
40683      for ac_prog in gnm
40684do
40685  # Extract the first word of "$ac_prog", so it can be a program name with args.
40686set dummy $ac_prog; ac_word=$2
40687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40688$as_echo_n "checking for $ac_word... " >&6; }
40689if ${ac_cv_path_GNM+:} false; then :
40690  $as_echo_n "(cached) " >&6
40691else
40692  case $GNM in
40693  [\\/]* | ?:[\\/]*)
40694  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40695  ;;
40696  *)
40697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40698for as_dir in $PATH
40699do
40700  IFS=$as_save_IFS
40701  test -z "$as_dir" && as_dir=.
40702    for ac_exec_ext in '' $ac_executable_extensions; do
40703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40704    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40706    break 2
40707  fi
40708done
40709  done
40710IFS=$as_save_IFS
40711
40712  ;;
40713esac
40714fi
40715GNM=$ac_cv_path_GNM
40716if test -n "$GNM"; then
40717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40718$as_echo "$GNM" >&6; }
40719else
40720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40721$as_echo "no" >&6; }
40722fi
40723
40724
40725  test -n "$GNM" && break
40726done
40727
40728    else
40729      # If it succeeded, then it was overridden by the user. We will use it
40730      # for the tool.
40731
40732      # First remove it from the list of overridden variables, so we can test
40733      # for unknown variables in the end.
40734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40735
40736      # Check if we try to supply an empty value
40737      if test "x$GNM" = x; then
40738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40739$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40741$as_echo_n "checking for GNM... " >&6; }
40742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40743$as_echo "disabled" >&6; }
40744      else
40745        # Check if the provided tool contains a complete path.
40746        tool_specified="$GNM"
40747        tool_basename="${tool_specified##*/}"
40748        if test "x$tool_basename" = "x$tool_specified"; then
40749          # A command without a complete path is provided, search $PATH.
40750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40751$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40752          # Extract the first word of "$tool_basename", so it can be a program name with args.
40753set dummy $tool_basename; ac_word=$2
40754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40755$as_echo_n "checking for $ac_word... " >&6; }
40756if ${ac_cv_path_GNM+:} false; then :
40757  $as_echo_n "(cached) " >&6
40758else
40759  case $GNM in
40760  [\\/]* | ?:[\\/]*)
40761  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40762  ;;
40763  *)
40764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40765for as_dir in $PATH
40766do
40767  IFS=$as_save_IFS
40768  test -z "$as_dir" && as_dir=.
40769    for ac_exec_ext in '' $ac_executable_extensions; do
40770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40771    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40773    break 2
40774  fi
40775done
40776  done
40777IFS=$as_save_IFS
40778
40779  ;;
40780esac
40781fi
40782GNM=$ac_cv_path_GNM
40783if test -n "$GNM"; then
40784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40785$as_echo "$GNM" >&6; }
40786else
40787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40788$as_echo "no" >&6; }
40789fi
40790
40791
40792          if test "x$GNM" = x; then
40793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40794          fi
40795        else
40796          # Otherwise we believe it is a complete path. Use it as it is.
40797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40798$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40800$as_echo_n "checking for GNM... " >&6; }
40801          if test ! -x "$tool_specified"; then
40802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40803$as_echo "not found" >&6; }
40804            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40805          fi
40806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40807$as_echo "$tool_specified" >&6; }
40808        fi
40809      fi
40810    fi
40811
40812  fi
40813
40814
40815
40816  # Only process if variable expands to non-empty
40817
40818  if test "x$GNM" != x; then
40819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40820
40821  # First separate the path from the arguments. This will split at the first
40822  # space.
40823  complete="$GNM"
40824  path="${complete%% *}"
40825  tmp="$complete EOL"
40826  arguments="${tmp#* }"
40827
40828  # Input might be given as Windows format, start by converting to
40829  # unix format.
40830  new_path=`$CYGPATH -u "$path"`
40831
40832  # Now try to locate executable using which
40833  new_path=`$WHICH "$new_path" 2> /dev/null`
40834  # bat and cmd files are not always considered executable in cygwin causing which
40835  # to not find them
40836  if test "x$new_path" = x \
40837      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40838      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40839    new_path=`$CYGPATH -u "$path"`
40840  fi
40841  if test "x$new_path" = x; then
40842    # Oops. Which didn't find the executable.
40843    # The splitting of arguments from the executable at a space might have been incorrect,
40844    # since paths with space are more likely in Windows. Give it another try with the whole
40845    # argument.
40846    path="$complete"
40847    arguments="EOL"
40848    new_path=`$CYGPATH -u "$path"`
40849    new_path=`$WHICH "$new_path" 2> /dev/null`
40850    # bat and cmd files are not always considered executable in cygwin causing which
40851    # to not find them
40852    if test "x$new_path" = x \
40853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40855      new_path=`$CYGPATH -u "$path"`
40856    fi
40857    if test "x$new_path" = x; then
40858      # It's still not found. Now this is an unrecoverable error.
40859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40860$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40861      has_space=`$ECHO "$complete" | $GREP " "`
40862      if test "x$has_space" != x; then
40863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40865      fi
40866      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40867    fi
40868  fi
40869
40870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40873  # "foo.exe" is OK but "foo" is an error.
40874  #
40875  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40876  # It is also a way to make sure we got the proper file name for the real test later on.
40877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40878  if test "x$test_shortpath" = x; then
40879    # Short path failed, file does not exist as specified.
40880    # Try adding .exe or .cmd
40881    if test -f "${new_path}.exe"; then
40882      input_to_shortpath="${new_path}.exe"
40883    elif test -f "${new_path}.cmd"; then
40884      input_to_shortpath="${new_path}.cmd"
40885    else
40886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40887$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40890      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40891    fi
40892  else
40893    input_to_shortpath="$new_path"
40894  fi
40895
40896  # Call helper function which possibly converts this using DOS-style short mode.
40897  # If so, the updated path is stored in $new_path.
40898  new_path="$input_to_shortpath"
40899
40900  input_path="$input_to_shortpath"
40901  # Check if we need to convert this using DOS-style short mode. If the path
40902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40903  # take no chances and rewrite it.
40904  # Note: m4 eats our [], so we need to use [ and ] instead.
40905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40906  if test "x$has_forbidden_chars" != x; then
40907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40911      # Going to short mode and back again did indeed matter. Since short mode is
40912      # case insensitive, let's make it lowercase to improve readability.
40913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40914      # Now convert it back to Unix-style (cygpath)
40915      input_path=`$CYGPATH -u "$shortmode_path"`
40916      new_path="$input_path"
40917    fi
40918  fi
40919
40920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40921  if test "x$test_cygdrive_prefix" = x; then
40922    # As a simple fix, exclude /usr/bin since it's not a real path.
40923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40925      # a path prefixed by /cygdrive for fixpath to work.
40926      new_path="$CYGWIN_ROOT_PATH$input_path"
40927    fi
40928  fi
40929
40930  # remove trailing .exe if any
40931  new_path="${new_path/%.exe/}"
40932
40933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40934
40935  # First separate the path from the arguments. This will split at the first
40936  # space.
40937  complete="$GNM"
40938  path="${complete%% *}"
40939  tmp="$complete EOL"
40940  arguments="${tmp#* }"
40941
40942  # Input might be given as Windows format, start by converting to
40943  # unix format.
40944  new_path="$path"
40945
40946  windows_path="$new_path"
40947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40948    unix_path=`$CYGPATH -u "$windows_path"`
40949    new_path="$unix_path"
40950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40952    new_path="$unix_path"
40953  fi
40954
40955
40956  # Now try to locate executable using which
40957  new_path=`$WHICH "$new_path" 2> /dev/null`
40958
40959  if test "x$new_path" = x; then
40960    # Oops. Which didn't find the executable.
40961    # The splitting of arguments from the executable at a space might have been incorrect,
40962    # since paths with space are more likely in Windows. Give it another try with the whole
40963    # argument.
40964    path="$complete"
40965    arguments="EOL"
40966    new_path="$path"
40967
40968  windows_path="$new_path"
40969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40970    unix_path=`$CYGPATH -u "$windows_path"`
40971    new_path="$unix_path"
40972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40974    new_path="$unix_path"
40975  fi
40976
40977
40978    new_path=`$WHICH "$new_path" 2> /dev/null`
40979    # bat and cmd files are not always considered executable in MSYS causing which
40980    # to not find them
40981    if test "x$new_path" = x \
40982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40984      new_path="$path"
40985
40986  windows_path="$new_path"
40987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40988    unix_path=`$CYGPATH -u "$windows_path"`
40989    new_path="$unix_path"
40990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40992    new_path="$unix_path"
40993  fi
40994
40995    fi
40996
40997    if test "x$new_path" = x; then
40998      # It's still not found. Now this is an unrecoverable error.
40999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41000$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41001      has_space=`$ECHO "$complete" | $GREP " "`
41002      if test "x$has_space" != x; then
41003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41005      fi
41006      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41007    fi
41008  fi
41009
41010  # Now new_path has a complete unix path to the binary
41011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41012    # Keep paths in /bin as-is, but remove trailing .exe if any
41013    new_path="${new_path/%.exe/}"
41014    # Do not save /bin paths to all_fixpath_prefixes!
41015  else
41016    # Not in mixed or Windows style, start by that.
41017    new_path=`cmd //c echo $new_path`
41018
41019  input_path="$new_path"
41020  # Check if we need to convert this using DOS-style short mode. If the path
41021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41022  # take no chances and rewrite it.
41023  # Note: m4 eats our [], so we need to use [ and ] instead.
41024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41025  if test "x$has_forbidden_chars" != x; then
41026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41028  fi
41029
41030    # Output is in $new_path
41031
41032  windows_path="$new_path"
41033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41034    unix_path=`$CYGPATH -u "$windows_path"`
41035    new_path="$unix_path"
41036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41038    new_path="$unix_path"
41039  fi
41040
41041    # remove trailing .exe if any
41042    new_path="${new_path/%.exe/}"
41043
41044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41046  fi
41047
41048    else
41049      # We're on a unix platform. Hooray! :)
41050      # First separate the path from the arguments. This will split at the first
41051      # space.
41052      complete="$GNM"
41053      path="${complete%% *}"
41054      tmp="$complete EOL"
41055      arguments="${tmp#* }"
41056
41057      # Cannot rely on the command "which" here since it doesn't always work.
41058      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41059      if test -z "$is_absolute_path"; then
41060        # Path to executable is not absolute. Find it.
41061        IFS_save="$IFS"
41062        IFS=:
41063        for p in $PATH; do
41064          if test -f "$p/$path" && test -x "$p/$path"; then
41065            new_path="$p/$path"
41066            break
41067          fi
41068        done
41069        IFS="$IFS_save"
41070      else
41071        # This is an absolute path, we can use it without further modifications.
41072        new_path="$path"
41073      fi
41074
41075      if test "x$new_path" = x; then
41076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41077$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41078        has_space=`$ECHO "$complete" | $GREP " "`
41079        if test "x$has_space" != x; then
41080          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41082        fi
41083        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41084      fi
41085    fi
41086
41087    # Now join together the path and the arguments once again
41088    if test "x$arguments" != xEOL; then
41089      new_complete="$new_path ${arguments% *}"
41090    else
41091      new_complete="$new_path"
41092    fi
41093
41094    if test "x$complete" != "x$new_complete"; then
41095      GNM="$new_complete"
41096      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41097$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41098    fi
41099  fi
41100
41101  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41102    # FIXME: we should unify this with the solaris case above.
41103
41104
41105  # Publish this variable in the help.
41106
41107
41108  if [ -z "${STRIP+x}" ]; then
41109    # The variable is not set by user, try to locate tool using the code snippet
41110    if test -n "$ac_tool_prefix"; then
41111  for ac_prog in strip
41112  do
41113    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41114set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41116$as_echo_n "checking for $ac_word... " >&6; }
41117if ${ac_cv_prog_STRIP+:} false; then :
41118  $as_echo_n "(cached) " >&6
41119else
41120  if test -n "$STRIP"; then
41121  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41122else
41123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41124for as_dir in $PATH
41125do
41126  IFS=$as_save_IFS
41127  test -z "$as_dir" && as_dir=.
41128    for ac_exec_ext in '' $ac_executable_extensions; do
41129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41130    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41132    break 2
41133  fi
41134done
41135  done
41136IFS=$as_save_IFS
41137
41138fi
41139fi
41140STRIP=$ac_cv_prog_STRIP
41141if test -n "$STRIP"; then
41142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41143$as_echo "$STRIP" >&6; }
41144else
41145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41146$as_echo "no" >&6; }
41147fi
41148
41149
41150    test -n "$STRIP" && break
41151  done
41152fi
41153if test -z "$STRIP"; then
41154  ac_ct_STRIP=$STRIP
41155  for ac_prog in strip
41156do
41157  # Extract the first word of "$ac_prog", so it can be a program name with args.
41158set dummy $ac_prog; ac_word=$2
41159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41160$as_echo_n "checking for $ac_word... " >&6; }
41161if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41162  $as_echo_n "(cached) " >&6
41163else
41164  if test -n "$ac_ct_STRIP"; then
41165  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41166else
41167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41168for as_dir in $PATH
41169do
41170  IFS=$as_save_IFS
41171  test -z "$as_dir" && as_dir=.
41172    for ac_exec_ext in '' $ac_executable_extensions; do
41173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41174    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41176    break 2
41177  fi
41178done
41179  done
41180IFS=$as_save_IFS
41181
41182fi
41183fi
41184ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41185if test -n "$ac_ct_STRIP"; then
41186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41187$as_echo "$ac_ct_STRIP" >&6; }
41188else
41189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41190$as_echo "no" >&6; }
41191fi
41192
41193
41194  test -n "$ac_ct_STRIP" && break
41195done
41196
41197  if test "x$ac_ct_STRIP" = x; then
41198    STRIP=""
41199  else
41200    case $cross_compiling:$ac_tool_warned in
41201yes:)
41202{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41203$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41204ac_tool_warned=yes ;;
41205esac
41206    STRIP=$ac_ct_STRIP
41207  fi
41208fi
41209
41210  else
41211    # The variable is set, but is it from the command line or the environment?
41212
41213    # Try to remove the string !STRIP! from our list.
41214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41216      # If it failed, the variable was not from the command line. Ignore it,
41217      # but warn the user (except for BASH, which is always set by the calling BASH).
41218      if test "xSTRIP" != xBASH; then
41219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41220$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41221      fi
41222      # Try to locate tool using the code snippet
41223      if test -n "$ac_tool_prefix"; then
41224  for ac_prog in strip
41225  do
41226    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41229$as_echo_n "checking for $ac_word... " >&6; }
41230if ${ac_cv_prog_STRIP+:} false; then :
41231  $as_echo_n "(cached) " >&6
41232else
41233  if test -n "$STRIP"; then
41234  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41235else
41236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41237for as_dir in $PATH
41238do
41239  IFS=$as_save_IFS
41240  test -z "$as_dir" && as_dir=.
41241    for ac_exec_ext in '' $ac_executable_extensions; do
41242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41243    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41245    break 2
41246  fi
41247done
41248  done
41249IFS=$as_save_IFS
41250
41251fi
41252fi
41253STRIP=$ac_cv_prog_STRIP
41254if test -n "$STRIP"; then
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41256$as_echo "$STRIP" >&6; }
41257else
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41259$as_echo "no" >&6; }
41260fi
41261
41262
41263    test -n "$STRIP" && break
41264  done
41265fi
41266if test -z "$STRIP"; then
41267  ac_ct_STRIP=$STRIP
41268  for ac_prog in strip
41269do
41270  # Extract the first word of "$ac_prog", so it can be a program name with args.
41271set dummy $ac_prog; ac_word=$2
41272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41273$as_echo_n "checking for $ac_word... " >&6; }
41274if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41275  $as_echo_n "(cached) " >&6
41276else
41277  if test -n "$ac_ct_STRIP"; then
41278  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41279else
41280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41281for as_dir in $PATH
41282do
41283  IFS=$as_save_IFS
41284  test -z "$as_dir" && as_dir=.
41285    for ac_exec_ext in '' $ac_executable_extensions; do
41286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41287    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41289    break 2
41290  fi
41291done
41292  done
41293IFS=$as_save_IFS
41294
41295fi
41296fi
41297ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41298if test -n "$ac_ct_STRIP"; then
41299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41300$as_echo "$ac_ct_STRIP" >&6; }
41301else
41302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41303$as_echo "no" >&6; }
41304fi
41305
41306
41307  test -n "$ac_ct_STRIP" && break
41308done
41309
41310  if test "x$ac_ct_STRIP" = x; then
41311    STRIP=""
41312  else
41313    case $cross_compiling:$ac_tool_warned in
41314yes:)
41315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41317ac_tool_warned=yes ;;
41318esac
41319    STRIP=$ac_ct_STRIP
41320  fi
41321fi
41322
41323    else
41324      # If it succeeded, then it was overridden by the user. We will use it
41325      # for the tool.
41326
41327      # First remove it from the list of overridden variables, so we can test
41328      # for unknown variables in the end.
41329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41330
41331      # Check if we try to supply an empty value
41332      if test "x$STRIP" = x; then
41333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41334$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41336$as_echo_n "checking for STRIP... " >&6; }
41337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41338$as_echo "disabled" >&6; }
41339      else
41340        # Check if the provided tool contains a complete path.
41341        tool_specified="$STRIP"
41342        tool_basename="${tool_specified##*/}"
41343        if test "x$tool_basename" = "x$tool_specified"; then
41344          # A command without a complete path is provided, search $PATH.
41345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41346$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41347          # Extract the first word of "$tool_basename", so it can be a program name with args.
41348set dummy $tool_basename; ac_word=$2
41349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41350$as_echo_n "checking for $ac_word... " >&6; }
41351if ${ac_cv_path_STRIP+:} false; then :
41352  $as_echo_n "(cached) " >&6
41353else
41354  case $STRIP in
41355  [\\/]* | ?:[\\/]*)
41356  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41357  ;;
41358  *)
41359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41360for as_dir in $PATH
41361do
41362  IFS=$as_save_IFS
41363  test -z "$as_dir" && as_dir=.
41364    for ac_exec_ext in '' $ac_executable_extensions; do
41365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41366    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41368    break 2
41369  fi
41370done
41371  done
41372IFS=$as_save_IFS
41373
41374  ;;
41375esac
41376fi
41377STRIP=$ac_cv_path_STRIP
41378if test -n "$STRIP"; then
41379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41380$as_echo "$STRIP" >&6; }
41381else
41382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41383$as_echo "no" >&6; }
41384fi
41385
41386
41387          if test "x$STRIP" = x; then
41388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41389          fi
41390        else
41391          # Otherwise we believe it is a complete path. Use it as it is.
41392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41393$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41395$as_echo_n "checking for STRIP... " >&6; }
41396          if test ! -x "$tool_specified"; then
41397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41398$as_echo "not found" >&6; }
41399            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41400          fi
41401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41402$as_echo "$tool_specified" >&6; }
41403        fi
41404      fi
41405    fi
41406
41407  fi
41408
41409
41410
41411  # Only process if variable expands to non-empty
41412
41413  if test "x$STRIP" != x; then
41414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41415
41416  # First separate the path from the arguments. This will split at the first
41417  # space.
41418  complete="$STRIP"
41419  path="${complete%% *}"
41420  tmp="$complete EOL"
41421  arguments="${tmp#* }"
41422
41423  # Input might be given as Windows format, start by converting to
41424  # unix format.
41425  new_path=`$CYGPATH -u "$path"`
41426
41427  # Now try to locate executable using which
41428  new_path=`$WHICH "$new_path" 2> /dev/null`
41429  # bat and cmd files are not always considered executable in cygwin causing which
41430  # to not find them
41431  if test "x$new_path" = x \
41432      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41433      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41434    new_path=`$CYGPATH -u "$path"`
41435  fi
41436  if test "x$new_path" = x; then
41437    # Oops. Which didn't find the executable.
41438    # The splitting of arguments from the executable at a space might have been incorrect,
41439    # since paths with space are more likely in Windows. Give it another try with the whole
41440    # argument.
41441    path="$complete"
41442    arguments="EOL"
41443    new_path=`$CYGPATH -u "$path"`
41444    new_path=`$WHICH "$new_path" 2> /dev/null`
41445    # bat and cmd files are not always considered executable in cygwin causing which
41446    # to not find them
41447    if test "x$new_path" = x \
41448        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41449        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41450      new_path=`$CYGPATH -u "$path"`
41451    fi
41452    if test "x$new_path" = x; then
41453      # It's still not found. Now this is an unrecoverable error.
41454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41455$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41456      has_space=`$ECHO "$complete" | $GREP " "`
41457      if test "x$has_space" != x; then
41458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41460      fi
41461      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41462    fi
41463  fi
41464
41465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41468  # "foo.exe" is OK but "foo" is an error.
41469  #
41470  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41471  # It is also a way to make sure we got the proper file name for the real test later on.
41472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41473  if test "x$test_shortpath" = x; then
41474    # Short path failed, file does not exist as specified.
41475    # Try adding .exe or .cmd
41476    if test -f "${new_path}.exe"; then
41477      input_to_shortpath="${new_path}.exe"
41478    elif test -f "${new_path}.cmd"; then
41479      input_to_shortpath="${new_path}.cmd"
41480    else
41481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41482$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41483      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41484$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41485      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41486    fi
41487  else
41488    input_to_shortpath="$new_path"
41489  fi
41490
41491  # Call helper function which possibly converts this using DOS-style short mode.
41492  # If so, the updated path is stored in $new_path.
41493  new_path="$input_to_shortpath"
41494
41495  input_path="$input_to_shortpath"
41496  # Check if we need to convert this using DOS-style short mode. If the path
41497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41498  # take no chances and rewrite it.
41499  # Note: m4 eats our [], so we need to use [ and ] instead.
41500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41501  if test "x$has_forbidden_chars" != x; then
41502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41506      # Going to short mode and back again did indeed matter. Since short mode is
41507      # case insensitive, let's make it lowercase to improve readability.
41508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41509      # Now convert it back to Unix-style (cygpath)
41510      input_path=`$CYGPATH -u "$shortmode_path"`
41511      new_path="$input_path"
41512    fi
41513  fi
41514
41515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41516  if test "x$test_cygdrive_prefix" = x; then
41517    # As a simple fix, exclude /usr/bin since it's not a real path.
41518    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41520      # a path prefixed by /cygdrive for fixpath to work.
41521      new_path="$CYGWIN_ROOT_PATH$input_path"
41522    fi
41523  fi
41524
41525  # remove trailing .exe if any
41526  new_path="${new_path/%.exe/}"
41527
41528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41529
41530  # First separate the path from the arguments. This will split at the first
41531  # space.
41532  complete="$STRIP"
41533  path="${complete%% *}"
41534  tmp="$complete EOL"
41535  arguments="${tmp#* }"
41536
41537  # Input might be given as Windows format, start by converting to
41538  # unix format.
41539  new_path="$path"
41540
41541  windows_path="$new_path"
41542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41543    unix_path=`$CYGPATH -u "$windows_path"`
41544    new_path="$unix_path"
41545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41547    new_path="$unix_path"
41548  fi
41549
41550
41551  # Now try to locate executable using which
41552  new_path=`$WHICH "$new_path" 2> /dev/null`
41553
41554  if test "x$new_path" = x; then
41555    # Oops. Which didn't find the executable.
41556    # The splitting of arguments from the executable at a space might have been incorrect,
41557    # since paths with space are more likely in Windows. Give it another try with the whole
41558    # argument.
41559    path="$complete"
41560    arguments="EOL"
41561    new_path="$path"
41562
41563  windows_path="$new_path"
41564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41565    unix_path=`$CYGPATH -u "$windows_path"`
41566    new_path="$unix_path"
41567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41569    new_path="$unix_path"
41570  fi
41571
41572
41573    new_path=`$WHICH "$new_path" 2> /dev/null`
41574    # bat and cmd files are not always considered executable in MSYS causing which
41575    # to not find them
41576    if test "x$new_path" = x \
41577        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41578        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41579      new_path="$path"
41580
41581  windows_path="$new_path"
41582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41583    unix_path=`$CYGPATH -u "$windows_path"`
41584    new_path="$unix_path"
41585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41587    new_path="$unix_path"
41588  fi
41589
41590    fi
41591
41592    if test "x$new_path" = x; then
41593      # It's still not found. Now this is an unrecoverable error.
41594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41595$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41596      has_space=`$ECHO "$complete" | $GREP " "`
41597      if test "x$has_space" != x; then
41598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41600      fi
41601      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41602    fi
41603  fi
41604
41605  # Now new_path has a complete unix path to the binary
41606  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41607    # Keep paths in /bin as-is, but remove trailing .exe if any
41608    new_path="${new_path/%.exe/}"
41609    # Do not save /bin paths to all_fixpath_prefixes!
41610  else
41611    # Not in mixed or Windows style, start by that.
41612    new_path=`cmd //c echo $new_path`
41613
41614  input_path="$new_path"
41615  # Check if we need to convert this using DOS-style short mode. If the path
41616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41617  # take no chances and rewrite it.
41618  # Note: m4 eats our [], so we need to use [ and ] instead.
41619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41620  if test "x$has_forbidden_chars" != x; then
41621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41623  fi
41624
41625    # Output is in $new_path
41626
41627  windows_path="$new_path"
41628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41629    unix_path=`$CYGPATH -u "$windows_path"`
41630    new_path="$unix_path"
41631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41633    new_path="$unix_path"
41634  fi
41635
41636    # remove trailing .exe if any
41637    new_path="${new_path/%.exe/}"
41638
41639    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41640    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41641  fi
41642
41643    else
41644      # We're on a unix platform. Hooray! :)
41645      # First separate the path from the arguments. This will split at the first
41646      # space.
41647      complete="$STRIP"
41648      path="${complete%% *}"
41649      tmp="$complete EOL"
41650      arguments="${tmp#* }"
41651
41652      # Cannot rely on the command "which" here since it doesn't always work.
41653      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41654      if test -z "$is_absolute_path"; then
41655        # Path to executable is not absolute. Find it.
41656        IFS_save="$IFS"
41657        IFS=:
41658        for p in $PATH; do
41659          if test -f "$p/$path" && test -x "$p/$path"; then
41660            new_path="$p/$path"
41661            break
41662          fi
41663        done
41664        IFS="$IFS_save"
41665      else
41666        # This is an absolute path, we can use it without further modifications.
41667        new_path="$path"
41668      fi
41669
41670      if test "x$new_path" = x; then
41671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41672$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41673        has_space=`$ECHO "$complete" | $GREP " "`
41674        if test "x$has_space" != x; then
41675          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41676$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41677        fi
41678        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41679      fi
41680    fi
41681
41682    # Now join together the path and the arguments once again
41683    if test "x$arguments" != xEOL; then
41684      new_complete="$new_path ${arguments% *}"
41685    else
41686      new_complete="$new_path"
41687    fi
41688
41689    if test "x$complete" != "x$new_complete"; then
41690      STRIP="$new_complete"
41691      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41692$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41693    fi
41694  fi
41695
41696    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41697
41698
41699  # Publish this variable in the help.
41700
41701
41702  if [ -z "${NM+x}" ]; then
41703    # The variable is not set by user, try to locate tool using the code snippet
41704    if test -n "$ac_tool_prefix"; then
41705  for ac_prog in nm gcc-nm
41706  do
41707    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41708set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41710$as_echo_n "checking for $ac_word... " >&6; }
41711if ${ac_cv_prog_NM+:} false; then :
41712  $as_echo_n "(cached) " >&6
41713else
41714  if test -n "$NM"; then
41715  ac_cv_prog_NM="$NM" # Let the user override the test.
41716else
41717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41718for as_dir in $PATH
41719do
41720  IFS=$as_save_IFS
41721  test -z "$as_dir" && as_dir=.
41722    for ac_exec_ext in '' $ac_executable_extensions; do
41723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41724    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41726    break 2
41727  fi
41728done
41729  done
41730IFS=$as_save_IFS
41731
41732fi
41733fi
41734NM=$ac_cv_prog_NM
41735if test -n "$NM"; then
41736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41737$as_echo "$NM" >&6; }
41738else
41739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41740$as_echo "no" >&6; }
41741fi
41742
41743
41744    test -n "$NM" && break
41745  done
41746fi
41747if test -z "$NM"; then
41748  ac_ct_NM=$NM
41749  for ac_prog in nm gcc-nm
41750do
41751  # Extract the first word of "$ac_prog", so it can be a program name with args.
41752set dummy $ac_prog; ac_word=$2
41753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41754$as_echo_n "checking for $ac_word... " >&6; }
41755if ${ac_cv_prog_ac_ct_NM+:} false; then :
41756  $as_echo_n "(cached) " >&6
41757else
41758  if test -n "$ac_ct_NM"; then
41759  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41760else
41761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41762for as_dir in $PATH
41763do
41764  IFS=$as_save_IFS
41765  test -z "$as_dir" && as_dir=.
41766    for ac_exec_ext in '' $ac_executable_extensions; do
41767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41768    ac_cv_prog_ac_ct_NM="$ac_prog"
41769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41770    break 2
41771  fi
41772done
41773  done
41774IFS=$as_save_IFS
41775
41776fi
41777fi
41778ac_ct_NM=$ac_cv_prog_ac_ct_NM
41779if test -n "$ac_ct_NM"; then
41780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41781$as_echo "$ac_ct_NM" >&6; }
41782else
41783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41784$as_echo "no" >&6; }
41785fi
41786
41787
41788  test -n "$ac_ct_NM" && break
41789done
41790
41791  if test "x$ac_ct_NM" = x; then
41792    NM=""
41793  else
41794    case $cross_compiling:$ac_tool_warned in
41795yes:)
41796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41798ac_tool_warned=yes ;;
41799esac
41800    NM=$ac_ct_NM
41801  fi
41802fi
41803
41804  else
41805    # The variable is set, but is it from the command line or the environment?
41806
41807    # Try to remove the string !NM! from our list.
41808    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41809    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41810      # If it failed, the variable was not from the command line. Ignore it,
41811      # but warn the user (except for BASH, which is always set by the calling BASH).
41812      if test "xNM" != xBASH; then
41813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41814$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41815      fi
41816      # Try to locate tool using the code snippet
41817      if test -n "$ac_tool_prefix"; then
41818  for ac_prog in nm gcc-nm
41819  do
41820    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41821set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41823$as_echo_n "checking for $ac_word... " >&6; }
41824if ${ac_cv_prog_NM+:} false; then :
41825  $as_echo_n "(cached) " >&6
41826else
41827  if test -n "$NM"; then
41828  ac_cv_prog_NM="$NM" # Let the user override the test.
41829else
41830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41831for as_dir in $PATH
41832do
41833  IFS=$as_save_IFS
41834  test -z "$as_dir" && as_dir=.
41835    for ac_exec_ext in '' $ac_executable_extensions; do
41836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41837    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41839    break 2
41840  fi
41841done
41842  done
41843IFS=$as_save_IFS
41844
41845fi
41846fi
41847NM=$ac_cv_prog_NM
41848if test -n "$NM"; then
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41850$as_echo "$NM" >&6; }
41851else
41852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41853$as_echo "no" >&6; }
41854fi
41855
41856
41857    test -n "$NM" && break
41858  done
41859fi
41860if test -z "$NM"; then
41861  ac_ct_NM=$NM
41862  for ac_prog in nm gcc-nm
41863do
41864  # Extract the first word of "$ac_prog", so it can be a program name with args.
41865set dummy $ac_prog; ac_word=$2
41866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41867$as_echo_n "checking for $ac_word... " >&6; }
41868if ${ac_cv_prog_ac_ct_NM+:} false; then :
41869  $as_echo_n "(cached) " >&6
41870else
41871  if test -n "$ac_ct_NM"; then
41872  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41873else
41874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41875for as_dir in $PATH
41876do
41877  IFS=$as_save_IFS
41878  test -z "$as_dir" && as_dir=.
41879    for ac_exec_ext in '' $ac_executable_extensions; do
41880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41881    ac_cv_prog_ac_ct_NM="$ac_prog"
41882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41883    break 2
41884  fi
41885done
41886  done
41887IFS=$as_save_IFS
41888
41889fi
41890fi
41891ac_ct_NM=$ac_cv_prog_ac_ct_NM
41892if test -n "$ac_ct_NM"; then
41893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41894$as_echo "$ac_ct_NM" >&6; }
41895else
41896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41897$as_echo "no" >&6; }
41898fi
41899
41900
41901  test -n "$ac_ct_NM" && break
41902done
41903
41904  if test "x$ac_ct_NM" = x; then
41905    NM=""
41906  else
41907    case $cross_compiling:$ac_tool_warned in
41908yes:)
41909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41911ac_tool_warned=yes ;;
41912esac
41913    NM=$ac_ct_NM
41914  fi
41915fi
41916
41917    else
41918      # If it succeeded, then it was overridden by the user. We will use it
41919      # for the tool.
41920
41921      # First remove it from the list of overridden variables, so we can test
41922      # for unknown variables in the end.
41923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41924
41925      # Check if we try to supply an empty value
41926      if test "x$NM" = x; then
41927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41928$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41930$as_echo_n "checking for NM... " >&6; }
41931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41932$as_echo "disabled" >&6; }
41933      else
41934        # Check if the provided tool contains a complete path.
41935        tool_specified="$NM"
41936        tool_basename="${tool_specified##*/}"
41937        if test "x$tool_basename" = "x$tool_specified"; then
41938          # A command without a complete path is provided, search $PATH.
41939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41940$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41941          # Extract the first word of "$tool_basename", so it can be a program name with args.
41942set dummy $tool_basename; ac_word=$2
41943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41944$as_echo_n "checking for $ac_word... " >&6; }
41945if ${ac_cv_path_NM+:} false; then :
41946  $as_echo_n "(cached) " >&6
41947else
41948  case $NM in
41949  [\\/]* | ?:[\\/]*)
41950  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41951  ;;
41952  *)
41953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41954for as_dir in $PATH
41955do
41956  IFS=$as_save_IFS
41957  test -z "$as_dir" && as_dir=.
41958    for ac_exec_ext in '' $ac_executable_extensions; do
41959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41960    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41962    break 2
41963  fi
41964done
41965  done
41966IFS=$as_save_IFS
41967
41968  ;;
41969esac
41970fi
41971NM=$ac_cv_path_NM
41972if test -n "$NM"; then
41973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41974$as_echo "$NM" >&6; }
41975else
41976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41977$as_echo "no" >&6; }
41978fi
41979
41980
41981          if test "x$NM" = x; then
41982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41983          fi
41984        else
41985          # Otherwise we believe it is a complete path. Use it as it is.
41986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41987$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41989$as_echo_n "checking for NM... " >&6; }
41990          if test ! -x "$tool_specified"; then
41991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41992$as_echo "not found" >&6; }
41993            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41994          fi
41995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41996$as_echo "$tool_specified" >&6; }
41997        fi
41998      fi
41999    fi
42000
42001  fi
42002
42003
42004    else
42005
42006
42007  # Publish this variable in the help.
42008
42009
42010  if [ -z "${NM+x}" ]; then
42011    # The variable is not set by user, try to locate tool using the code snippet
42012    if test -n "$ac_tool_prefix"; then
42013  for ac_prog in nm
42014  do
42015    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42016set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42018$as_echo_n "checking for $ac_word... " >&6; }
42019if ${ac_cv_prog_NM+:} false; then :
42020  $as_echo_n "(cached) " >&6
42021else
42022  if test -n "$NM"; then
42023  ac_cv_prog_NM="$NM" # Let the user override the test.
42024else
42025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42026for as_dir in $PATH
42027do
42028  IFS=$as_save_IFS
42029  test -z "$as_dir" && as_dir=.
42030    for ac_exec_ext in '' $ac_executable_extensions; do
42031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42032    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42034    break 2
42035  fi
42036done
42037  done
42038IFS=$as_save_IFS
42039
42040fi
42041fi
42042NM=$ac_cv_prog_NM
42043if test -n "$NM"; then
42044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42045$as_echo "$NM" >&6; }
42046else
42047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42048$as_echo "no" >&6; }
42049fi
42050
42051
42052    test -n "$NM" && break
42053  done
42054fi
42055if test -z "$NM"; then
42056  ac_ct_NM=$NM
42057  for ac_prog in nm
42058do
42059  # Extract the first word of "$ac_prog", so it can be a program name with args.
42060set dummy $ac_prog; ac_word=$2
42061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42062$as_echo_n "checking for $ac_word... " >&6; }
42063if ${ac_cv_prog_ac_ct_NM+:} false; then :
42064  $as_echo_n "(cached) " >&6
42065else
42066  if test -n "$ac_ct_NM"; then
42067  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42068else
42069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42070for as_dir in $PATH
42071do
42072  IFS=$as_save_IFS
42073  test -z "$as_dir" && as_dir=.
42074    for ac_exec_ext in '' $ac_executable_extensions; do
42075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42076    ac_cv_prog_ac_ct_NM="$ac_prog"
42077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42078    break 2
42079  fi
42080done
42081  done
42082IFS=$as_save_IFS
42083
42084fi
42085fi
42086ac_ct_NM=$ac_cv_prog_ac_ct_NM
42087if test -n "$ac_ct_NM"; then
42088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42089$as_echo "$ac_ct_NM" >&6; }
42090else
42091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42092$as_echo "no" >&6; }
42093fi
42094
42095
42096  test -n "$ac_ct_NM" && break
42097done
42098
42099  if test "x$ac_ct_NM" = x; then
42100    NM=""
42101  else
42102    case $cross_compiling:$ac_tool_warned in
42103yes:)
42104{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42105$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42106ac_tool_warned=yes ;;
42107esac
42108    NM=$ac_ct_NM
42109  fi
42110fi
42111
42112  else
42113    # The variable is set, but is it from the command line or the environment?
42114
42115    # Try to remove the string !NM! from our list.
42116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42118      # If it failed, the variable was not from the command line. Ignore it,
42119      # but warn the user (except for BASH, which is always set by the calling BASH).
42120      if test "xNM" != xBASH; then
42121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42122$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42123      fi
42124      # Try to locate tool using the code snippet
42125      if test -n "$ac_tool_prefix"; then
42126  for ac_prog in nm
42127  do
42128    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42129set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42131$as_echo_n "checking for $ac_word... " >&6; }
42132if ${ac_cv_prog_NM+:} false; then :
42133  $as_echo_n "(cached) " >&6
42134else
42135  if test -n "$NM"; then
42136  ac_cv_prog_NM="$NM" # Let the user override the test.
42137else
42138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42139for as_dir in $PATH
42140do
42141  IFS=$as_save_IFS
42142  test -z "$as_dir" && as_dir=.
42143    for ac_exec_ext in '' $ac_executable_extensions; do
42144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42145    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42147    break 2
42148  fi
42149done
42150  done
42151IFS=$as_save_IFS
42152
42153fi
42154fi
42155NM=$ac_cv_prog_NM
42156if test -n "$NM"; then
42157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42158$as_echo "$NM" >&6; }
42159else
42160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42161$as_echo "no" >&6; }
42162fi
42163
42164
42165    test -n "$NM" && break
42166  done
42167fi
42168if test -z "$NM"; then
42169  ac_ct_NM=$NM
42170  for ac_prog in nm
42171do
42172  # Extract the first word of "$ac_prog", so it can be a program name with args.
42173set dummy $ac_prog; ac_word=$2
42174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42175$as_echo_n "checking for $ac_word... " >&6; }
42176if ${ac_cv_prog_ac_ct_NM+:} false; then :
42177  $as_echo_n "(cached) " >&6
42178else
42179  if test -n "$ac_ct_NM"; then
42180  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42181else
42182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42183for as_dir in $PATH
42184do
42185  IFS=$as_save_IFS
42186  test -z "$as_dir" && as_dir=.
42187    for ac_exec_ext in '' $ac_executable_extensions; do
42188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42189    ac_cv_prog_ac_ct_NM="$ac_prog"
42190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42191    break 2
42192  fi
42193done
42194  done
42195IFS=$as_save_IFS
42196
42197fi
42198fi
42199ac_ct_NM=$ac_cv_prog_ac_ct_NM
42200if test -n "$ac_ct_NM"; then
42201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42202$as_echo "$ac_ct_NM" >&6; }
42203else
42204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42205$as_echo "no" >&6; }
42206fi
42207
42208
42209  test -n "$ac_ct_NM" && break
42210done
42211
42212  if test "x$ac_ct_NM" = x; then
42213    NM=""
42214  else
42215    case $cross_compiling:$ac_tool_warned in
42216yes:)
42217{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42218$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42219ac_tool_warned=yes ;;
42220esac
42221    NM=$ac_ct_NM
42222  fi
42223fi
42224
42225    else
42226      # If it succeeded, then it was overridden by the user. We will use it
42227      # for the tool.
42228
42229      # First remove it from the list of overridden variables, so we can test
42230      # for unknown variables in the end.
42231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42232
42233      # Check if we try to supply an empty value
42234      if test "x$NM" = x; then
42235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42236$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42238$as_echo_n "checking for NM... " >&6; }
42239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42240$as_echo "disabled" >&6; }
42241      else
42242        # Check if the provided tool contains a complete path.
42243        tool_specified="$NM"
42244        tool_basename="${tool_specified##*/}"
42245        if test "x$tool_basename" = "x$tool_specified"; then
42246          # A command without a complete path is provided, search $PATH.
42247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42248$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42249          # Extract the first word of "$tool_basename", so it can be a program name with args.
42250set dummy $tool_basename; ac_word=$2
42251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42252$as_echo_n "checking for $ac_word... " >&6; }
42253if ${ac_cv_path_NM+:} false; then :
42254  $as_echo_n "(cached) " >&6
42255else
42256  case $NM in
42257  [\\/]* | ?:[\\/]*)
42258  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42259  ;;
42260  *)
42261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42262for as_dir in $PATH
42263do
42264  IFS=$as_save_IFS
42265  test -z "$as_dir" && as_dir=.
42266    for ac_exec_ext in '' $ac_executable_extensions; do
42267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42268    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42270    break 2
42271  fi
42272done
42273  done
42274IFS=$as_save_IFS
42275
42276  ;;
42277esac
42278fi
42279NM=$ac_cv_path_NM
42280if test -n "$NM"; then
42281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42282$as_echo "$NM" >&6; }
42283else
42284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42285$as_echo "no" >&6; }
42286fi
42287
42288
42289          if test "x$NM" = x; then
42290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42291          fi
42292        else
42293          # Otherwise we believe it is a complete path. Use it as it is.
42294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42295$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42297$as_echo_n "checking for NM... " >&6; }
42298          if test ! -x "$tool_specified"; then
42299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42300$as_echo "not found" >&6; }
42301            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42302          fi
42303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42304$as_echo "$tool_specified" >&6; }
42305        fi
42306      fi
42307    fi
42308
42309  fi
42310
42311
42312    fi
42313
42314  # Only process if variable expands to non-empty
42315
42316  if test "x$NM" != x; then
42317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42318
42319  # First separate the path from the arguments. This will split at the first
42320  # space.
42321  complete="$NM"
42322  path="${complete%% *}"
42323  tmp="$complete EOL"
42324  arguments="${tmp#* }"
42325
42326  # Input might be given as Windows format, start by converting to
42327  # unix format.
42328  new_path=`$CYGPATH -u "$path"`
42329
42330  # Now try to locate executable using which
42331  new_path=`$WHICH "$new_path" 2> /dev/null`
42332  # bat and cmd files are not always considered executable in cygwin causing which
42333  # to not find them
42334  if test "x$new_path" = x \
42335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42337    new_path=`$CYGPATH -u "$path"`
42338  fi
42339  if test "x$new_path" = x; then
42340    # Oops. Which didn't find the executable.
42341    # The splitting of arguments from the executable at a space might have been incorrect,
42342    # since paths with space are more likely in Windows. Give it another try with the whole
42343    # argument.
42344    path="$complete"
42345    arguments="EOL"
42346    new_path=`$CYGPATH -u "$path"`
42347    new_path=`$WHICH "$new_path" 2> /dev/null`
42348    # bat and cmd files are not always considered executable in cygwin causing which
42349    # to not find them
42350    if test "x$new_path" = x \
42351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42353      new_path=`$CYGPATH -u "$path"`
42354    fi
42355    if test "x$new_path" = x; then
42356      # It's still not found. Now this is an unrecoverable error.
42357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42358$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42359      has_space=`$ECHO "$complete" | $GREP " "`
42360      if test "x$has_space" != x; then
42361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42363      fi
42364      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42365    fi
42366  fi
42367
42368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42371  # "foo.exe" is OK but "foo" is an error.
42372  #
42373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42374  # It is also a way to make sure we got the proper file name for the real test later on.
42375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42376  if test "x$test_shortpath" = x; then
42377    # Short path failed, file does not exist as specified.
42378    # Try adding .exe or .cmd
42379    if test -f "${new_path}.exe"; then
42380      input_to_shortpath="${new_path}.exe"
42381    elif test -f "${new_path}.cmd"; then
42382      input_to_shortpath="${new_path}.cmd"
42383    else
42384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42385$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42388      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42389    fi
42390  else
42391    input_to_shortpath="$new_path"
42392  fi
42393
42394  # Call helper function which possibly converts this using DOS-style short mode.
42395  # If so, the updated path is stored in $new_path.
42396  new_path="$input_to_shortpath"
42397
42398  input_path="$input_to_shortpath"
42399  # Check if we need to convert this using DOS-style short mode. If the path
42400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42401  # take no chances and rewrite it.
42402  # Note: m4 eats our [], so we need to use [ and ] instead.
42403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42404  if test "x$has_forbidden_chars" != x; then
42405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42409      # Going to short mode and back again did indeed matter. Since short mode is
42410      # case insensitive, let's make it lowercase to improve readability.
42411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42412      # Now convert it back to Unix-style (cygpath)
42413      input_path=`$CYGPATH -u "$shortmode_path"`
42414      new_path="$input_path"
42415    fi
42416  fi
42417
42418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42419  if test "x$test_cygdrive_prefix" = x; then
42420    # As a simple fix, exclude /usr/bin since it's not a real path.
42421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42423      # a path prefixed by /cygdrive for fixpath to work.
42424      new_path="$CYGWIN_ROOT_PATH$input_path"
42425    fi
42426  fi
42427
42428  # remove trailing .exe if any
42429  new_path="${new_path/%.exe/}"
42430
42431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42432
42433  # First separate the path from the arguments. This will split at the first
42434  # space.
42435  complete="$NM"
42436  path="${complete%% *}"
42437  tmp="$complete EOL"
42438  arguments="${tmp#* }"
42439
42440  # Input might be given as Windows format, start by converting to
42441  # unix format.
42442  new_path="$path"
42443
42444  windows_path="$new_path"
42445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42446    unix_path=`$CYGPATH -u "$windows_path"`
42447    new_path="$unix_path"
42448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42450    new_path="$unix_path"
42451  fi
42452
42453
42454  # Now try to locate executable using which
42455  new_path=`$WHICH "$new_path" 2> /dev/null`
42456
42457  if test "x$new_path" = x; then
42458    # Oops. Which didn't find the executable.
42459    # The splitting of arguments from the executable at a space might have been incorrect,
42460    # since paths with space are more likely in Windows. Give it another try with the whole
42461    # argument.
42462    path="$complete"
42463    arguments="EOL"
42464    new_path="$path"
42465
42466  windows_path="$new_path"
42467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42468    unix_path=`$CYGPATH -u "$windows_path"`
42469    new_path="$unix_path"
42470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42472    new_path="$unix_path"
42473  fi
42474
42475
42476    new_path=`$WHICH "$new_path" 2> /dev/null`
42477    # bat and cmd files are not always considered executable in MSYS causing which
42478    # to not find them
42479    if test "x$new_path" = x \
42480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42482      new_path="$path"
42483
42484  windows_path="$new_path"
42485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42486    unix_path=`$CYGPATH -u "$windows_path"`
42487    new_path="$unix_path"
42488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42490    new_path="$unix_path"
42491  fi
42492
42493    fi
42494
42495    if test "x$new_path" = x; then
42496      # It's still not found. Now this is an unrecoverable error.
42497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42498$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42499      has_space=`$ECHO "$complete" | $GREP " "`
42500      if test "x$has_space" != x; then
42501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42503      fi
42504      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42505    fi
42506  fi
42507
42508  # Now new_path has a complete unix path to the binary
42509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42510    # Keep paths in /bin as-is, but remove trailing .exe if any
42511    new_path="${new_path/%.exe/}"
42512    # Do not save /bin paths to all_fixpath_prefixes!
42513  else
42514    # Not in mixed or Windows style, start by that.
42515    new_path=`cmd //c echo $new_path`
42516
42517  input_path="$new_path"
42518  # Check if we need to convert this using DOS-style short mode. If the path
42519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42520  # take no chances and rewrite it.
42521  # Note: m4 eats our [], so we need to use [ and ] instead.
42522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42523  if test "x$has_forbidden_chars" != x; then
42524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42526  fi
42527
42528    # Output is in $new_path
42529
42530  windows_path="$new_path"
42531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42532    unix_path=`$CYGPATH -u "$windows_path"`
42533    new_path="$unix_path"
42534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42536    new_path="$unix_path"
42537  fi
42538
42539    # remove trailing .exe if any
42540    new_path="${new_path/%.exe/}"
42541
42542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42544  fi
42545
42546    else
42547      # We're on a unix platform. Hooray! :)
42548      # First separate the path from the arguments. This will split at the first
42549      # space.
42550      complete="$NM"
42551      path="${complete%% *}"
42552      tmp="$complete EOL"
42553      arguments="${tmp#* }"
42554
42555      # Cannot rely on the command "which" here since it doesn't always work.
42556      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42557      if test -z "$is_absolute_path"; then
42558        # Path to executable is not absolute. Find it.
42559        IFS_save="$IFS"
42560        IFS=:
42561        for p in $PATH; do
42562          if test -f "$p/$path" && test -x "$p/$path"; then
42563            new_path="$p/$path"
42564            break
42565          fi
42566        done
42567        IFS="$IFS_save"
42568      else
42569        # This is an absolute path, we can use it without further modifications.
42570        new_path="$path"
42571      fi
42572
42573      if test "x$new_path" = x; then
42574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42575$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42576        has_space=`$ECHO "$complete" | $GREP " "`
42577        if test "x$has_space" != x; then
42578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42580        fi
42581        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42582      fi
42583    fi
42584
42585    # Now join together the path and the arguments once again
42586    if test "x$arguments" != xEOL; then
42587      new_complete="$new_path ${arguments% *}"
42588    else
42589      new_complete="$new_path"
42590    fi
42591
42592    if test "x$complete" != "x$new_complete"; then
42593      NM="$new_complete"
42594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42595$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42596    fi
42597  fi
42598
42599    GNM="$NM"
42600
42601  fi
42602
42603  # objcopy is used for moving debug symbols to separate files when
42604  # full debug symbols are enabled.
42605  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42606
42607
42608  # Publish this variable in the help.
42609
42610
42611  if [ -z "${OBJCOPY+x}" ]; then
42612    # The variable is not set by user, try to locate tool using the code snippet
42613    if test -n "$ac_tool_prefix"; then
42614  for ac_prog in gobjcopy objcopy
42615  do
42616    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42617set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42619$as_echo_n "checking for $ac_word... " >&6; }
42620if ${ac_cv_prog_OBJCOPY+:} false; then :
42621  $as_echo_n "(cached) " >&6
42622else
42623  if test -n "$OBJCOPY"; then
42624  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42625else
42626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42627for as_dir in $PATH
42628do
42629  IFS=$as_save_IFS
42630  test -z "$as_dir" && as_dir=.
42631    for ac_exec_ext in '' $ac_executable_extensions; do
42632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42633    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42635    break 2
42636  fi
42637done
42638  done
42639IFS=$as_save_IFS
42640
42641fi
42642fi
42643OBJCOPY=$ac_cv_prog_OBJCOPY
42644if test -n "$OBJCOPY"; then
42645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42646$as_echo "$OBJCOPY" >&6; }
42647else
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42649$as_echo "no" >&6; }
42650fi
42651
42652
42653    test -n "$OBJCOPY" && break
42654  done
42655fi
42656if test -z "$OBJCOPY"; then
42657  ac_ct_OBJCOPY=$OBJCOPY
42658  for ac_prog in gobjcopy objcopy
42659do
42660  # Extract the first word of "$ac_prog", so it can be a program name with args.
42661set dummy $ac_prog; ac_word=$2
42662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42663$as_echo_n "checking for $ac_word... " >&6; }
42664if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42665  $as_echo_n "(cached) " >&6
42666else
42667  if test -n "$ac_ct_OBJCOPY"; then
42668  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42669else
42670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42671for as_dir in $PATH
42672do
42673  IFS=$as_save_IFS
42674  test -z "$as_dir" && as_dir=.
42675    for ac_exec_ext in '' $ac_executable_extensions; do
42676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42677    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42679    break 2
42680  fi
42681done
42682  done
42683IFS=$as_save_IFS
42684
42685fi
42686fi
42687ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42688if test -n "$ac_ct_OBJCOPY"; then
42689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42690$as_echo "$ac_ct_OBJCOPY" >&6; }
42691else
42692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42693$as_echo "no" >&6; }
42694fi
42695
42696
42697  test -n "$ac_ct_OBJCOPY" && break
42698done
42699
42700  if test "x$ac_ct_OBJCOPY" = x; then
42701    OBJCOPY=""
42702  else
42703    case $cross_compiling:$ac_tool_warned in
42704yes:)
42705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42707ac_tool_warned=yes ;;
42708esac
42709    OBJCOPY=$ac_ct_OBJCOPY
42710  fi
42711fi
42712
42713  else
42714    # The variable is set, but is it from the command line or the environment?
42715
42716    # Try to remove the string !OBJCOPY! from our list.
42717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42719      # If it failed, the variable was not from the command line. Ignore it,
42720      # but warn the user (except for BASH, which is always set by the calling BASH).
42721      if test "xOBJCOPY" != xBASH; then
42722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42723$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42724      fi
42725      # Try to locate tool using the code snippet
42726      if test -n "$ac_tool_prefix"; then
42727  for ac_prog in gobjcopy objcopy
42728  do
42729    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732$as_echo_n "checking for $ac_word... " >&6; }
42733if ${ac_cv_prog_OBJCOPY+:} false; then :
42734  $as_echo_n "(cached) " >&6
42735else
42736  if test -n "$OBJCOPY"; then
42737  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42738else
42739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740for as_dir in $PATH
42741do
42742  IFS=$as_save_IFS
42743  test -z "$as_dir" && as_dir=.
42744    for ac_exec_ext in '' $ac_executable_extensions; do
42745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748    break 2
42749  fi
42750done
42751  done
42752IFS=$as_save_IFS
42753
42754fi
42755fi
42756OBJCOPY=$ac_cv_prog_OBJCOPY
42757if test -n "$OBJCOPY"; then
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42759$as_echo "$OBJCOPY" >&6; }
42760else
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762$as_echo "no" >&6; }
42763fi
42764
42765
42766    test -n "$OBJCOPY" && break
42767  done
42768fi
42769if test -z "$OBJCOPY"; then
42770  ac_ct_OBJCOPY=$OBJCOPY
42771  for ac_prog in gobjcopy objcopy
42772do
42773  # Extract the first word of "$ac_prog", so it can be a program name with args.
42774set dummy $ac_prog; ac_word=$2
42775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42776$as_echo_n "checking for $ac_word... " >&6; }
42777if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42778  $as_echo_n "(cached) " >&6
42779else
42780  if test -n "$ac_ct_OBJCOPY"; then
42781  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42782else
42783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42784for as_dir in $PATH
42785do
42786  IFS=$as_save_IFS
42787  test -z "$as_dir" && as_dir=.
42788    for ac_exec_ext in '' $ac_executable_extensions; do
42789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42790    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42792    break 2
42793  fi
42794done
42795  done
42796IFS=$as_save_IFS
42797
42798fi
42799fi
42800ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42801if test -n "$ac_ct_OBJCOPY"; then
42802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42803$as_echo "$ac_ct_OBJCOPY" >&6; }
42804else
42805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42806$as_echo "no" >&6; }
42807fi
42808
42809
42810  test -n "$ac_ct_OBJCOPY" && break
42811done
42812
42813  if test "x$ac_ct_OBJCOPY" = x; then
42814    OBJCOPY=""
42815  else
42816    case $cross_compiling:$ac_tool_warned in
42817yes:)
42818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42820ac_tool_warned=yes ;;
42821esac
42822    OBJCOPY=$ac_ct_OBJCOPY
42823  fi
42824fi
42825
42826    else
42827      # If it succeeded, then it was overridden by the user. We will use it
42828      # for the tool.
42829
42830      # First remove it from the list of overridden variables, so we can test
42831      # for unknown variables in the end.
42832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42833
42834      # Check if we try to supply an empty value
42835      if test "x$OBJCOPY" = x; then
42836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42837$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42839$as_echo_n "checking for OBJCOPY... " >&6; }
42840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42841$as_echo "disabled" >&6; }
42842      else
42843        # Check if the provided tool contains a complete path.
42844        tool_specified="$OBJCOPY"
42845        tool_basename="${tool_specified##*/}"
42846        if test "x$tool_basename" = "x$tool_specified"; then
42847          # A command without a complete path is provided, search $PATH.
42848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42849$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42850          # Extract the first word of "$tool_basename", so it can be a program name with args.
42851set dummy $tool_basename; ac_word=$2
42852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42853$as_echo_n "checking for $ac_word... " >&6; }
42854if ${ac_cv_path_OBJCOPY+:} false; then :
42855  $as_echo_n "(cached) " >&6
42856else
42857  case $OBJCOPY in
42858  [\\/]* | ?:[\\/]*)
42859  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42860  ;;
42861  *)
42862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42863for as_dir in $PATH
42864do
42865  IFS=$as_save_IFS
42866  test -z "$as_dir" && as_dir=.
42867    for ac_exec_ext in '' $ac_executable_extensions; do
42868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42869    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42871    break 2
42872  fi
42873done
42874  done
42875IFS=$as_save_IFS
42876
42877  ;;
42878esac
42879fi
42880OBJCOPY=$ac_cv_path_OBJCOPY
42881if test -n "$OBJCOPY"; then
42882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42883$as_echo "$OBJCOPY" >&6; }
42884else
42885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42886$as_echo "no" >&6; }
42887fi
42888
42889
42890          if test "x$OBJCOPY" = x; then
42891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42892          fi
42893        else
42894          # Otherwise we believe it is a complete path. Use it as it is.
42895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42896$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42898$as_echo_n "checking for OBJCOPY... " >&6; }
42899          if test ! -x "$tool_specified"; then
42900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42901$as_echo "not found" >&6; }
42902            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42903          fi
42904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42905$as_echo "$tool_specified" >&6; }
42906        fi
42907      fi
42908    fi
42909
42910  fi
42911
42912
42913    # Only call fixup if objcopy was found.
42914    if test -n "$OBJCOPY"; then
42915
42916  # Only process if variable expands to non-empty
42917
42918  if test "x$OBJCOPY" != x; then
42919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42920
42921  # First separate the path from the arguments. This will split at the first
42922  # space.
42923  complete="$OBJCOPY"
42924  path="${complete%% *}"
42925  tmp="$complete EOL"
42926  arguments="${tmp#* }"
42927
42928  # Input might be given as Windows format, start by converting to
42929  # unix format.
42930  new_path=`$CYGPATH -u "$path"`
42931
42932  # Now try to locate executable using which
42933  new_path=`$WHICH "$new_path" 2> /dev/null`
42934  # bat and cmd files are not always considered executable in cygwin causing which
42935  # to not find them
42936  if test "x$new_path" = x \
42937      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42938      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42939    new_path=`$CYGPATH -u "$path"`
42940  fi
42941  if test "x$new_path" = x; then
42942    # Oops. Which didn't find the executable.
42943    # The splitting of arguments from the executable at a space might have been incorrect,
42944    # since paths with space are more likely in Windows. Give it another try with the whole
42945    # argument.
42946    path="$complete"
42947    arguments="EOL"
42948    new_path=`$CYGPATH -u "$path"`
42949    new_path=`$WHICH "$new_path" 2> /dev/null`
42950    # bat and cmd files are not always considered executable in cygwin causing which
42951    # to not find them
42952    if test "x$new_path" = x \
42953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42955      new_path=`$CYGPATH -u "$path"`
42956    fi
42957    if test "x$new_path" = x; then
42958      # It's still not found. Now this is an unrecoverable error.
42959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42960$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42961      has_space=`$ECHO "$complete" | $GREP " "`
42962      if test "x$has_space" != x; then
42963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42965      fi
42966      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42967    fi
42968  fi
42969
42970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42973  # "foo.exe" is OK but "foo" is an error.
42974  #
42975  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42976  # It is also a way to make sure we got the proper file name for the real test later on.
42977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42978  if test "x$test_shortpath" = x; then
42979    # Short path failed, file does not exist as specified.
42980    # Try adding .exe or .cmd
42981    if test -f "${new_path}.exe"; then
42982      input_to_shortpath="${new_path}.exe"
42983    elif test -f "${new_path}.cmd"; then
42984      input_to_shortpath="${new_path}.cmd"
42985    else
42986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42987$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42988      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42989$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42990      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42991    fi
42992  else
42993    input_to_shortpath="$new_path"
42994  fi
42995
42996  # Call helper function which possibly converts this using DOS-style short mode.
42997  # If so, the updated path is stored in $new_path.
42998  new_path="$input_to_shortpath"
42999
43000  input_path="$input_to_shortpath"
43001  # Check if we need to convert this using DOS-style short mode. If the path
43002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43003  # take no chances and rewrite it.
43004  # Note: m4 eats our [], so we need to use [ and ] instead.
43005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43006  if test "x$has_forbidden_chars" != x; then
43007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43011      # Going to short mode and back again did indeed matter. Since short mode is
43012      # case insensitive, let's make it lowercase to improve readability.
43013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43014      # Now convert it back to Unix-style (cygpath)
43015      input_path=`$CYGPATH -u "$shortmode_path"`
43016      new_path="$input_path"
43017    fi
43018  fi
43019
43020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43021  if test "x$test_cygdrive_prefix" = x; then
43022    # As a simple fix, exclude /usr/bin since it's not a real path.
43023    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43025      # a path prefixed by /cygdrive for fixpath to work.
43026      new_path="$CYGWIN_ROOT_PATH$input_path"
43027    fi
43028  fi
43029
43030  # remove trailing .exe if any
43031  new_path="${new_path/%.exe/}"
43032
43033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43034
43035  # First separate the path from the arguments. This will split at the first
43036  # space.
43037  complete="$OBJCOPY"
43038  path="${complete%% *}"
43039  tmp="$complete EOL"
43040  arguments="${tmp#* }"
43041
43042  # Input might be given as Windows format, start by converting to
43043  # unix format.
43044  new_path="$path"
43045
43046  windows_path="$new_path"
43047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43048    unix_path=`$CYGPATH -u "$windows_path"`
43049    new_path="$unix_path"
43050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43052    new_path="$unix_path"
43053  fi
43054
43055
43056  # Now try to locate executable using which
43057  new_path=`$WHICH "$new_path" 2> /dev/null`
43058
43059  if test "x$new_path" = x; then
43060    # Oops. Which didn't find the executable.
43061    # The splitting of arguments from the executable at a space might have been incorrect,
43062    # since paths with space are more likely in Windows. Give it another try with the whole
43063    # argument.
43064    path="$complete"
43065    arguments="EOL"
43066    new_path="$path"
43067
43068  windows_path="$new_path"
43069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43070    unix_path=`$CYGPATH -u "$windows_path"`
43071    new_path="$unix_path"
43072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43074    new_path="$unix_path"
43075  fi
43076
43077
43078    new_path=`$WHICH "$new_path" 2> /dev/null`
43079    # bat and cmd files are not always considered executable in MSYS causing which
43080    # to not find them
43081    if test "x$new_path" = x \
43082        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43083        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43084      new_path="$path"
43085
43086  windows_path="$new_path"
43087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43088    unix_path=`$CYGPATH -u "$windows_path"`
43089    new_path="$unix_path"
43090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43092    new_path="$unix_path"
43093  fi
43094
43095    fi
43096
43097    if test "x$new_path" = x; then
43098      # It's still not found. Now this is an unrecoverable error.
43099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43100$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43101      has_space=`$ECHO "$complete" | $GREP " "`
43102      if test "x$has_space" != x; then
43103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43105      fi
43106      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43107    fi
43108  fi
43109
43110  # Now new_path has a complete unix path to the binary
43111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43112    # Keep paths in /bin as-is, but remove trailing .exe if any
43113    new_path="${new_path/%.exe/}"
43114    # Do not save /bin paths to all_fixpath_prefixes!
43115  else
43116    # Not in mixed or Windows style, start by that.
43117    new_path=`cmd //c echo $new_path`
43118
43119  input_path="$new_path"
43120  # Check if we need to convert this using DOS-style short mode. If the path
43121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43122  # take no chances and rewrite it.
43123  # Note: m4 eats our [], so we need to use [ and ] instead.
43124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43125  if test "x$has_forbidden_chars" != x; then
43126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43128  fi
43129
43130    # Output is in $new_path
43131
43132  windows_path="$new_path"
43133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43134    unix_path=`$CYGPATH -u "$windows_path"`
43135    new_path="$unix_path"
43136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43138    new_path="$unix_path"
43139  fi
43140
43141    # remove trailing .exe if any
43142    new_path="${new_path/%.exe/}"
43143
43144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43146  fi
43147
43148    else
43149      # We're on a unix platform. Hooray! :)
43150      # First separate the path from the arguments. This will split at the first
43151      # space.
43152      complete="$OBJCOPY"
43153      path="${complete%% *}"
43154      tmp="$complete EOL"
43155      arguments="${tmp#* }"
43156
43157      # Cannot rely on the command "which" here since it doesn't always work.
43158      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43159      if test -z "$is_absolute_path"; then
43160        # Path to executable is not absolute. Find it.
43161        IFS_save="$IFS"
43162        IFS=:
43163        for p in $PATH; do
43164          if test -f "$p/$path" && test -x "$p/$path"; then
43165            new_path="$p/$path"
43166            break
43167          fi
43168        done
43169        IFS="$IFS_save"
43170      else
43171        # This is an absolute path, we can use it without further modifications.
43172        new_path="$path"
43173      fi
43174
43175      if test "x$new_path" = x; then
43176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43177$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43178        has_space=`$ECHO "$complete" | $GREP " "`
43179        if test "x$has_space" != x; then
43180          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43181$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43182        fi
43183        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43184      fi
43185    fi
43186
43187    # Now join together the path and the arguments once again
43188    if test "x$arguments" != xEOL; then
43189      new_complete="$new_path ${arguments% *}"
43190    else
43191      new_complete="$new_path"
43192    fi
43193
43194    if test "x$complete" != "x$new_complete"; then
43195      OBJCOPY="$new_complete"
43196      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43197$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43198    fi
43199  fi
43200
43201      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43202        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43203        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43204        # - version number is last blank separate word on first line
43205        # - version number formats that have been seen:
43206        #   - <major>.<minor>
43207        #   - <major>.<minor>.<micro>
43208        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43209        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43210         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43211              -e 's/.* //' \
43212              -e '/^[01]\./b bad' \
43213              -e '/^2\./{' \
43214              -e '  s/^2\.//' \
43215              -e '  /^[0-9]$/b bad' \
43216              -e '  /^[0-9]\./b bad' \
43217              -e '  /^1[0-9]$/b bad' \
43218              -e '  /^1[0-9]\./b bad' \
43219              -e '  /^20\./b bad' \
43220              -e '  /^21\.0$/b bad' \
43221              -e '  /^21\.0\./b bad' \
43222              -e '}' \
43223              -e ':good' \
43224              -e 's/.*/VALID_VERSION/p' \
43225              -e 'q' \
43226              -e ':bad' \
43227              -e 's/.*/BAD_VERSION/p' \
43228              -e 'q'`
43229        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43230          OBJCOPY=
43231          { $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
43232$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43233          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43234$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43235          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43236$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43237          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43238$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43239          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43240$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43241        fi
43242      fi
43243    fi
43244  fi
43245
43246
43247
43248  # Publish this variable in the help.
43249
43250
43251  if [ -z "${OBJDUMP+x}" ]; then
43252    # The variable is not set by user, try to locate tool using the code snippet
43253    if test -n "$ac_tool_prefix"; then
43254  for ac_prog in gobjdump objdump
43255  do
43256    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43257set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43259$as_echo_n "checking for $ac_word... " >&6; }
43260if ${ac_cv_prog_OBJDUMP+:} false; then :
43261  $as_echo_n "(cached) " >&6
43262else
43263  if test -n "$OBJDUMP"; then
43264  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43265else
43266as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43267for as_dir in $PATH
43268do
43269  IFS=$as_save_IFS
43270  test -z "$as_dir" && as_dir=.
43271    for ac_exec_ext in '' $ac_executable_extensions; do
43272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43273    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43275    break 2
43276  fi
43277done
43278  done
43279IFS=$as_save_IFS
43280
43281fi
43282fi
43283OBJDUMP=$ac_cv_prog_OBJDUMP
43284if test -n "$OBJDUMP"; then
43285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43286$as_echo "$OBJDUMP" >&6; }
43287else
43288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43289$as_echo "no" >&6; }
43290fi
43291
43292
43293    test -n "$OBJDUMP" && break
43294  done
43295fi
43296if test -z "$OBJDUMP"; then
43297  ac_ct_OBJDUMP=$OBJDUMP
43298  for ac_prog in gobjdump objdump
43299do
43300  # Extract the first word of "$ac_prog", so it can be a program name with args.
43301set dummy $ac_prog; ac_word=$2
43302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43303$as_echo_n "checking for $ac_word... " >&6; }
43304if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43305  $as_echo_n "(cached) " >&6
43306else
43307  if test -n "$ac_ct_OBJDUMP"; then
43308  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43309else
43310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43311for as_dir in $PATH
43312do
43313  IFS=$as_save_IFS
43314  test -z "$as_dir" && as_dir=.
43315    for ac_exec_ext in '' $ac_executable_extensions; do
43316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43317    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43319    break 2
43320  fi
43321done
43322  done
43323IFS=$as_save_IFS
43324
43325fi
43326fi
43327ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43328if test -n "$ac_ct_OBJDUMP"; then
43329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43330$as_echo "$ac_ct_OBJDUMP" >&6; }
43331else
43332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43333$as_echo "no" >&6; }
43334fi
43335
43336
43337  test -n "$ac_ct_OBJDUMP" && break
43338done
43339
43340  if test "x$ac_ct_OBJDUMP" = x; then
43341    OBJDUMP=""
43342  else
43343    case $cross_compiling:$ac_tool_warned in
43344yes:)
43345{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43346$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43347ac_tool_warned=yes ;;
43348esac
43349    OBJDUMP=$ac_ct_OBJDUMP
43350  fi
43351fi
43352
43353  else
43354    # The variable is set, but is it from the command line or the environment?
43355
43356    # Try to remove the string !OBJDUMP! from our list.
43357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43359      # If it failed, the variable was not from the command line. Ignore it,
43360      # but warn the user (except for BASH, which is always set by the calling BASH).
43361      if test "xOBJDUMP" != xBASH; then
43362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43363$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43364      fi
43365      # Try to locate tool using the code snippet
43366      if test -n "$ac_tool_prefix"; then
43367  for ac_prog in gobjdump objdump
43368  do
43369    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43372$as_echo_n "checking for $ac_word... " >&6; }
43373if ${ac_cv_prog_OBJDUMP+:} false; then :
43374  $as_echo_n "(cached) " >&6
43375else
43376  if test -n "$OBJDUMP"; then
43377  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43378else
43379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43380for as_dir in $PATH
43381do
43382  IFS=$as_save_IFS
43383  test -z "$as_dir" && as_dir=.
43384    for ac_exec_ext in '' $ac_executable_extensions; do
43385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43386    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43388    break 2
43389  fi
43390done
43391  done
43392IFS=$as_save_IFS
43393
43394fi
43395fi
43396OBJDUMP=$ac_cv_prog_OBJDUMP
43397if test -n "$OBJDUMP"; then
43398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43399$as_echo "$OBJDUMP" >&6; }
43400else
43401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43402$as_echo "no" >&6; }
43403fi
43404
43405
43406    test -n "$OBJDUMP" && break
43407  done
43408fi
43409if test -z "$OBJDUMP"; then
43410  ac_ct_OBJDUMP=$OBJDUMP
43411  for ac_prog in gobjdump objdump
43412do
43413  # Extract the first word of "$ac_prog", so it can be a program name with args.
43414set dummy $ac_prog; ac_word=$2
43415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43416$as_echo_n "checking for $ac_word... " >&6; }
43417if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43418  $as_echo_n "(cached) " >&6
43419else
43420  if test -n "$ac_ct_OBJDUMP"; then
43421  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43422else
43423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43424for as_dir in $PATH
43425do
43426  IFS=$as_save_IFS
43427  test -z "$as_dir" && as_dir=.
43428    for ac_exec_ext in '' $ac_executable_extensions; do
43429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43430    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43432    break 2
43433  fi
43434done
43435  done
43436IFS=$as_save_IFS
43437
43438fi
43439fi
43440ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43441if test -n "$ac_ct_OBJDUMP"; then
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43443$as_echo "$ac_ct_OBJDUMP" >&6; }
43444else
43445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43446$as_echo "no" >&6; }
43447fi
43448
43449
43450  test -n "$ac_ct_OBJDUMP" && break
43451done
43452
43453  if test "x$ac_ct_OBJDUMP" = x; then
43454    OBJDUMP=""
43455  else
43456    case $cross_compiling:$ac_tool_warned in
43457yes:)
43458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43460ac_tool_warned=yes ;;
43461esac
43462    OBJDUMP=$ac_ct_OBJDUMP
43463  fi
43464fi
43465
43466    else
43467      # If it succeeded, then it was overridden by the user. We will use it
43468      # for the tool.
43469
43470      # First remove it from the list of overridden variables, so we can test
43471      # for unknown variables in the end.
43472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43473
43474      # Check if we try to supply an empty value
43475      if test "x$OBJDUMP" = x; then
43476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43477$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43479$as_echo_n "checking for OBJDUMP... " >&6; }
43480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43481$as_echo "disabled" >&6; }
43482      else
43483        # Check if the provided tool contains a complete path.
43484        tool_specified="$OBJDUMP"
43485        tool_basename="${tool_specified##*/}"
43486        if test "x$tool_basename" = "x$tool_specified"; then
43487          # A command without a complete path is provided, search $PATH.
43488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43489$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43490          # Extract the first word of "$tool_basename", so it can be a program name with args.
43491set dummy $tool_basename; ac_word=$2
43492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43493$as_echo_n "checking for $ac_word... " >&6; }
43494if ${ac_cv_path_OBJDUMP+:} false; then :
43495  $as_echo_n "(cached) " >&6
43496else
43497  case $OBJDUMP in
43498  [\\/]* | ?:[\\/]*)
43499  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43500  ;;
43501  *)
43502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43503for as_dir in $PATH
43504do
43505  IFS=$as_save_IFS
43506  test -z "$as_dir" && as_dir=.
43507    for ac_exec_ext in '' $ac_executable_extensions; do
43508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43509    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43511    break 2
43512  fi
43513done
43514  done
43515IFS=$as_save_IFS
43516
43517  ;;
43518esac
43519fi
43520OBJDUMP=$ac_cv_path_OBJDUMP
43521if test -n "$OBJDUMP"; then
43522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43523$as_echo "$OBJDUMP" >&6; }
43524else
43525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43526$as_echo "no" >&6; }
43527fi
43528
43529
43530          if test "x$OBJDUMP" = x; then
43531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43532          fi
43533        else
43534          # Otherwise we believe it is a complete path. Use it as it is.
43535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43536$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43538$as_echo_n "checking for OBJDUMP... " >&6; }
43539          if test ! -x "$tool_specified"; then
43540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43541$as_echo "not found" >&6; }
43542            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43543          fi
43544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43545$as_echo "$tool_specified" >&6; }
43546        fi
43547      fi
43548    fi
43549
43550  fi
43551
43552
43553  if test "x$OBJDUMP" != x; then
43554    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43555    # bails if argument is missing.
43556
43557  # Only process if variable expands to non-empty
43558
43559  if test "x$OBJDUMP" != x; then
43560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43561
43562  # First separate the path from the arguments. This will split at the first
43563  # space.
43564  complete="$OBJDUMP"
43565  path="${complete%% *}"
43566  tmp="$complete EOL"
43567  arguments="${tmp#* }"
43568
43569  # Input might be given as Windows format, start by converting to
43570  # unix format.
43571  new_path=`$CYGPATH -u "$path"`
43572
43573  # Now try to locate executable using which
43574  new_path=`$WHICH "$new_path" 2> /dev/null`
43575  # bat and cmd files are not always considered executable in cygwin causing which
43576  # to not find them
43577  if test "x$new_path" = x \
43578      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43579      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43580    new_path=`$CYGPATH -u "$path"`
43581  fi
43582  if test "x$new_path" = x; then
43583    # Oops. Which didn't find the executable.
43584    # The splitting of arguments from the executable at a space might have been incorrect,
43585    # since paths with space are more likely in Windows. Give it another try with the whole
43586    # argument.
43587    path="$complete"
43588    arguments="EOL"
43589    new_path=`$CYGPATH -u "$path"`
43590    new_path=`$WHICH "$new_path" 2> /dev/null`
43591    # bat and cmd files are not always considered executable in cygwin causing which
43592    # to not find them
43593    if test "x$new_path" = x \
43594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43596      new_path=`$CYGPATH -u "$path"`
43597    fi
43598    if test "x$new_path" = x; then
43599      # It's still not found. Now this is an unrecoverable error.
43600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43601$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43602      has_space=`$ECHO "$complete" | $GREP " "`
43603      if test "x$has_space" != x; then
43604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43606      fi
43607      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43608    fi
43609  fi
43610
43611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43614  # "foo.exe" is OK but "foo" is an error.
43615  #
43616  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43617  # It is also a way to make sure we got the proper file name for the real test later on.
43618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43619  if test "x$test_shortpath" = x; then
43620    # Short path failed, file does not exist as specified.
43621    # Try adding .exe or .cmd
43622    if test -f "${new_path}.exe"; then
43623      input_to_shortpath="${new_path}.exe"
43624    elif test -f "${new_path}.cmd"; then
43625      input_to_shortpath="${new_path}.cmd"
43626    else
43627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43628$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43629      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43630$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43631      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43632    fi
43633  else
43634    input_to_shortpath="$new_path"
43635  fi
43636
43637  # Call helper function which possibly converts this using DOS-style short mode.
43638  # If so, the updated path is stored in $new_path.
43639  new_path="$input_to_shortpath"
43640
43641  input_path="$input_to_shortpath"
43642  # Check if we need to convert this using DOS-style short mode. If the path
43643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43644  # take no chances and rewrite it.
43645  # Note: m4 eats our [], so we need to use [ and ] instead.
43646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43647  if test "x$has_forbidden_chars" != x; then
43648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43652      # Going to short mode and back again did indeed matter. Since short mode is
43653      # case insensitive, let's make it lowercase to improve readability.
43654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43655      # Now convert it back to Unix-style (cygpath)
43656      input_path=`$CYGPATH -u "$shortmode_path"`
43657      new_path="$input_path"
43658    fi
43659  fi
43660
43661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43662  if test "x$test_cygdrive_prefix" = x; then
43663    # As a simple fix, exclude /usr/bin since it's not a real path.
43664    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43666      # a path prefixed by /cygdrive for fixpath to work.
43667      new_path="$CYGWIN_ROOT_PATH$input_path"
43668    fi
43669  fi
43670
43671  # remove trailing .exe if any
43672  new_path="${new_path/%.exe/}"
43673
43674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43675
43676  # First separate the path from the arguments. This will split at the first
43677  # space.
43678  complete="$OBJDUMP"
43679  path="${complete%% *}"
43680  tmp="$complete EOL"
43681  arguments="${tmp#* }"
43682
43683  # Input might be given as Windows format, start by converting to
43684  # unix format.
43685  new_path="$path"
43686
43687  windows_path="$new_path"
43688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43689    unix_path=`$CYGPATH -u "$windows_path"`
43690    new_path="$unix_path"
43691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43693    new_path="$unix_path"
43694  fi
43695
43696
43697  # Now try to locate executable using which
43698  new_path=`$WHICH "$new_path" 2> /dev/null`
43699
43700  if test "x$new_path" = x; then
43701    # Oops. Which didn't find the executable.
43702    # The splitting of arguments from the executable at a space might have been incorrect,
43703    # since paths with space are more likely in Windows. Give it another try with the whole
43704    # argument.
43705    path="$complete"
43706    arguments="EOL"
43707    new_path="$path"
43708
43709  windows_path="$new_path"
43710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43711    unix_path=`$CYGPATH -u "$windows_path"`
43712    new_path="$unix_path"
43713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43715    new_path="$unix_path"
43716  fi
43717
43718
43719    new_path=`$WHICH "$new_path" 2> /dev/null`
43720    # bat and cmd files are not always considered executable in MSYS causing which
43721    # to not find them
43722    if test "x$new_path" = x \
43723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43725      new_path="$path"
43726
43727  windows_path="$new_path"
43728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43729    unix_path=`$CYGPATH -u "$windows_path"`
43730    new_path="$unix_path"
43731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43733    new_path="$unix_path"
43734  fi
43735
43736    fi
43737
43738    if test "x$new_path" = x; then
43739      # It's still not found. Now this is an unrecoverable error.
43740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43741$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43742      has_space=`$ECHO "$complete" | $GREP " "`
43743      if test "x$has_space" != x; then
43744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43746      fi
43747      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43748    fi
43749  fi
43750
43751  # Now new_path has a complete unix path to the binary
43752  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43753    # Keep paths in /bin as-is, but remove trailing .exe if any
43754    new_path="${new_path/%.exe/}"
43755    # Do not save /bin paths to all_fixpath_prefixes!
43756  else
43757    # Not in mixed or Windows style, start by that.
43758    new_path=`cmd //c echo $new_path`
43759
43760  input_path="$new_path"
43761  # Check if we need to convert this using DOS-style short mode. If the path
43762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43763  # take no chances and rewrite it.
43764  # Note: m4 eats our [], so we need to use [ and ] instead.
43765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43766  if test "x$has_forbidden_chars" != x; then
43767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43769  fi
43770
43771    # Output is in $new_path
43772
43773  windows_path="$new_path"
43774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43775    unix_path=`$CYGPATH -u "$windows_path"`
43776    new_path="$unix_path"
43777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43779    new_path="$unix_path"
43780  fi
43781
43782    # remove trailing .exe if any
43783    new_path="${new_path/%.exe/}"
43784
43785    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43786    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43787  fi
43788
43789    else
43790      # We're on a unix platform. Hooray! :)
43791      # First separate the path from the arguments. This will split at the first
43792      # space.
43793      complete="$OBJDUMP"
43794      path="${complete%% *}"
43795      tmp="$complete EOL"
43796      arguments="${tmp#* }"
43797
43798      # Cannot rely on the command "which" here since it doesn't always work.
43799      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43800      if test -z "$is_absolute_path"; then
43801        # Path to executable is not absolute. Find it.
43802        IFS_save="$IFS"
43803        IFS=:
43804        for p in $PATH; do
43805          if test -f "$p/$path" && test -x "$p/$path"; then
43806            new_path="$p/$path"
43807            break
43808          fi
43809        done
43810        IFS="$IFS_save"
43811      else
43812        # This is an absolute path, we can use it without further modifications.
43813        new_path="$path"
43814      fi
43815
43816      if test "x$new_path" = x; then
43817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43818$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43819        has_space=`$ECHO "$complete" | $GREP " "`
43820        if test "x$has_space" != x; then
43821          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43823        fi
43824        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43825      fi
43826    fi
43827
43828    # Now join together the path and the arguments once again
43829    if test "x$arguments" != xEOL; then
43830      new_complete="$new_path ${arguments% *}"
43831    else
43832      new_complete="$new_path"
43833    fi
43834
43835    if test "x$complete" != "x$new_complete"; then
43836      OBJDUMP="$new_complete"
43837      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43838$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43839    fi
43840  fi
43841
43842  fi
43843
43844
43845  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43846  # to remain in place. Otherwise the compiler will not work in some siutations
43847  # in later configure checks.
43848  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43849    PATH="$OLD_PATH"
43850  fi
43851
43852  # Restore the flags to the user specified values.
43853  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43854  CFLAGS="$ORG_CFLAGS"
43855  CXXFLAGS="$ORG_CXXFLAGS"
43856
43857
43858# Finally do some processing after the detection phase
43859
43860  if test "x$COMPILE_TYPE" = "xcross"; then
43861    # Now we need to find a C/C++ compiler that can build executables for the
43862    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43863    # used once. Also, we need to do this without adding a tools dir to the
43864    # path, otherwise we might pick up cross-compilers which don't use standard
43865    # naming.
43866
43867    OLDPATH="$PATH"
43868
43869
43870# Check whether --with-build-devkit was given.
43871if test "${with_build_devkit+set}" = set; then :
43872  withval=$with_build_devkit;
43873fi
43874
43875    if test "x$with_build_devkit" = "xyes"; then
43876      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43877    elif test -n "$with_build_devkit"; then
43878      if test ! -d "$with_build_devkit"; then
43879        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43880      else
43881
43882  # Only process if variable expands to non-empty
43883
43884  if test "x$with_build_devkit" != x; then
43885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43886
43887  # Input might be given as Windows format, start by converting to
43888  # unix format.
43889  path="$with_build_devkit"
43890  new_path=`$CYGPATH -u "$path"`
43891
43892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43895  # "foo.exe" is OK but "foo" is an error.
43896  #
43897  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43898  # It is also a way to make sure we got the proper file name for the real test later on.
43899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43900  if test "x$test_shortpath" = x; then
43901    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43902$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43903    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43904  fi
43905
43906  # Call helper function which possibly converts this using DOS-style short mode.
43907  # If so, the updated path is stored in $new_path.
43908
43909  input_path="$new_path"
43910  # Check if we need to convert this using DOS-style short mode. If the path
43911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43912  # take no chances and rewrite it.
43913  # Note: m4 eats our [], so we need to use [ and ] instead.
43914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43915  if test "x$has_forbidden_chars" != x; then
43916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43917    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43918    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43919    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43920      # Going to short mode and back again did indeed matter. Since short mode is
43921      # case insensitive, let's make it lowercase to improve readability.
43922      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43923      # Now convert it back to Unix-style (cygpath)
43924      input_path=`$CYGPATH -u "$shortmode_path"`
43925      new_path="$input_path"
43926    fi
43927  fi
43928
43929  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43930  if test "x$test_cygdrive_prefix" = x; then
43931    # As a simple fix, exclude /usr/bin since it's not a real path.
43932    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43933      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43934      # a path prefixed by /cygdrive for fixpath to work.
43935      new_path="$CYGWIN_ROOT_PATH$input_path"
43936    fi
43937  fi
43938
43939
43940  if test "x$path" != "x$new_path"; then
43941    with_build_devkit="$new_path"
43942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43943$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43944  fi
43945
43946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43947
43948  path="$with_build_devkit"
43949  has_colon=`$ECHO $path | $GREP ^.:`
43950  new_path="$path"
43951  if test "x$has_colon" = x; then
43952    # Not in mixed or Windows style, start by that.
43953    new_path=`cmd //c echo $path`
43954  fi
43955
43956
43957  input_path="$new_path"
43958  # Check if we need to convert this using DOS-style short mode. If the path
43959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43960  # take no chances and rewrite it.
43961  # Note: m4 eats our [], so we need to use [ and ] instead.
43962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43963  if test "x$has_forbidden_chars" != x; then
43964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43966  fi
43967
43968
43969  windows_path="$new_path"
43970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43971    unix_path=`$CYGPATH -u "$windows_path"`
43972    new_path="$unix_path"
43973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43975    new_path="$unix_path"
43976  fi
43977
43978  if test "x$path" != "x$new_path"; then
43979    with_build_devkit="$new_path"
43980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43981$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43982  fi
43983
43984  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43985  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43986
43987    else
43988      # We're on a unix platform. Hooray! :)
43989      path="$with_build_devkit"
43990      has_space=`$ECHO "$path" | $GREP " "`
43991      if test "x$has_space" != x; then
43992        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43993$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43994        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43995      fi
43996
43997      # Use eval to expand a potential ~
43998      eval path="$path"
43999      if test ! -f "$path" && test ! -d "$path"; then
44000        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44001      fi
44002
44003      if test -d "$path"; then
44004        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44005      else
44006        dir="`$DIRNAME "$path"`"
44007        base="`$BASENAME "$path"`"
44008        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44009      fi
44010    fi
44011  fi
44012
44013        BUILD_DEVKIT_ROOT="$with_build_devkit"
44014        # Check for a meta data info file in the root of the devkit
44015        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44016          # Process devkit.info so that existing devkit variables are not
44017          # modified by this
44018          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44019              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44020              -e "s/\$host/\$build/g" \
44021              $BUILD_DEVKIT_ROOT/devkit.info \
44022              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44023          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44024          # This potentially sets the following:
44025          # A descriptive name of the devkit
44026
44027  if test "x$BUILD_DEVKIT_NAME" = x; then
44028    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44029  fi
44030
44031          # Corresponds to --with-extra-path
44032
44033  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44034    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44035  fi
44036
44037          # Corresponds to --with-toolchain-path
44038
44039  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44040    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44041  fi
44042
44043          # Corresponds to --with-sysroot
44044
44045  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44046    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44047  fi
44048
44049          # Skip the Window specific parts
44050        fi
44051
44052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44053$as_echo_n "checking for build platform devkit... " >&6; }
44054        if test "x$BUILD_DEVKIT_NAME" != x; then
44055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44056$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44057        else
44058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44059$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44060        fi
44061
44062        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44063
44064  if test "x$BUILD_SYSROOT" != "x"; then
44065    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44066      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44067        # Solaris Studio does not have a concept of sysroot. Instead we must
44068        # make sure the default include and lib dirs are appended to each
44069        # compile and link command line. Must also add -I-xbuiltin to enable
44070        # inlining of system functions and intrinsics.
44071        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44072        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44073            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44074      fi
44075    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44076      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44077      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44078    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44079      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44080      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44081    fi
44082    # The global CFLAGS and LDFLAGS variables need these for configure to function
44083    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44084    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44085    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44086    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44087  fi
44088
44089  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44090    # We also need -iframework<path>/System/Library/Frameworks
44091    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44092    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44093    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44094    # set this here so it doesn't have to be peppered throughout the forest
44095    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44096    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44097  fi
44098
44099
44100
44101
44102
44103         # Fallback default of just /bin if DEVKIT_PATH is not defined
44104        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44105          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44106        fi
44107        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44108      fi
44109    fi
44110
44111    # FIXME: we should list the discovered compilers as an exclude pattern!
44112    # If we do that, we can do this detection before POST_DETECTION, and still
44113    # find the build compilers in the tools dir, if needed.
44114
44115
44116
44117  # Publish this variable in the help.
44118
44119
44120  if [ -z "${BUILD_CC+x}" ]; then
44121    # The variable is not set by user, try to locate tool using the code snippet
44122    for ac_prog in cl cc gcc
44123do
44124  # Extract the first word of "$ac_prog", so it can be a program name with args.
44125set dummy $ac_prog; ac_word=$2
44126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44127$as_echo_n "checking for $ac_word... " >&6; }
44128if ${ac_cv_path_BUILD_CC+:} false; then :
44129  $as_echo_n "(cached) " >&6
44130else
44131  case $BUILD_CC in
44132  [\\/]* | ?:[\\/]*)
44133  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44134  ;;
44135  *)
44136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44137for as_dir in $PATH
44138do
44139  IFS=$as_save_IFS
44140  test -z "$as_dir" && as_dir=.
44141    for ac_exec_ext in '' $ac_executable_extensions; do
44142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44143    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44145    break 2
44146  fi
44147done
44148  done
44149IFS=$as_save_IFS
44150
44151  ;;
44152esac
44153fi
44154BUILD_CC=$ac_cv_path_BUILD_CC
44155if test -n "$BUILD_CC"; then
44156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44157$as_echo "$BUILD_CC" >&6; }
44158else
44159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44160$as_echo "no" >&6; }
44161fi
44162
44163
44164  test -n "$BUILD_CC" && break
44165done
44166
44167  else
44168    # The variable is set, but is it from the command line or the environment?
44169
44170    # Try to remove the string !BUILD_CC! from our list.
44171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44173      # If it failed, the variable was not from the command line. Ignore it,
44174      # but warn the user (except for BASH, which is always set by the calling BASH).
44175      if test "xBUILD_CC" != xBASH; then
44176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44177$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44178      fi
44179      # Try to locate tool using the code snippet
44180      for ac_prog in cl cc gcc
44181do
44182  # Extract the first word of "$ac_prog", so it can be a program name with args.
44183set dummy $ac_prog; ac_word=$2
44184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44185$as_echo_n "checking for $ac_word... " >&6; }
44186if ${ac_cv_path_BUILD_CC+:} false; then :
44187  $as_echo_n "(cached) " >&6
44188else
44189  case $BUILD_CC in
44190  [\\/]* | ?:[\\/]*)
44191  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44192  ;;
44193  *)
44194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44195for as_dir in $PATH
44196do
44197  IFS=$as_save_IFS
44198  test -z "$as_dir" && as_dir=.
44199    for ac_exec_ext in '' $ac_executable_extensions; do
44200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44201    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44203    break 2
44204  fi
44205done
44206  done
44207IFS=$as_save_IFS
44208
44209  ;;
44210esac
44211fi
44212BUILD_CC=$ac_cv_path_BUILD_CC
44213if test -n "$BUILD_CC"; then
44214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44215$as_echo "$BUILD_CC" >&6; }
44216else
44217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44218$as_echo "no" >&6; }
44219fi
44220
44221
44222  test -n "$BUILD_CC" && break
44223done
44224
44225    else
44226      # If it succeeded, then it was overridden by the user. We will use it
44227      # for the tool.
44228
44229      # First remove it from the list of overridden variables, so we can test
44230      # for unknown variables in the end.
44231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44232
44233      # Check if we try to supply an empty value
44234      if test "x$BUILD_CC" = x; then
44235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44236$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44238$as_echo_n "checking for BUILD_CC... " >&6; }
44239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44240$as_echo "disabled" >&6; }
44241      else
44242        # Check if the provided tool contains a complete path.
44243        tool_specified="$BUILD_CC"
44244        tool_basename="${tool_specified##*/}"
44245        if test "x$tool_basename" = "x$tool_specified"; then
44246          # A command without a complete path is provided, search $PATH.
44247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44248$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44249          # Extract the first word of "$tool_basename", so it can be a program name with args.
44250set dummy $tool_basename; ac_word=$2
44251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44252$as_echo_n "checking for $ac_word... " >&6; }
44253if ${ac_cv_path_BUILD_CC+:} false; then :
44254  $as_echo_n "(cached) " >&6
44255else
44256  case $BUILD_CC in
44257  [\\/]* | ?:[\\/]*)
44258  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44259  ;;
44260  *)
44261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44262for as_dir in $PATH
44263do
44264  IFS=$as_save_IFS
44265  test -z "$as_dir" && as_dir=.
44266    for ac_exec_ext in '' $ac_executable_extensions; do
44267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44268    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44270    break 2
44271  fi
44272done
44273  done
44274IFS=$as_save_IFS
44275
44276  ;;
44277esac
44278fi
44279BUILD_CC=$ac_cv_path_BUILD_CC
44280if test -n "$BUILD_CC"; then
44281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44282$as_echo "$BUILD_CC" >&6; }
44283else
44284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44285$as_echo "no" >&6; }
44286fi
44287
44288
44289          if test "x$BUILD_CC" = x; then
44290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44291          fi
44292        else
44293          # Otherwise we believe it is a complete path. Use it as it is.
44294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44295$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44297$as_echo_n "checking for BUILD_CC... " >&6; }
44298          if test ! -x "$tool_specified"; then
44299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44300$as_echo "not found" >&6; }
44301            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44302          fi
44303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44304$as_echo "$tool_specified" >&6; }
44305        fi
44306      fi
44307    fi
44308
44309  fi
44310
44311
44312
44313  if test "x$BUILD_CC" = x; then
44314    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44315  fi
44316
44317
44318
44319  # Only process if variable expands to non-empty
44320
44321  if test "x$BUILD_CC" != x; then
44322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44323
44324  # First separate the path from the arguments. This will split at the first
44325  # space.
44326  complete="$BUILD_CC"
44327  path="${complete%% *}"
44328  tmp="$complete EOL"
44329  arguments="${tmp#* }"
44330
44331  # Input might be given as Windows format, start by converting to
44332  # unix format.
44333  new_path=`$CYGPATH -u "$path"`
44334
44335  # Now try to locate executable using which
44336  new_path=`$WHICH "$new_path" 2> /dev/null`
44337  # bat and cmd files are not always considered executable in cygwin causing which
44338  # to not find them
44339  if test "x$new_path" = x \
44340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44342    new_path=`$CYGPATH -u "$path"`
44343  fi
44344  if test "x$new_path" = x; then
44345    # Oops. Which didn't find the executable.
44346    # The splitting of arguments from the executable at a space might have been incorrect,
44347    # since paths with space are more likely in Windows. Give it another try with the whole
44348    # argument.
44349    path="$complete"
44350    arguments="EOL"
44351    new_path=`$CYGPATH -u "$path"`
44352    new_path=`$WHICH "$new_path" 2> /dev/null`
44353    # bat and cmd files are not always considered executable in cygwin causing which
44354    # to not find them
44355    if test "x$new_path" = x \
44356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44358      new_path=`$CYGPATH -u "$path"`
44359    fi
44360    if test "x$new_path" = x; then
44361      # It's still not found. Now this is an unrecoverable error.
44362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44363$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44364      has_space=`$ECHO "$complete" | $GREP " "`
44365      if test "x$has_space" != x; then
44366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44368      fi
44369      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44370    fi
44371  fi
44372
44373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44376  # "foo.exe" is OK but "foo" is an error.
44377  #
44378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44379  # It is also a way to make sure we got the proper file name for the real test later on.
44380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44381  if test "x$test_shortpath" = x; then
44382    # Short path failed, file does not exist as specified.
44383    # Try adding .exe or .cmd
44384    if test -f "${new_path}.exe"; then
44385      input_to_shortpath="${new_path}.exe"
44386    elif test -f "${new_path}.cmd"; then
44387      input_to_shortpath="${new_path}.cmd"
44388    else
44389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44390$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44393      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44394    fi
44395  else
44396    input_to_shortpath="$new_path"
44397  fi
44398
44399  # Call helper function which possibly converts this using DOS-style short mode.
44400  # If so, the updated path is stored in $new_path.
44401  new_path="$input_to_shortpath"
44402
44403  input_path="$input_to_shortpath"
44404  # Check if we need to convert this using DOS-style short mode. If the path
44405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44406  # take no chances and rewrite it.
44407  # Note: m4 eats our [], so we need to use [ and ] instead.
44408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44409  if test "x$has_forbidden_chars" != x; then
44410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44414      # Going to short mode and back again did indeed matter. Since short mode is
44415      # case insensitive, let's make it lowercase to improve readability.
44416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44417      # Now convert it back to Unix-style (cygpath)
44418      input_path=`$CYGPATH -u "$shortmode_path"`
44419      new_path="$input_path"
44420    fi
44421  fi
44422
44423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44424  if test "x$test_cygdrive_prefix" = x; then
44425    # As a simple fix, exclude /usr/bin since it's not a real path.
44426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44428      # a path prefixed by /cygdrive for fixpath to work.
44429      new_path="$CYGWIN_ROOT_PATH$input_path"
44430    fi
44431  fi
44432
44433  # remove trailing .exe if any
44434  new_path="${new_path/%.exe/}"
44435
44436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44437
44438  # First separate the path from the arguments. This will split at the first
44439  # space.
44440  complete="$BUILD_CC"
44441  path="${complete%% *}"
44442  tmp="$complete EOL"
44443  arguments="${tmp#* }"
44444
44445  # Input might be given as Windows format, start by converting to
44446  # unix format.
44447  new_path="$path"
44448
44449  windows_path="$new_path"
44450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44451    unix_path=`$CYGPATH -u "$windows_path"`
44452    new_path="$unix_path"
44453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44455    new_path="$unix_path"
44456  fi
44457
44458
44459  # Now try to locate executable using which
44460  new_path=`$WHICH "$new_path" 2> /dev/null`
44461
44462  if test "x$new_path" = x; then
44463    # Oops. Which didn't find the executable.
44464    # The splitting of arguments from the executable at a space might have been incorrect,
44465    # since paths with space are more likely in Windows. Give it another try with the whole
44466    # argument.
44467    path="$complete"
44468    arguments="EOL"
44469    new_path="$path"
44470
44471  windows_path="$new_path"
44472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44473    unix_path=`$CYGPATH -u "$windows_path"`
44474    new_path="$unix_path"
44475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44477    new_path="$unix_path"
44478  fi
44479
44480
44481    new_path=`$WHICH "$new_path" 2> /dev/null`
44482    # bat and cmd files are not always considered executable in MSYS causing which
44483    # to not find them
44484    if test "x$new_path" = x \
44485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44487      new_path="$path"
44488
44489  windows_path="$new_path"
44490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44491    unix_path=`$CYGPATH -u "$windows_path"`
44492    new_path="$unix_path"
44493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44495    new_path="$unix_path"
44496  fi
44497
44498    fi
44499
44500    if test "x$new_path" = x; then
44501      # It's still not found. Now this is an unrecoverable error.
44502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44503$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44504      has_space=`$ECHO "$complete" | $GREP " "`
44505      if test "x$has_space" != x; then
44506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44508      fi
44509      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44510    fi
44511  fi
44512
44513  # Now new_path has a complete unix path to the binary
44514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44515    # Keep paths in /bin as-is, but remove trailing .exe if any
44516    new_path="${new_path/%.exe/}"
44517    # Do not save /bin paths to all_fixpath_prefixes!
44518  else
44519    # Not in mixed or Windows style, start by that.
44520    new_path=`cmd //c echo $new_path`
44521
44522  input_path="$new_path"
44523  # Check if we need to convert this using DOS-style short mode. If the path
44524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44525  # take no chances and rewrite it.
44526  # Note: m4 eats our [], so we need to use [ and ] instead.
44527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44528  if test "x$has_forbidden_chars" != x; then
44529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44531  fi
44532
44533    # Output is in $new_path
44534
44535  windows_path="$new_path"
44536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44537    unix_path=`$CYGPATH -u "$windows_path"`
44538    new_path="$unix_path"
44539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44541    new_path="$unix_path"
44542  fi
44543
44544    # remove trailing .exe if any
44545    new_path="${new_path/%.exe/}"
44546
44547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44549  fi
44550
44551    else
44552      # We're on a unix platform. Hooray! :)
44553      # First separate the path from the arguments. This will split at the first
44554      # space.
44555      complete="$BUILD_CC"
44556      path="${complete%% *}"
44557      tmp="$complete EOL"
44558      arguments="${tmp#* }"
44559
44560      # Cannot rely on the command "which" here since it doesn't always work.
44561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44562      if test -z "$is_absolute_path"; then
44563        # Path to executable is not absolute. Find it.
44564        IFS_save="$IFS"
44565        IFS=:
44566        for p in $PATH; do
44567          if test -f "$p/$path" && test -x "$p/$path"; then
44568            new_path="$p/$path"
44569            break
44570          fi
44571        done
44572        IFS="$IFS_save"
44573      else
44574        # This is an absolute path, we can use it without further modifications.
44575        new_path="$path"
44576      fi
44577
44578      if test "x$new_path" = x; then
44579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44580$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44581        has_space=`$ECHO "$complete" | $GREP " "`
44582        if test "x$has_space" != x; then
44583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44585        fi
44586        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44587      fi
44588    fi
44589
44590    # Now join together the path and the arguments once again
44591    if test "x$arguments" != xEOL; then
44592      new_complete="$new_path ${arguments% *}"
44593    else
44594      new_complete="$new_path"
44595    fi
44596
44597    if test "x$complete" != "x$new_complete"; then
44598      BUILD_CC="$new_complete"
44599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44600$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44601    fi
44602  fi
44603
44604
44605
44606
44607  # Publish this variable in the help.
44608
44609
44610  if [ -z "${BUILD_CXX+x}" ]; then
44611    # The variable is not set by user, try to locate tool using the code snippet
44612    for ac_prog in cl CC g++
44613do
44614  # Extract the first word of "$ac_prog", so it can be a program name with args.
44615set dummy $ac_prog; ac_word=$2
44616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44617$as_echo_n "checking for $ac_word... " >&6; }
44618if ${ac_cv_path_BUILD_CXX+:} false; then :
44619  $as_echo_n "(cached) " >&6
44620else
44621  case $BUILD_CXX in
44622  [\\/]* | ?:[\\/]*)
44623  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44624  ;;
44625  *)
44626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44627for as_dir in $PATH
44628do
44629  IFS=$as_save_IFS
44630  test -z "$as_dir" && as_dir=.
44631    for ac_exec_ext in '' $ac_executable_extensions; do
44632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44633    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44635    break 2
44636  fi
44637done
44638  done
44639IFS=$as_save_IFS
44640
44641  ;;
44642esac
44643fi
44644BUILD_CXX=$ac_cv_path_BUILD_CXX
44645if test -n "$BUILD_CXX"; then
44646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44647$as_echo "$BUILD_CXX" >&6; }
44648else
44649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44650$as_echo "no" >&6; }
44651fi
44652
44653
44654  test -n "$BUILD_CXX" && break
44655done
44656
44657  else
44658    # The variable is set, but is it from the command line or the environment?
44659
44660    # Try to remove the string !BUILD_CXX! from our list.
44661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44663      # If it failed, the variable was not from the command line. Ignore it,
44664      # but warn the user (except for BASH, which is always set by the calling BASH).
44665      if test "xBUILD_CXX" != xBASH; then
44666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44667$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44668      fi
44669      # Try to locate tool using the code snippet
44670      for ac_prog in cl CC g++
44671do
44672  # Extract the first word of "$ac_prog", so it can be a program name with args.
44673set dummy $ac_prog; ac_word=$2
44674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44675$as_echo_n "checking for $ac_word... " >&6; }
44676if ${ac_cv_path_BUILD_CXX+:} false; then :
44677  $as_echo_n "(cached) " >&6
44678else
44679  case $BUILD_CXX in
44680  [\\/]* | ?:[\\/]*)
44681  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44682  ;;
44683  *)
44684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44685for as_dir in $PATH
44686do
44687  IFS=$as_save_IFS
44688  test -z "$as_dir" && as_dir=.
44689    for ac_exec_ext in '' $ac_executable_extensions; do
44690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44691    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44693    break 2
44694  fi
44695done
44696  done
44697IFS=$as_save_IFS
44698
44699  ;;
44700esac
44701fi
44702BUILD_CXX=$ac_cv_path_BUILD_CXX
44703if test -n "$BUILD_CXX"; then
44704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44705$as_echo "$BUILD_CXX" >&6; }
44706else
44707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44708$as_echo "no" >&6; }
44709fi
44710
44711
44712  test -n "$BUILD_CXX" && break
44713done
44714
44715    else
44716      # If it succeeded, then it was overridden by the user. We will use it
44717      # for the tool.
44718
44719      # First remove it from the list of overridden variables, so we can test
44720      # for unknown variables in the end.
44721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44722
44723      # Check if we try to supply an empty value
44724      if test "x$BUILD_CXX" = x; then
44725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44726$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44728$as_echo_n "checking for BUILD_CXX... " >&6; }
44729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44730$as_echo "disabled" >&6; }
44731      else
44732        # Check if the provided tool contains a complete path.
44733        tool_specified="$BUILD_CXX"
44734        tool_basename="${tool_specified##*/}"
44735        if test "x$tool_basename" = "x$tool_specified"; then
44736          # A command without a complete path is provided, search $PATH.
44737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44738$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44739          # Extract the first word of "$tool_basename", so it can be a program name with args.
44740set dummy $tool_basename; ac_word=$2
44741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44742$as_echo_n "checking for $ac_word... " >&6; }
44743if ${ac_cv_path_BUILD_CXX+:} false; then :
44744  $as_echo_n "(cached) " >&6
44745else
44746  case $BUILD_CXX in
44747  [\\/]* | ?:[\\/]*)
44748  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44749  ;;
44750  *)
44751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44752for as_dir in $PATH
44753do
44754  IFS=$as_save_IFS
44755  test -z "$as_dir" && as_dir=.
44756    for ac_exec_ext in '' $ac_executable_extensions; do
44757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44758    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44760    break 2
44761  fi
44762done
44763  done
44764IFS=$as_save_IFS
44765
44766  ;;
44767esac
44768fi
44769BUILD_CXX=$ac_cv_path_BUILD_CXX
44770if test -n "$BUILD_CXX"; then
44771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44772$as_echo "$BUILD_CXX" >&6; }
44773else
44774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44775$as_echo "no" >&6; }
44776fi
44777
44778
44779          if test "x$BUILD_CXX" = x; then
44780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44781          fi
44782        else
44783          # Otherwise we believe it is a complete path. Use it as it is.
44784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44785$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44787$as_echo_n "checking for BUILD_CXX... " >&6; }
44788          if test ! -x "$tool_specified"; then
44789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44790$as_echo "not found" >&6; }
44791            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44792          fi
44793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44794$as_echo "$tool_specified" >&6; }
44795        fi
44796      fi
44797    fi
44798
44799  fi
44800
44801
44802
44803  if test "x$BUILD_CXX" = x; then
44804    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44805  fi
44806
44807
44808
44809  # Only process if variable expands to non-empty
44810
44811  if test "x$BUILD_CXX" != x; then
44812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44813
44814  # First separate the path from the arguments. This will split at the first
44815  # space.
44816  complete="$BUILD_CXX"
44817  path="${complete%% *}"
44818  tmp="$complete EOL"
44819  arguments="${tmp#* }"
44820
44821  # Input might be given as Windows format, start by converting to
44822  # unix format.
44823  new_path=`$CYGPATH -u "$path"`
44824
44825  # Now try to locate executable using which
44826  new_path=`$WHICH "$new_path" 2> /dev/null`
44827  # bat and cmd files are not always considered executable in cygwin causing which
44828  # to not find them
44829  if test "x$new_path" = x \
44830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44832    new_path=`$CYGPATH -u "$path"`
44833  fi
44834  if test "x$new_path" = x; then
44835    # Oops. Which didn't find the executable.
44836    # The splitting of arguments from the executable at a space might have been incorrect,
44837    # since paths with space are more likely in Windows. Give it another try with the whole
44838    # argument.
44839    path="$complete"
44840    arguments="EOL"
44841    new_path=`$CYGPATH -u "$path"`
44842    new_path=`$WHICH "$new_path" 2> /dev/null`
44843    # bat and cmd files are not always considered executable in cygwin causing which
44844    # to not find them
44845    if test "x$new_path" = x \
44846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44848      new_path=`$CYGPATH -u "$path"`
44849    fi
44850    if test "x$new_path" = x; then
44851      # It's still not found. Now this is an unrecoverable error.
44852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44853$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44854      has_space=`$ECHO "$complete" | $GREP " "`
44855      if test "x$has_space" != x; then
44856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44858      fi
44859      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44860    fi
44861  fi
44862
44863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44866  # "foo.exe" is OK but "foo" is an error.
44867  #
44868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44869  # It is also a way to make sure we got the proper file name for the real test later on.
44870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44871  if test "x$test_shortpath" = x; then
44872    # Short path failed, file does not exist as specified.
44873    # Try adding .exe or .cmd
44874    if test -f "${new_path}.exe"; then
44875      input_to_shortpath="${new_path}.exe"
44876    elif test -f "${new_path}.cmd"; then
44877      input_to_shortpath="${new_path}.cmd"
44878    else
44879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44880$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44883      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44884    fi
44885  else
44886    input_to_shortpath="$new_path"
44887  fi
44888
44889  # Call helper function which possibly converts this using DOS-style short mode.
44890  # If so, the updated path is stored in $new_path.
44891  new_path="$input_to_shortpath"
44892
44893  input_path="$input_to_shortpath"
44894  # Check if we need to convert this using DOS-style short mode. If the path
44895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44896  # take no chances and rewrite it.
44897  # Note: m4 eats our [], so we need to use [ and ] instead.
44898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44899  if test "x$has_forbidden_chars" != x; then
44900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44904      # Going to short mode and back again did indeed matter. Since short mode is
44905      # case insensitive, let's make it lowercase to improve readability.
44906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44907      # Now convert it back to Unix-style (cygpath)
44908      input_path=`$CYGPATH -u "$shortmode_path"`
44909      new_path="$input_path"
44910    fi
44911  fi
44912
44913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44914  if test "x$test_cygdrive_prefix" = x; then
44915    # As a simple fix, exclude /usr/bin since it's not a real path.
44916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44918      # a path prefixed by /cygdrive for fixpath to work.
44919      new_path="$CYGWIN_ROOT_PATH$input_path"
44920    fi
44921  fi
44922
44923  # remove trailing .exe if any
44924  new_path="${new_path/%.exe/}"
44925
44926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44927
44928  # First separate the path from the arguments. This will split at the first
44929  # space.
44930  complete="$BUILD_CXX"
44931  path="${complete%% *}"
44932  tmp="$complete EOL"
44933  arguments="${tmp#* }"
44934
44935  # Input might be given as Windows format, start by converting to
44936  # unix format.
44937  new_path="$path"
44938
44939  windows_path="$new_path"
44940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44941    unix_path=`$CYGPATH -u "$windows_path"`
44942    new_path="$unix_path"
44943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44945    new_path="$unix_path"
44946  fi
44947
44948
44949  # Now try to locate executable using which
44950  new_path=`$WHICH "$new_path" 2> /dev/null`
44951
44952  if test "x$new_path" = x; then
44953    # Oops. Which didn't find the executable.
44954    # The splitting of arguments from the executable at a space might have been incorrect,
44955    # since paths with space are more likely in Windows. Give it another try with the whole
44956    # argument.
44957    path="$complete"
44958    arguments="EOL"
44959    new_path="$path"
44960
44961  windows_path="$new_path"
44962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44963    unix_path=`$CYGPATH -u "$windows_path"`
44964    new_path="$unix_path"
44965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44967    new_path="$unix_path"
44968  fi
44969
44970
44971    new_path=`$WHICH "$new_path" 2> /dev/null`
44972    # bat and cmd files are not always considered executable in MSYS causing which
44973    # to not find them
44974    if test "x$new_path" = x \
44975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44977      new_path="$path"
44978
44979  windows_path="$new_path"
44980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44981    unix_path=`$CYGPATH -u "$windows_path"`
44982    new_path="$unix_path"
44983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44985    new_path="$unix_path"
44986  fi
44987
44988    fi
44989
44990    if test "x$new_path" = x; then
44991      # It's still not found. Now this is an unrecoverable error.
44992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44993$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44994      has_space=`$ECHO "$complete" | $GREP " "`
44995      if test "x$has_space" != x; then
44996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44998      fi
44999      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45000    fi
45001  fi
45002
45003  # Now new_path has a complete unix path to the binary
45004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45005    # Keep paths in /bin as-is, but remove trailing .exe if any
45006    new_path="${new_path/%.exe/}"
45007    # Do not save /bin paths to all_fixpath_prefixes!
45008  else
45009    # Not in mixed or Windows style, start by that.
45010    new_path=`cmd //c echo $new_path`
45011
45012  input_path="$new_path"
45013  # Check if we need to convert this using DOS-style short mode. If the path
45014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45015  # take no chances and rewrite it.
45016  # Note: m4 eats our [], so we need to use [ and ] instead.
45017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45018  if test "x$has_forbidden_chars" != x; then
45019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45021  fi
45022
45023    # Output is in $new_path
45024
45025  windows_path="$new_path"
45026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45027    unix_path=`$CYGPATH -u "$windows_path"`
45028    new_path="$unix_path"
45029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45031    new_path="$unix_path"
45032  fi
45033
45034    # remove trailing .exe if any
45035    new_path="${new_path/%.exe/}"
45036
45037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45039  fi
45040
45041    else
45042      # We're on a unix platform. Hooray! :)
45043      # First separate the path from the arguments. This will split at the first
45044      # space.
45045      complete="$BUILD_CXX"
45046      path="${complete%% *}"
45047      tmp="$complete EOL"
45048      arguments="${tmp#* }"
45049
45050      # Cannot rely on the command "which" here since it doesn't always work.
45051      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45052      if test -z "$is_absolute_path"; then
45053        # Path to executable is not absolute. Find it.
45054        IFS_save="$IFS"
45055        IFS=:
45056        for p in $PATH; do
45057          if test -f "$p/$path" && test -x "$p/$path"; then
45058            new_path="$p/$path"
45059            break
45060          fi
45061        done
45062        IFS="$IFS_save"
45063      else
45064        # This is an absolute path, we can use it without further modifications.
45065        new_path="$path"
45066      fi
45067
45068      if test "x$new_path" = x; then
45069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45070$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45071        has_space=`$ECHO "$complete" | $GREP " "`
45072        if test "x$has_space" != x; then
45073          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45075        fi
45076        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45077      fi
45078    fi
45079
45080    # Now join together the path and the arguments once again
45081    if test "x$arguments" != xEOL; then
45082      new_complete="$new_path ${arguments% *}"
45083    else
45084      new_complete="$new_path"
45085    fi
45086
45087    if test "x$complete" != "x$new_complete"; then
45088      BUILD_CXX="$new_complete"
45089      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45090$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45091    fi
45092  fi
45093
45094
45095
45096  # Publish this variable in the help.
45097
45098
45099  if [ -z "${BUILD_NM+x}" ]; then
45100    # The variable is not set by user, try to locate tool using the code snippet
45101    for ac_prog in nm gcc-nm
45102do
45103  # Extract the first word of "$ac_prog", so it can be a program name with args.
45104set dummy $ac_prog; ac_word=$2
45105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45106$as_echo_n "checking for $ac_word... " >&6; }
45107if ${ac_cv_path_BUILD_NM+:} false; then :
45108  $as_echo_n "(cached) " >&6
45109else
45110  case $BUILD_NM in
45111  [\\/]* | ?:[\\/]*)
45112  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45113  ;;
45114  *)
45115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45116for as_dir in $PATH
45117do
45118  IFS=$as_save_IFS
45119  test -z "$as_dir" && as_dir=.
45120    for ac_exec_ext in '' $ac_executable_extensions; do
45121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45122    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45124    break 2
45125  fi
45126done
45127  done
45128IFS=$as_save_IFS
45129
45130  ;;
45131esac
45132fi
45133BUILD_NM=$ac_cv_path_BUILD_NM
45134if test -n "$BUILD_NM"; then
45135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45136$as_echo "$BUILD_NM" >&6; }
45137else
45138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45139$as_echo "no" >&6; }
45140fi
45141
45142
45143  test -n "$BUILD_NM" && break
45144done
45145
45146  else
45147    # The variable is set, but is it from the command line or the environment?
45148
45149    # Try to remove the string !BUILD_NM! from our list.
45150    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45151    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45152      # If it failed, the variable was not from the command line. Ignore it,
45153      # but warn the user (except for BASH, which is always set by the calling BASH).
45154      if test "xBUILD_NM" != xBASH; then
45155        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45156$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45157      fi
45158      # Try to locate tool using the code snippet
45159      for ac_prog in nm gcc-nm
45160do
45161  # Extract the first word of "$ac_prog", so it can be a program name with args.
45162set dummy $ac_prog; ac_word=$2
45163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45164$as_echo_n "checking for $ac_word... " >&6; }
45165if ${ac_cv_path_BUILD_NM+:} false; then :
45166  $as_echo_n "(cached) " >&6
45167else
45168  case $BUILD_NM in
45169  [\\/]* | ?:[\\/]*)
45170  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45171  ;;
45172  *)
45173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45174for as_dir in $PATH
45175do
45176  IFS=$as_save_IFS
45177  test -z "$as_dir" && as_dir=.
45178    for ac_exec_ext in '' $ac_executable_extensions; do
45179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45180    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45182    break 2
45183  fi
45184done
45185  done
45186IFS=$as_save_IFS
45187
45188  ;;
45189esac
45190fi
45191BUILD_NM=$ac_cv_path_BUILD_NM
45192if test -n "$BUILD_NM"; then
45193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45194$as_echo "$BUILD_NM" >&6; }
45195else
45196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45197$as_echo "no" >&6; }
45198fi
45199
45200
45201  test -n "$BUILD_NM" && break
45202done
45203
45204    else
45205      # If it succeeded, then it was overridden by the user. We will use it
45206      # for the tool.
45207
45208      # First remove it from the list of overridden variables, so we can test
45209      # for unknown variables in the end.
45210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45211
45212      # Check if we try to supply an empty value
45213      if test "x$BUILD_NM" = x; then
45214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45215$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45217$as_echo_n "checking for BUILD_NM... " >&6; }
45218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45219$as_echo "disabled" >&6; }
45220      else
45221        # Check if the provided tool contains a complete path.
45222        tool_specified="$BUILD_NM"
45223        tool_basename="${tool_specified##*/}"
45224        if test "x$tool_basename" = "x$tool_specified"; then
45225          # A command without a complete path is provided, search $PATH.
45226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45227$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45228          # Extract the first word of "$tool_basename", so it can be a program name with args.
45229set dummy $tool_basename; ac_word=$2
45230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45231$as_echo_n "checking for $ac_word... " >&6; }
45232if ${ac_cv_path_BUILD_NM+:} false; then :
45233  $as_echo_n "(cached) " >&6
45234else
45235  case $BUILD_NM in
45236  [\\/]* | ?:[\\/]*)
45237  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45238  ;;
45239  *)
45240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45241for as_dir in $PATH
45242do
45243  IFS=$as_save_IFS
45244  test -z "$as_dir" && as_dir=.
45245    for ac_exec_ext in '' $ac_executable_extensions; do
45246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45247    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45249    break 2
45250  fi
45251done
45252  done
45253IFS=$as_save_IFS
45254
45255  ;;
45256esac
45257fi
45258BUILD_NM=$ac_cv_path_BUILD_NM
45259if test -n "$BUILD_NM"; then
45260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45261$as_echo "$BUILD_NM" >&6; }
45262else
45263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45264$as_echo "no" >&6; }
45265fi
45266
45267
45268          if test "x$BUILD_NM" = x; then
45269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45270          fi
45271        else
45272          # Otherwise we believe it is a complete path. Use it as it is.
45273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45274$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45276$as_echo_n "checking for BUILD_NM... " >&6; }
45277          if test ! -x "$tool_specified"; then
45278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45279$as_echo "not found" >&6; }
45280            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45281          fi
45282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45283$as_echo "$tool_specified" >&6; }
45284        fi
45285      fi
45286    fi
45287
45288  fi
45289
45290
45291
45292  # Only process if variable expands to non-empty
45293
45294  if test "x$BUILD_NM" != x; then
45295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45296
45297  # First separate the path from the arguments. This will split at the first
45298  # space.
45299  complete="$BUILD_NM"
45300  path="${complete%% *}"
45301  tmp="$complete EOL"
45302  arguments="${tmp#* }"
45303
45304  # Input might be given as Windows format, start by converting to
45305  # unix format.
45306  new_path=`$CYGPATH -u "$path"`
45307
45308  # Now try to locate executable using which
45309  new_path=`$WHICH "$new_path" 2> /dev/null`
45310  # bat and cmd files are not always considered executable in cygwin causing which
45311  # to not find them
45312  if test "x$new_path" = x \
45313      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45314      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45315    new_path=`$CYGPATH -u "$path"`
45316  fi
45317  if test "x$new_path" = x; then
45318    # Oops. Which didn't find the executable.
45319    # The splitting of arguments from the executable at a space might have been incorrect,
45320    # since paths with space are more likely in Windows. Give it another try with the whole
45321    # argument.
45322    path="$complete"
45323    arguments="EOL"
45324    new_path=`$CYGPATH -u "$path"`
45325    new_path=`$WHICH "$new_path" 2> /dev/null`
45326    # bat and cmd files are not always considered executable in cygwin causing which
45327    # to not find them
45328    if test "x$new_path" = x \
45329        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45330        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45331      new_path=`$CYGPATH -u "$path"`
45332    fi
45333    if test "x$new_path" = x; then
45334      # It's still not found. Now this is an unrecoverable error.
45335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45336$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45337      has_space=`$ECHO "$complete" | $GREP " "`
45338      if test "x$has_space" != x; then
45339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45341      fi
45342      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45343    fi
45344  fi
45345
45346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45349  # "foo.exe" is OK but "foo" is an error.
45350  #
45351  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45352  # It is also a way to make sure we got the proper file name for the real test later on.
45353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45354  if test "x$test_shortpath" = x; then
45355    # Short path failed, file does not exist as specified.
45356    # Try adding .exe or .cmd
45357    if test -f "${new_path}.exe"; then
45358      input_to_shortpath="${new_path}.exe"
45359    elif test -f "${new_path}.cmd"; then
45360      input_to_shortpath="${new_path}.cmd"
45361    else
45362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45363$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45364      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45365$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45366      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45367    fi
45368  else
45369    input_to_shortpath="$new_path"
45370  fi
45371
45372  # Call helper function which possibly converts this using DOS-style short mode.
45373  # If so, the updated path is stored in $new_path.
45374  new_path="$input_to_shortpath"
45375
45376  input_path="$input_to_shortpath"
45377  # Check if we need to convert this using DOS-style short mode. If the path
45378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45379  # take no chances and rewrite it.
45380  # Note: m4 eats our [], so we need to use [ and ] instead.
45381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45382  if test "x$has_forbidden_chars" != x; then
45383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45387      # Going to short mode and back again did indeed matter. Since short mode is
45388      # case insensitive, let's make it lowercase to improve readability.
45389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45390      # Now convert it back to Unix-style (cygpath)
45391      input_path=`$CYGPATH -u "$shortmode_path"`
45392      new_path="$input_path"
45393    fi
45394  fi
45395
45396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45397  if test "x$test_cygdrive_prefix" = x; then
45398    # As a simple fix, exclude /usr/bin since it's not a real path.
45399    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45401      # a path prefixed by /cygdrive for fixpath to work.
45402      new_path="$CYGWIN_ROOT_PATH$input_path"
45403    fi
45404  fi
45405
45406  # remove trailing .exe if any
45407  new_path="${new_path/%.exe/}"
45408
45409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45410
45411  # First separate the path from the arguments. This will split at the first
45412  # space.
45413  complete="$BUILD_NM"
45414  path="${complete%% *}"
45415  tmp="$complete EOL"
45416  arguments="${tmp#* }"
45417
45418  # Input might be given as Windows format, start by converting to
45419  # unix format.
45420  new_path="$path"
45421
45422  windows_path="$new_path"
45423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45424    unix_path=`$CYGPATH -u "$windows_path"`
45425    new_path="$unix_path"
45426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45428    new_path="$unix_path"
45429  fi
45430
45431
45432  # Now try to locate executable using which
45433  new_path=`$WHICH "$new_path" 2> /dev/null`
45434
45435  if test "x$new_path" = x; then
45436    # Oops. Which didn't find the executable.
45437    # The splitting of arguments from the executable at a space might have been incorrect,
45438    # since paths with space are more likely in Windows. Give it another try with the whole
45439    # argument.
45440    path="$complete"
45441    arguments="EOL"
45442    new_path="$path"
45443
45444  windows_path="$new_path"
45445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45446    unix_path=`$CYGPATH -u "$windows_path"`
45447    new_path="$unix_path"
45448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45450    new_path="$unix_path"
45451  fi
45452
45453
45454    new_path=`$WHICH "$new_path" 2> /dev/null`
45455    # bat and cmd files are not always considered executable in MSYS causing which
45456    # to not find them
45457    if test "x$new_path" = x \
45458        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45459        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45460      new_path="$path"
45461
45462  windows_path="$new_path"
45463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45464    unix_path=`$CYGPATH -u "$windows_path"`
45465    new_path="$unix_path"
45466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45468    new_path="$unix_path"
45469  fi
45470
45471    fi
45472
45473    if test "x$new_path" = x; then
45474      # It's still not found. Now this is an unrecoverable error.
45475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45476$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45477      has_space=`$ECHO "$complete" | $GREP " "`
45478      if test "x$has_space" != x; then
45479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45481      fi
45482      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45483    fi
45484  fi
45485
45486  # Now new_path has a complete unix path to the binary
45487  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45488    # Keep paths in /bin as-is, but remove trailing .exe if any
45489    new_path="${new_path/%.exe/}"
45490    # Do not save /bin paths to all_fixpath_prefixes!
45491  else
45492    # Not in mixed or Windows style, start by that.
45493    new_path=`cmd //c echo $new_path`
45494
45495  input_path="$new_path"
45496  # Check if we need to convert this using DOS-style short mode. If the path
45497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45498  # take no chances and rewrite it.
45499  # Note: m4 eats our [], so we need to use [ and ] instead.
45500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45501  if test "x$has_forbidden_chars" != x; then
45502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45504  fi
45505
45506    # Output is in $new_path
45507
45508  windows_path="$new_path"
45509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45510    unix_path=`$CYGPATH -u "$windows_path"`
45511    new_path="$unix_path"
45512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45514    new_path="$unix_path"
45515  fi
45516
45517    # remove trailing .exe if any
45518    new_path="${new_path/%.exe/}"
45519
45520    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45521    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45522  fi
45523
45524    else
45525      # We're on a unix platform. Hooray! :)
45526      # First separate the path from the arguments. This will split at the first
45527      # space.
45528      complete="$BUILD_NM"
45529      path="${complete%% *}"
45530      tmp="$complete EOL"
45531      arguments="${tmp#* }"
45532
45533      # Cannot rely on the command "which" here since it doesn't always work.
45534      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45535      if test -z "$is_absolute_path"; then
45536        # Path to executable is not absolute. Find it.
45537        IFS_save="$IFS"
45538        IFS=:
45539        for p in $PATH; do
45540          if test -f "$p/$path" && test -x "$p/$path"; then
45541            new_path="$p/$path"
45542            break
45543          fi
45544        done
45545        IFS="$IFS_save"
45546      else
45547        # This is an absolute path, we can use it without further modifications.
45548        new_path="$path"
45549      fi
45550
45551      if test "x$new_path" = x; then
45552        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45553$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45554        has_space=`$ECHO "$complete" | $GREP " "`
45555        if test "x$has_space" != x; then
45556          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45557$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45558        fi
45559        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45560      fi
45561    fi
45562
45563    # Now join together the path and the arguments once again
45564    if test "x$arguments" != xEOL; then
45565      new_complete="$new_path ${arguments% *}"
45566    else
45567      new_complete="$new_path"
45568    fi
45569
45570    if test "x$complete" != "x$new_complete"; then
45571      BUILD_NM="$new_complete"
45572      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45573$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45574    fi
45575  fi
45576
45577
45578
45579  # Publish this variable in the help.
45580
45581
45582  if [ -z "${BUILD_AR+x}" ]; then
45583    # The variable is not set by user, try to locate tool using the code snippet
45584    for ac_prog in ar gcc-ar
45585do
45586  # Extract the first word of "$ac_prog", so it can be a program name with args.
45587set dummy $ac_prog; ac_word=$2
45588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45589$as_echo_n "checking for $ac_word... " >&6; }
45590if ${ac_cv_path_BUILD_AR+:} false; then :
45591  $as_echo_n "(cached) " >&6
45592else
45593  case $BUILD_AR in
45594  [\\/]* | ?:[\\/]*)
45595  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45596  ;;
45597  *)
45598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45599for as_dir in $PATH
45600do
45601  IFS=$as_save_IFS
45602  test -z "$as_dir" && as_dir=.
45603    for ac_exec_ext in '' $ac_executable_extensions; do
45604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45605    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45607    break 2
45608  fi
45609done
45610  done
45611IFS=$as_save_IFS
45612
45613  ;;
45614esac
45615fi
45616BUILD_AR=$ac_cv_path_BUILD_AR
45617if test -n "$BUILD_AR"; then
45618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45619$as_echo "$BUILD_AR" >&6; }
45620else
45621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45622$as_echo "no" >&6; }
45623fi
45624
45625
45626  test -n "$BUILD_AR" && break
45627done
45628
45629  else
45630    # The variable is set, but is it from the command line or the environment?
45631
45632    # Try to remove the string !BUILD_AR! from our list.
45633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45635      # If it failed, the variable was not from the command line. Ignore it,
45636      # but warn the user (except for BASH, which is always set by the calling BASH).
45637      if test "xBUILD_AR" != xBASH; then
45638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45639$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45640      fi
45641      # Try to locate tool using the code snippet
45642      for ac_prog in ar gcc-ar
45643do
45644  # Extract the first word of "$ac_prog", so it can be a program name with args.
45645set dummy $ac_prog; ac_word=$2
45646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45647$as_echo_n "checking for $ac_word... " >&6; }
45648if ${ac_cv_path_BUILD_AR+:} false; then :
45649  $as_echo_n "(cached) " >&6
45650else
45651  case $BUILD_AR in
45652  [\\/]* | ?:[\\/]*)
45653  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45654  ;;
45655  *)
45656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45657for as_dir in $PATH
45658do
45659  IFS=$as_save_IFS
45660  test -z "$as_dir" && as_dir=.
45661    for ac_exec_ext in '' $ac_executable_extensions; do
45662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45663    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45665    break 2
45666  fi
45667done
45668  done
45669IFS=$as_save_IFS
45670
45671  ;;
45672esac
45673fi
45674BUILD_AR=$ac_cv_path_BUILD_AR
45675if test -n "$BUILD_AR"; then
45676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45677$as_echo "$BUILD_AR" >&6; }
45678else
45679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45680$as_echo "no" >&6; }
45681fi
45682
45683
45684  test -n "$BUILD_AR" && break
45685done
45686
45687    else
45688      # If it succeeded, then it was overridden by the user. We will use it
45689      # for the tool.
45690
45691      # First remove it from the list of overridden variables, so we can test
45692      # for unknown variables in the end.
45693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45694
45695      # Check if we try to supply an empty value
45696      if test "x$BUILD_AR" = x; then
45697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45698$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45700$as_echo_n "checking for BUILD_AR... " >&6; }
45701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45702$as_echo "disabled" >&6; }
45703      else
45704        # Check if the provided tool contains a complete path.
45705        tool_specified="$BUILD_AR"
45706        tool_basename="${tool_specified##*/}"
45707        if test "x$tool_basename" = "x$tool_specified"; then
45708          # A command without a complete path is provided, search $PATH.
45709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45710$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45711          # Extract the first word of "$tool_basename", so it can be a program name with args.
45712set dummy $tool_basename; ac_word=$2
45713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45714$as_echo_n "checking for $ac_word... " >&6; }
45715if ${ac_cv_path_BUILD_AR+:} false; then :
45716  $as_echo_n "(cached) " >&6
45717else
45718  case $BUILD_AR in
45719  [\\/]* | ?:[\\/]*)
45720  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45721  ;;
45722  *)
45723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45724for as_dir in $PATH
45725do
45726  IFS=$as_save_IFS
45727  test -z "$as_dir" && as_dir=.
45728    for ac_exec_ext in '' $ac_executable_extensions; do
45729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45730    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45732    break 2
45733  fi
45734done
45735  done
45736IFS=$as_save_IFS
45737
45738  ;;
45739esac
45740fi
45741BUILD_AR=$ac_cv_path_BUILD_AR
45742if test -n "$BUILD_AR"; then
45743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45744$as_echo "$BUILD_AR" >&6; }
45745else
45746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45747$as_echo "no" >&6; }
45748fi
45749
45750
45751          if test "x$BUILD_AR" = x; then
45752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45753          fi
45754        else
45755          # Otherwise we believe it is a complete path. Use it as it is.
45756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45757$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45759$as_echo_n "checking for BUILD_AR... " >&6; }
45760          if test ! -x "$tool_specified"; then
45761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45762$as_echo "not found" >&6; }
45763            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45764          fi
45765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45766$as_echo "$tool_specified" >&6; }
45767        fi
45768      fi
45769    fi
45770
45771  fi
45772
45773
45774
45775  # Only process if variable expands to non-empty
45776
45777  if test "x$BUILD_AR" != x; then
45778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45779
45780  # First separate the path from the arguments. This will split at the first
45781  # space.
45782  complete="$BUILD_AR"
45783  path="${complete%% *}"
45784  tmp="$complete EOL"
45785  arguments="${tmp#* }"
45786
45787  # Input might be given as Windows format, start by converting to
45788  # unix format.
45789  new_path=`$CYGPATH -u "$path"`
45790
45791  # Now try to locate executable using which
45792  new_path=`$WHICH "$new_path" 2> /dev/null`
45793  # bat and cmd files are not always considered executable in cygwin causing which
45794  # to not find them
45795  if test "x$new_path" = x \
45796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45798    new_path=`$CYGPATH -u "$path"`
45799  fi
45800  if test "x$new_path" = x; then
45801    # Oops. Which didn't find the executable.
45802    # The splitting of arguments from the executable at a space might have been incorrect,
45803    # since paths with space are more likely in Windows. Give it another try with the whole
45804    # argument.
45805    path="$complete"
45806    arguments="EOL"
45807    new_path=`$CYGPATH -u "$path"`
45808    new_path=`$WHICH "$new_path" 2> /dev/null`
45809    # bat and cmd files are not always considered executable in cygwin causing which
45810    # to not find them
45811    if test "x$new_path" = x \
45812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45814      new_path=`$CYGPATH -u "$path"`
45815    fi
45816    if test "x$new_path" = x; then
45817      # It's still not found. Now this is an unrecoverable error.
45818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45819$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45820      has_space=`$ECHO "$complete" | $GREP " "`
45821      if test "x$has_space" != x; then
45822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45824      fi
45825      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45826    fi
45827  fi
45828
45829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45832  # "foo.exe" is OK but "foo" is an error.
45833  #
45834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45835  # It is also a way to make sure we got the proper file name for the real test later on.
45836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45837  if test "x$test_shortpath" = x; then
45838    # Short path failed, file does not exist as specified.
45839    # Try adding .exe or .cmd
45840    if test -f "${new_path}.exe"; then
45841      input_to_shortpath="${new_path}.exe"
45842    elif test -f "${new_path}.cmd"; then
45843      input_to_shortpath="${new_path}.cmd"
45844    else
45845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45846$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45849      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45850    fi
45851  else
45852    input_to_shortpath="$new_path"
45853  fi
45854
45855  # Call helper function which possibly converts this using DOS-style short mode.
45856  # If so, the updated path is stored in $new_path.
45857  new_path="$input_to_shortpath"
45858
45859  input_path="$input_to_shortpath"
45860  # Check if we need to convert this using DOS-style short mode. If the path
45861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45862  # take no chances and rewrite it.
45863  # Note: m4 eats our [], so we need to use [ and ] instead.
45864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45865  if test "x$has_forbidden_chars" != x; then
45866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45870      # Going to short mode and back again did indeed matter. Since short mode is
45871      # case insensitive, let's make it lowercase to improve readability.
45872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45873      # Now convert it back to Unix-style (cygpath)
45874      input_path=`$CYGPATH -u "$shortmode_path"`
45875      new_path="$input_path"
45876    fi
45877  fi
45878
45879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45880  if test "x$test_cygdrive_prefix" = x; then
45881    # As a simple fix, exclude /usr/bin since it's not a real path.
45882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45884      # a path prefixed by /cygdrive for fixpath to work.
45885      new_path="$CYGWIN_ROOT_PATH$input_path"
45886    fi
45887  fi
45888
45889  # remove trailing .exe if any
45890  new_path="${new_path/%.exe/}"
45891
45892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45893
45894  # First separate the path from the arguments. This will split at the first
45895  # space.
45896  complete="$BUILD_AR"
45897  path="${complete%% *}"
45898  tmp="$complete EOL"
45899  arguments="${tmp#* }"
45900
45901  # Input might be given as Windows format, start by converting to
45902  # unix format.
45903  new_path="$path"
45904
45905  windows_path="$new_path"
45906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45907    unix_path=`$CYGPATH -u "$windows_path"`
45908    new_path="$unix_path"
45909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45911    new_path="$unix_path"
45912  fi
45913
45914
45915  # Now try to locate executable using which
45916  new_path=`$WHICH "$new_path" 2> /dev/null`
45917
45918  if test "x$new_path" = x; then
45919    # Oops. Which didn't find the executable.
45920    # The splitting of arguments from the executable at a space might have been incorrect,
45921    # since paths with space are more likely in Windows. Give it another try with the whole
45922    # argument.
45923    path="$complete"
45924    arguments="EOL"
45925    new_path="$path"
45926
45927  windows_path="$new_path"
45928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45929    unix_path=`$CYGPATH -u "$windows_path"`
45930    new_path="$unix_path"
45931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45933    new_path="$unix_path"
45934  fi
45935
45936
45937    new_path=`$WHICH "$new_path" 2> /dev/null`
45938    # bat and cmd files are not always considered executable in MSYS causing which
45939    # to not find them
45940    if test "x$new_path" = x \
45941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45943      new_path="$path"
45944
45945  windows_path="$new_path"
45946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45947    unix_path=`$CYGPATH -u "$windows_path"`
45948    new_path="$unix_path"
45949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45951    new_path="$unix_path"
45952  fi
45953
45954    fi
45955
45956    if test "x$new_path" = x; then
45957      # It's still not found. Now this is an unrecoverable error.
45958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45959$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45960      has_space=`$ECHO "$complete" | $GREP " "`
45961      if test "x$has_space" != x; then
45962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45964      fi
45965      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45966    fi
45967  fi
45968
45969  # Now new_path has a complete unix path to the binary
45970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45971    # Keep paths in /bin as-is, but remove trailing .exe if any
45972    new_path="${new_path/%.exe/}"
45973    # Do not save /bin paths to all_fixpath_prefixes!
45974  else
45975    # Not in mixed or Windows style, start by that.
45976    new_path=`cmd //c echo $new_path`
45977
45978  input_path="$new_path"
45979  # Check if we need to convert this using DOS-style short mode. If the path
45980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45981  # take no chances and rewrite it.
45982  # Note: m4 eats our [], so we need to use [ and ] instead.
45983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45984  if test "x$has_forbidden_chars" != x; then
45985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45987  fi
45988
45989    # Output is in $new_path
45990
45991  windows_path="$new_path"
45992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45993    unix_path=`$CYGPATH -u "$windows_path"`
45994    new_path="$unix_path"
45995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45997    new_path="$unix_path"
45998  fi
45999
46000    # remove trailing .exe if any
46001    new_path="${new_path/%.exe/}"
46002
46003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46005  fi
46006
46007    else
46008      # We're on a unix platform. Hooray! :)
46009      # First separate the path from the arguments. This will split at the first
46010      # space.
46011      complete="$BUILD_AR"
46012      path="${complete%% *}"
46013      tmp="$complete EOL"
46014      arguments="${tmp#* }"
46015
46016      # Cannot rely on the command "which" here since it doesn't always work.
46017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46018      if test -z "$is_absolute_path"; then
46019        # Path to executable is not absolute. Find it.
46020        IFS_save="$IFS"
46021        IFS=:
46022        for p in $PATH; do
46023          if test -f "$p/$path" && test -x "$p/$path"; then
46024            new_path="$p/$path"
46025            break
46026          fi
46027        done
46028        IFS="$IFS_save"
46029      else
46030        # This is an absolute path, we can use it without further modifications.
46031        new_path="$path"
46032      fi
46033
46034      if test "x$new_path" = x; then
46035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46036$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46037        has_space=`$ECHO "$complete" | $GREP " "`
46038        if test "x$has_space" != x; then
46039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46041        fi
46042        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46043      fi
46044    fi
46045
46046    # Now join together the path and the arguments once again
46047    if test "x$arguments" != xEOL; then
46048      new_complete="$new_path ${arguments% *}"
46049    else
46050      new_complete="$new_path"
46051    fi
46052
46053    if test "x$complete" != "x$new_complete"; then
46054      BUILD_AR="$new_complete"
46055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46056$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46057    fi
46058  fi
46059
46060
46061
46062  # Publish this variable in the help.
46063
46064
46065  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46066    # The variable is not set by user, try to locate tool using the code snippet
46067    for ac_prog in objcopy
46068do
46069  # Extract the first word of "$ac_prog", so it can be a program name with args.
46070set dummy $ac_prog; ac_word=$2
46071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46072$as_echo_n "checking for $ac_word... " >&6; }
46073if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46074  $as_echo_n "(cached) " >&6
46075else
46076  case $BUILD_OBJCOPY in
46077  [\\/]* | ?:[\\/]*)
46078  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46079  ;;
46080  *)
46081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46082for as_dir in $PATH
46083do
46084  IFS=$as_save_IFS
46085  test -z "$as_dir" && as_dir=.
46086    for ac_exec_ext in '' $ac_executable_extensions; do
46087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46088    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46090    break 2
46091  fi
46092done
46093  done
46094IFS=$as_save_IFS
46095
46096  ;;
46097esac
46098fi
46099BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46100if test -n "$BUILD_OBJCOPY"; then
46101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46102$as_echo "$BUILD_OBJCOPY" >&6; }
46103else
46104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46105$as_echo "no" >&6; }
46106fi
46107
46108
46109  test -n "$BUILD_OBJCOPY" && break
46110done
46111
46112  else
46113    # The variable is set, but is it from the command line or the environment?
46114
46115    # Try to remove the string !BUILD_OBJCOPY! from our list.
46116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46118      # If it failed, the variable was not from the command line. Ignore it,
46119      # but warn the user (except for BASH, which is always set by the calling BASH).
46120      if test "xBUILD_OBJCOPY" != xBASH; then
46121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46122$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46123      fi
46124      # Try to locate tool using the code snippet
46125      for ac_prog in objcopy
46126do
46127  # Extract the first word of "$ac_prog", so it can be a program name with args.
46128set dummy $ac_prog; ac_word=$2
46129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46130$as_echo_n "checking for $ac_word... " >&6; }
46131if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46132  $as_echo_n "(cached) " >&6
46133else
46134  case $BUILD_OBJCOPY in
46135  [\\/]* | ?:[\\/]*)
46136  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46137  ;;
46138  *)
46139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46140for as_dir in $PATH
46141do
46142  IFS=$as_save_IFS
46143  test -z "$as_dir" && as_dir=.
46144    for ac_exec_ext in '' $ac_executable_extensions; do
46145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46146    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46148    break 2
46149  fi
46150done
46151  done
46152IFS=$as_save_IFS
46153
46154  ;;
46155esac
46156fi
46157BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46158if test -n "$BUILD_OBJCOPY"; then
46159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46160$as_echo "$BUILD_OBJCOPY" >&6; }
46161else
46162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46163$as_echo "no" >&6; }
46164fi
46165
46166
46167  test -n "$BUILD_OBJCOPY" && break
46168done
46169
46170    else
46171      # If it succeeded, then it was overridden by the user. We will use it
46172      # for the tool.
46173
46174      # First remove it from the list of overridden variables, so we can test
46175      # for unknown variables in the end.
46176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46177
46178      # Check if we try to supply an empty value
46179      if test "x$BUILD_OBJCOPY" = x; then
46180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46181$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46183$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46185$as_echo "disabled" >&6; }
46186      else
46187        # Check if the provided tool contains a complete path.
46188        tool_specified="$BUILD_OBJCOPY"
46189        tool_basename="${tool_specified##*/}"
46190        if test "x$tool_basename" = "x$tool_specified"; then
46191          # A command without a complete path is provided, search $PATH.
46192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46193$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46194          # Extract the first word of "$tool_basename", so it can be a program name with args.
46195set dummy $tool_basename; ac_word=$2
46196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46197$as_echo_n "checking for $ac_word... " >&6; }
46198if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46199  $as_echo_n "(cached) " >&6
46200else
46201  case $BUILD_OBJCOPY in
46202  [\\/]* | ?:[\\/]*)
46203  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46204  ;;
46205  *)
46206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46207for as_dir in $PATH
46208do
46209  IFS=$as_save_IFS
46210  test -z "$as_dir" && as_dir=.
46211    for ac_exec_ext in '' $ac_executable_extensions; do
46212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46213    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46215    break 2
46216  fi
46217done
46218  done
46219IFS=$as_save_IFS
46220
46221  ;;
46222esac
46223fi
46224BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46225if test -n "$BUILD_OBJCOPY"; then
46226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46227$as_echo "$BUILD_OBJCOPY" >&6; }
46228else
46229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46230$as_echo "no" >&6; }
46231fi
46232
46233
46234          if test "x$BUILD_OBJCOPY" = x; then
46235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46236          fi
46237        else
46238          # Otherwise we believe it is a complete path. Use it as it is.
46239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46240$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46242$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46243          if test ! -x "$tool_specified"; then
46244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46245$as_echo "not found" >&6; }
46246            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46247          fi
46248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46249$as_echo "$tool_specified" >&6; }
46250        fi
46251      fi
46252    fi
46253
46254  fi
46255
46256
46257
46258  # Only process if variable expands to non-empty
46259
46260  if test "x$BUILD_OBJCOPY" != x; then
46261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46262
46263  # First separate the path from the arguments. This will split at the first
46264  # space.
46265  complete="$BUILD_OBJCOPY"
46266  path="${complete%% *}"
46267  tmp="$complete EOL"
46268  arguments="${tmp#* }"
46269
46270  # Input might be given as Windows format, start by converting to
46271  # unix format.
46272  new_path=`$CYGPATH -u "$path"`
46273
46274  # Now try to locate executable using which
46275  new_path=`$WHICH "$new_path" 2> /dev/null`
46276  # bat and cmd files are not always considered executable in cygwin causing which
46277  # to not find them
46278  if test "x$new_path" = x \
46279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46281    new_path=`$CYGPATH -u "$path"`
46282  fi
46283  if test "x$new_path" = x; then
46284    # Oops. Which didn't find the executable.
46285    # The splitting of arguments from the executable at a space might have been incorrect,
46286    # since paths with space are more likely in Windows. Give it another try with the whole
46287    # argument.
46288    path="$complete"
46289    arguments="EOL"
46290    new_path=`$CYGPATH -u "$path"`
46291    new_path=`$WHICH "$new_path" 2> /dev/null`
46292    # bat and cmd files are not always considered executable in cygwin causing which
46293    # to not find them
46294    if test "x$new_path" = x \
46295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46297      new_path=`$CYGPATH -u "$path"`
46298    fi
46299    if test "x$new_path" = x; then
46300      # It's still not found. Now this is an unrecoverable error.
46301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46302$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46303      has_space=`$ECHO "$complete" | $GREP " "`
46304      if test "x$has_space" != x; then
46305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46307      fi
46308      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46309    fi
46310  fi
46311
46312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46315  # "foo.exe" is OK but "foo" is an error.
46316  #
46317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46318  # It is also a way to make sure we got the proper file name for the real test later on.
46319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46320  if test "x$test_shortpath" = x; then
46321    # Short path failed, file does not exist as specified.
46322    # Try adding .exe or .cmd
46323    if test -f "${new_path}.exe"; then
46324      input_to_shortpath="${new_path}.exe"
46325    elif test -f "${new_path}.cmd"; then
46326      input_to_shortpath="${new_path}.cmd"
46327    else
46328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46329$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46332      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46333    fi
46334  else
46335    input_to_shortpath="$new_path"
46336  fi
46337
46338  # Call helper function which possibly converts this using DOS-style short mode.
46339  # If so, the updated path is stored in $new_path.
46340  new_path="$input_to_shortpath"
46341
46342  input_path="$input_to_shortpath"
46343  # Check if we need to convert this using DOS-style short mode. If the path
46344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46345  # take no chances and rewrite it.
46346  # Note: m4 eats our [], so we need to use [ and ] instead.
46347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46348  if test "x$has_forbidden_chars" != x; then
46349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46353      # Going to short mode and back again did indeed matter. Since short mode is
46354      # case insensitive, let's make it lowercase to improve readability.
46355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46356      # Now convert it back to Unix-style (cygpath)
46357      input_path=`$CYGPATH -u "$shortmode_path"`
46358      new_path="$input_path"
46359    fi
46360  fi
46361
46362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46363  if test "x$test_cygdrive_prefix" = x; then
46364    # As a simple fix, exclude /usr/bin since it's not a real path.
46365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46367      # a path prefixed by /cygdrive for fixpath to work.
46368      new_path="$CYGWIN_ROOT_PATH$input_path"
46369    fi
46370  fi
46371
46372  # remove trailing .exe if any
46373  new_path="${new_path/%.exe/}"
46374
46375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46376
46377  # First separate the path from the arguments. This will split at the first
46378  # space.
46379  complete="$BUILD_OBJCOPY"
46380  path="${complete%% *}"
46381  tmp="$complete EOL"
46382  arguments="${tmp#* }"
46383
46384  # Input might be given as Windows format, start by converting to
46385  # unix format.
46386  new_path="$path"
46387
46388  windows_path="$new_path"
46389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46390    unix_path=`$CYGPATH -u "$windows_path"`
46391    new_path="$unix_path"
46392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46394    new_path="$unix_path"
46395  fi
46396
46397
46398  # Now try to locate executable using which
46399  new_path=`$WHICH "$new_path" 2> /dev/null`
46400
46401  if test "x$new_path" = x; then
46402    # Oops. Which didn't find the executable.
46403    # The splitting of arguments from the executable at a space might have been incorrect,
46404    # since paths with space are more likely in Windows. Give it another try with the whole
46405    # argument.
46406    path="$complete"
46407    arguments="EOL"
46408    new_path="$path"
46409
46410  windows_path="$new_path"
46411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46412    unix_path=`$CYGPATH -u "$windows_path"`
46413    new_path="$unix_path"
46414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46416    new_path="$unix_path"
46417  fi
46418
46419
46420    new_path=`$WHICH "$new_path" 2> /dev/null`
46421    # bat and cmd files are not always considered executable in MSYS causing which
46422    # to not find them
46423    if test "x$new_path" = x \
46424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46426      new_path="$path"
46427
46428  windows_path="$new_path"
46429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46430    unix_path=`$CYGPATH -u "$windows_path"`
46431    new_path="$unix_path"
46432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46434    new_path="$unix_path"
46435  fi
46436
46437    fi
46438
46439    if test "x$new_path" = x; then
46440      # It's still not found. Now this is an unrecoverable error.
46441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46442$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46443      has_space=`$ECHO "$complete" | $GREP " "`
46444      if test "x$has_space" != x; then
46445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46447      fi
46448      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46449    fi
46450  fi
46451
46452  # Now new_path has a complete unix path to the binary
46453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46454    # Keep paths in /bin as-is, but remove trailing .exe if any
46455    new_path="${new_path/%.exe/}"
46456    # Do not save /bin paths to all_fixpath_prefixes!
46457  else
46458    # Not in mixed or Windows style, start by that.
46459    new_path=`cmd //c echo $new_path`
46460
46461  input_path="$new_path"
46462  # Check if we need to convert this using DOS-style short mode. If the path
46463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46464  # take no chances and rewrite it.
46465  # Note: m4 eats our [], so we need to use [ and ] instead.
46466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46467  if test "x$has_forbidden_chars" != x; then
46468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46470  fi
46471
46472    # Output is in $new_path
46473
46474  windows_path="$new_path"
46475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46476    unix_path=`$CYGPATH -u "$windows_path"`
46477    new_path="$unix_path"
46478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46480    new_path="$unix_path"
46481  fi
46482
46483    # remove trailing .exe if any
46484    new_path="${new_path/%.exe/}"
46485
46486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46488  fi
46489
46490    else
46491      # We're on a unix platform. Hooray! :)
46492      # First separate the path from the arguments. This will split at the first
46493      # space.
46494      complete="$BUILD_OBJCOPY"
46495      path="${complete%% *}"
46496      tmp="$complete EOL"
46497      arguments="${tmp#* }"
46498
46499      # Cannot rely on the command "which" here since it doesn't always work.
46500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46501      if test -z "$is_absolute_path"; then
46502        # Path to executable is not absolute. Find it.
46503        IFS_save="$IFS"
46504        IFS=:
46505        for p in $PATH; do
46506          if test -f "$p/$path" && test -x "$p/$path"; then
46507            new_path="$p/$path"
46508            break
46509          fi
46510        done
46511        IFS="$IFS_save"
46512      else
46513        # This is an absolute path, we can use it without further modifications.
46514        new_path="$path"
46515      fi
46516
46517      if test "x$new_path" = x; then
46518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46519$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46520        has_space=`$ECHO "$complete" | $GREP " "`
46521        if test "x$has_space" != x; then
46522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46524        fi
46525        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46526      fi
46527    fi
46528
46529    # Now join together the path and the arguments once again
46530    if test "x$arguments" != xEOL; then
46531      new_complete="$new_path ${arguments% *}"
46532    else
46533      new_complete="$new_path"
46534    fi
46535
46536    if test "x$complete" != "x$new_complete"; then
46537      BUILD_OBJCOPY="$new_complete"
46538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46539$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46540    fi
46541  fi
46542
46543
46544
46545  # Publish this variable in the help.
46546
46547
46548  if [ -z "${BUILD_STRIP+x}" ]; then
46549    # The variable is not set by user, try to locate tool using the code snippet
46550    for ac_prog in strip
46551do
46552  # Extract the first word of "$ac_prog", so it can be a program name with args.
46553set dummy $ac_prog; ac_word=$2
46554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46555$as_echo_n "checking for $ac_word... " >&6; }
46556if ${ac_cv_path_BUILD_STRIP+:} false; then :
46557  $as_echo_n "(cached) " >&6
46558else
46559  case $BUILD_STRIP in
46560  [\\/]* | ?:[\\/]*)
46561  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46562  ;;
46563  *)
46564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46565for as_dir in $PATH
46566do
46567  IFS=$as_save_IFS
46568  test -z "$as_dir" && as_dir=.
46569    for ac_exec_ext in '' $ac_executable_extensions; do
46570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46571    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46573    break 2
46574  fi
46575done
46576  done
46577IFS=$as_save_IFS
46578
46579  ;;
46580esac
46581fi
46582BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46583if test -n "$BUILD_STRIP"; then
46584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46585$as_echo "$BUILD_STRIP" >&6; }
46586else
46587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46588$as_echo "no" >&6; }
46589fi
46590
46591
46592  test -n "$BUILD_STRIP" && break
46593done
46594
46595  else
46596    # The variable is set, but is it from the command line or the environment?
46597
46598    # Try to remove the string !BUILD_STRIP! from our list.
46599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46601      # If it failed, the variable was not from the command line. Ignore it,
46602      # but warn the user (except for BASH, which is always set by the calling BASH).
46603      if test "xBUILD_STRIP" != xBASH; then
46604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46605$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46606      fi
46607      # Try to locate tool using the code snippet
46608      for ac_prog in strip
46609do
46610  # Extract the first word of "$ac_prog", so it can be a program name with args.
46611set dummy $ac_prog; ac_word=$2
46612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46613$as_echo_n "checking for $ac_word... " >&6; }
46614if ${ac_cv_path_BUILD_STRIP+:} false; then :
46615  $as_echo_n "(cached) " >&6
46616else
46617  case $BUILD_STRIP in
46618  [\\/]* | ?:[\\/]*)
46619  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46620  ;;
46621  *)
46622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46623for as_dir in $PATH
46624do
46625  IFS=$as_save_IFS
46626  test -z "$as_dir" && as_dir=.
46627    for ac_exec_ext in '' $ac_executable_extensions; do
46628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46629    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46631    break 2
46632  fi
46633done
46634  done
46635IFS=$as_save_IFS
46636
46637  ;;
46638esac
46639fi
46640BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46641if test -n "$BUILD_STRIP"; then
46642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46643$as_echo "$BUILD_STRIP" >&6; }
46644else
46645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46646$as_echo "no" >&6; }
46647fi
46648
46649
46650  test -n "$BUILD_STRIP" && break
46651done
46652
46653    else
46654      # If it succeeded, then it was overridden by the user. We will use it
46655      # for the tool.
46656
46657      # First remove it from the list of overridden variables, so we can test
46658      # for unknown variables in the end.
46659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46660
46661      # Check if we try to supply an empty value
46662      if test "x$BUILD_STRIP" = x; then
46663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46664$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46666$as_echo_n "checking for BUILD_STRIP... " >&6; }
46667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46668$as_echo "disabled" >&6; }
46669      else
46670        # Check if the provided tool contains a complete path.
46671        tool_specified="$BUILD_STRIP"
46672        tool_basename="${tool_specified##*/}"
46673        if test "x$tool_basename" = "x$tool_specified"; then
46674          # A command without a complete path is provided, search $PATH.
46675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46676$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46677          # Extract the first word of "$tool_basename", so it can be a program name with args.
46678set dummy $tool_basename; ac_word=$2
46679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46680$as_echo_n "checking for $ac_word... " >&6; }
46681if ${ac_cv_path_BUILD_STRIP+:} false; then :
46682  $as_echo_n "(cached) " >&6
46683else
46684  case $BUILD_STRIP in
46685  [\\/]* | ?:[\\/]*)
46686  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46687  ;;
46688  *)
46689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46690for as_dir in $PATH
46691do
46692  IFS=$as_save_IFS
46693  test -z "$as_dir" && as_dir=.
46694    for ac_exec_ext in '' $ac_executable_extensions; do
46695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46696    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46698    break 2
46699  fi
46700done
46701  done
46702IFS=$as_save_IFS
46703
46704  ;;
46705esac
46706fi
46707BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46708if test -n "$BUILD_STRIP"; then
46709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46710$as_echo "$BUILD_STRIP" >&6; }
46711else
46712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46713$as_echo "no" >&6; }
46714fi
46715
46716
46717          if test "x$BUILD_STRIP" = x; then
46718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46719          fi
46720        else
46721          # Otherwise we believe it is a complete path. Use it as it is.
46722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46723$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46725$as_echo_n "checking for BUILD_STRIP... " >&6; }
46726          if test ! -x "$tool_specified"; then
46727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46728$as_echo "not found" >&6; }
46729            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46730          fi
46731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46732$as_echo "$tool_specified" >&6; }
46733        fi
46734      fi
46735    fi
46736
46737  fi
46738
46739
46740
46741  # Only process if variable expands to non-empty
46742
46743  if test "x$BUILD_STRIP" != x; then
46744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46745
46746  # First separate the path from the arguments. This will split at the first
46747  # space.
46748  complete="$BUILD_STRIP"
46749  path="${complete%% *}"
46750  tmp="$complete EOL"
46751  arguments="${tmp#* }"
46752
46753  # Input might be given as Windows format, start by converting to
46754  # unix format.
46755  new_path=`$CYGPATH -u "$path"`
46756
46757  # Now try to locate executable using which
46758  new_path=`$WHICH "$new_path" 2> /dev/null`
46759  # bat and cmd files are not always considered executable in cygwin causing which
46760  # to not find them
46761  if test "x$new_path" = x \
46762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46764    new_path=`$CYGPATH -u "$path"`
46765  fi
46766  if test "x$new_path" = x; then
46767    # Oops. Which didn't find the executable.
46768    # The splitting of arguments from the executable at a space might have been incorrect,
46769    # since paths with space are more likely in Windows. Give it another try with the whole
46770    # argument.
46771    path="$complete"
46772    arguments="EOL"
46773    new_path=`$CYGPATH -u "$path"`
46774    new_path=`$WHICH "$new_path" 2> /dev/null`
46775    # bat and cmd files are not always considered executable in cygwin causing which
46776    # to not find them
46777    if test "x$new_path" = x \
46778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46780      new_path=`$CYGPATH -u "$path"`
46781    fi
46782    if test "x$new_path" = x; then
46783      # It's still not found. Now this is an unrecoverable error.
46784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46785$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46786      has_space=`$ECHO "$complete" | $GREP " "`
46787      if test "x$has_space" != x; then
46788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46790      fi
46791      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46792    fi
46793  fi
46794
46795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46798  # "foo.exe" is OK but "foo" is an error.
46799  #
46800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46801  # It is also a way to make sure we got the proper file name for the real test later on.
46802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46803  if test "x$test_shortpath" = x; then
46804    # Short path failed, file does not exist as specified.
46805    # Try adding .exe or .cmd
46806    if test -f "${new_path}.exe"; then
46807      input_to_shortpath="${new_path}.exe"
46808    elif test -f "${new_path}.cmd"; then
46809      input_to_shortpath="${new_path}.cmd"
46810    else
46811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46812$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46815      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46816    fi
46817  else
46818    input_to_shortpath="$new_path"
46819  fi
46820
46821  # Call helper function which possibly converts this using DOS-style short mode.
46822  # If so, the updated path is stored in $new_path.
46823  new_path="$input_to_shortpath"
46824
46825  input_path="$input_to_shortpath"
46826  # Check if we need to convert this using DOS-style short mode. If the path
46827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46828  # take no chances and rewrite it.
46829  # Note: m4 eats our [], so we need to use [ and ] instead.
46830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46831  if test "x$has_forbidden_chars" != x; then
46832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46836      # Going to short mode and back again did indeed matter. Since short mode is
46837      # case insensitive, let's make it lowercase to improve readability.
46838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46839      # Now convert it back to Unix-style (cygpath)
46840      input_path=`$CYGPATH -u "$shortmode_path"`
46841      new_path="$input_path"
46842    fi
46843  fi
46844
46845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46846  if test "x$test_cygdrive_prefix" = x; then
46847    # As a simple fix, exclude /usr/bin since it's not a real path.
46848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46850      # a path prefixed by /cygdrive for fixpath to work.
46851      new_path="$CYGWIN_ROOT_PATH$input_path"
46852    fi
46853  fi
46854
46855  # remove trailing .exe if any
46856  new_path="${new_path/%.exe/}"
46857
46858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46859
46860  # First separate the path from the arguments. This will split at the first
46861  # space.
46862  complete="$BUILD_STRIP"
46863  path="${complete%% *}"
46864  tmp="$complete EOL"
46865  arguments="${tmp#* }"
46866
46867  # Input might be given as Windows format, start by converting to
46868  # unix format.
46869  new_path="$path"
46870
46871  windows_path="$new_path"
46872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46873    unix_path=`$CYGPATH -u "$windows_path"`
46874    new_path="$unix_path"
46875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46877    new_path="$unix_path"
46878  fi
46879
46880
46881  # Now try to locate executable using which
46882  new_path=`$WHICH "$new_path" 2> /dev/null`
46883
46884  if test "x$new_path" = x; then
46885    # Oops. Which didn't find the executable.
46886    # The splitting of arguments from the executable at a space might have been incorrect,
46887    # since paths with space are more likely in Windows. Give it another try with the whole
46888    # argument.
46889    path="$complete"
46890    arguments="EOL"
46891    new_path="$path"
46892
46893  windows_path="$new_path"
46894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46895    unix_path=`$CYGPATH -u "$windows_path"`
46896    new_path="$unix_path"
46897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46899    new_path="$unix_path"
46900  fi
46901
46902
46903    new_path=`$WHICH "$new_path" 2> /dev/null`
46904    # bat and cmd files are not always considered executable in MSYS causing which
46905    # to not find them
46906    if test "x$new_path" = x \
46907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46909      new_path="$path"
46910
46911  windows_path="$new_path"
46912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46913    unix_path=`$CYGPATH -u "$windows_path"`
46914    new_path="$unix_path"
46915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46917    new_path="$unix_path"
46918  fi
46919
46920    fi
46921
46922    if test "x$new_path" = x; then
46923      # It's still not found. Now this is an unrecoverable error.
46924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46925$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46926      has_space=`$ECHO "$complete" | $GREP " "`
46927      if test "x$has_space" != x; then
46928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46930      fi
46931      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46932    fi
46933  fi
46934
46935  # Now new_path has a complete unix path to the binary
46936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46937    # Keep paths in /bin as-is, but remove trailing .exe if any
46938    new_path="${new_path/%.exe/}"
46939    # Do not save /bin paths to all_fixpath_prefixes!
46940  else
46941    # Not in mixed or Windows style, start by that.
46942    new_path=`cmd //c echo $new_path`
46943
46944  input_path="$new_path"
46945  # Check if we need to convert this using DOS-style short mode. If the path
46946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46947  # take no chances and rewrite it.
46948  # Note: m4 eats our [], so we need to use [ and ] instead.
46949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46950  if test "x$has_forbidden_chars" != x; then
46951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46953  fi
46954
46955    # Output is in $new_path
46956
46957  windows_path="$new_path"
46958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46959    unix_path=`$CYGPATH -u "$windows_path"`
46960    new_path="$unix_path"
46961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46963    new_path="$unix_path"
46964  fi
46965
46966    # remove trailing .exe if any
46967    new_path="${new_path/%.exe/}"
46968
46969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46971  fi
46972
46973    else
46974      # We're on a unix platform. Hooray! :)
46975      # First separate the path from the arguments. This will split at the first
46976      # space.
46977      complete="$BUILD_STRIP"
46978      path="${complete%% *}"
46979      tmp="$complete EOL"
46980      arguments="${tmp#* }"
46981
46982      # Cannot rely on the command "which" here since it doesn't always work.
46983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46984      if test -z "$is_absolute_path"; then
46985        # Path to executable is not absolute. Find it.
46986        IFS_save="$IFS"
46987        IFS=:
46988        for p in $PATH; do
46989          if test -f "$p/$path" && test -x "$p/$path"; then
46990            new_path="$p/$path"
46991            break
46992          fi
46993        done
46994        IFS="$IFS_save"
46995      else
46996        # This is an absolute path, we can use it without further modifications.
46997        new_path="$path"
46998      fi
46999
47000      if test "x$new_path" = x; then
47001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47002$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47003        has_space=`$ECHO "$complete" | $GREP " "`
47004        if test "x$has_space" != x; then
47005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47007        fi
47008        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47009      fi
47010    fi
47011
47012    # Now join together the path and the arguments once again
47013    if test "x$arguments" != xEOL; then
47014      new_complete="$new_path ${arguments% *}"
47015    else
47016      new_complete="$new_path"
47017    fi
47018
47019    if test "x$complete" != "x$new_complete"; then
47020      BUILD_STRIP="$new_complete"
47021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47022$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47023    fi
47024  fi
47025
47026    # Assume the C compiler is the assembler
47027    BUILD_AS="$BUILD_CC -c"
47028    # Just like for the target compiler, use the compiler as linker
47029    BUILD_LD="$BUILD_CC"
47030    BUILD_LDCXX="$BUILD_CXX"
47031
47032    PATH="$OLDPATH"
47033
47034
47035  COMPILER=$BUILD_CC
47036  COMPILER_NAME=BuildC
47037
47038  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47039    # cc -V output typically looks like
47040    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47041    # or
47042    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47043    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47044    # Check that this is likely to be the Solaris Studio cc.
47045    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47046    if test $? -ne 0; then
47047      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47048      { $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
47049$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47050      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47051$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47052      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47053$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47054      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47055    fi
47056    # Remove usage instructions (if present), and
47057    # collapse compiler output into a single line
47058    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47059        $SED -e 's/ *[Uu]sage:.*//'`
47060    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47061        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47062  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47063    # xlc -qversion output typically looks like
47064    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47065    #     Version: 11.01.0000.0015
47066    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47067    # Check that this is likely to be the IBM XL C compiler.
47068    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47069    if test $? -ne 0; then
47070      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47071      { $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
47072$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47073      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47074$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47075      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47076$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47077      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47078    fi
47079    # Collapse compiler output into a single line
47080    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47081    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47082        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47083  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47084    # There is no specific version flag, but all output starts with a version string.
47085    # First line typically looks something like:
47086    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47087    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47088    # Check that this is likely to be Microsoft CL.EXE.
47089    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47090    if test $? -ne 0; then
47091      { $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
47092$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47093      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47094$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47095      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47096    fi
47097    # Collapse compiler output into a single line
47098    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47099    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47100        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47101  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47102    # gcc --version output typically looks like
47103    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47104    #     Copyright (C) 2013 Free Software Foundation, Inc.
47105    #     This is free software; see the source for copying conditions.  There is NO
47106    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47107    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47108    # Check that this is likely to be GCC.
47109    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47110    if test $? -ne 0; then
47111      { $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
47112$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47114$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47115      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47116    fi
47117    # Remove Copyright and legalese from version string, and
47118    # collapse into a single line
47119    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47120        $SED -e 's/ *Copyright .*//'`
47121    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47122        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47123  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47124    # clang --version output typically looks like
47125    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47126    #    clang version 3.3 (tags/RELEASE_33/final)
47127    # or
47128    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47129    #    Target: x86_64-pc-linux-gnu
47130    #    Thread model: posix
47131    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47132    # Check that this is likely to be clang
47133    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47134    if test $? -ne 0; then
47135      { $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
47136$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47137      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47138$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47139      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47140    fi
47141    # Collapse compiler output into a single line
47142    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47143    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47144        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47145  else
47146      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47147  fi
47148  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47149  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47150  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47151  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47152
47153  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47154$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47155
47156
47157  COMPILER=$BUILD_CXX
47158  COMPILER_NAME=BuildC++
47159
47160  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47161    # cc -V output typically looks like
47162    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47163    # or
47164    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47165    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47166    # Check that this is likely to be the Solaris Studio cc.
47167    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47168    if test $? -ne 0; then
47169      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47170      { $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
47171$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47172      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47173$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47174      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47175$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47176      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47177    fi
47178    # Remove usage instructions (if present), and
47179    # collapse compiler output into a single line
47180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47181        $SED -e 's/ *[Uu]sage:.*//'`
47182    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47183        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47184  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47185    # xlc -qversion output typically looks like
47186    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47187    #     Version: 11.01.0000.0015
47188    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47189    # Check that this is likely to be the IBM XL C compiler.
47190    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47191    if test $? -ne 0; then
47192      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47193      { $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
47194$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47195      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47196$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47197      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47198$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47199      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47200    fi
47201    # Collapse compiler output into a single line
47202    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47203    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47204        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47205  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47206    # There is no specific version flag, but all output starts with a version string.
47207    # First line typically looks something like:
47208    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47209    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47210    # Check that this is likely to be Microsoft CL.EXE.
47211    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47212    if test $? -ne 0; then
47213      { $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
47214$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47215      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47216$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47217      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47218    fi
47219    # Collapse compiler output into a single line
47220    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47221    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47222        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47223  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47224    # gcc --version output typically looks like
47225    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47226    #     Copyright (C) 2013 Free Software Foundation, Inc.
47227    #     This is free software; see the source for copying conditions.  There is NO
47228    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47229    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47230    # Check that this is likely to be GCC.
47231    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47232    if test $? -ne 0; then
47233      { $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
47234$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47235      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47236$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47237      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47238    fi
47239    # Remove Copyright and legalese from version string, and
47240    # collapse into a single line
47241    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47242        $SED -e 's/ *Copyright .*//'`
47243    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47244        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47245  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47246    # clang --version output typically looks like
47247    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47248    #    clang version 3.3 (tags/RELEASE_33/final)
47249    # or
47250    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47251    #    Target: x86_64-pc-linux-gnu
47252    #    Thread model: posix
47253    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47254    # Check that this is likely to be clang
47255    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47256    if test $? -ne 0; then
47257      { $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
47258$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47259      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47260$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47261      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47262    fi
47263    # Collapse compiler output into a single line
47264    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47265    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47266        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47267  else
47268      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47269  fi
47270  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47271  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47272  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47273  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47274
47275  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47276$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47277
47278
47279  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47280    { $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
47281$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47283$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47284  fi
47285
47286  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47287  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47288    { $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
47289$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;}
47290  fi
47291
47292  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47293    { $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
47294$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47295  fi
47296
47297  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47298
47299  else
47300    # If we are not cross compiling, use the normal target compilers for
47301    # building the build platform executables.
47302    BUILD_CC="$CC"
47303    BUILD_CXX="$CXX"
47304    BUILD_LD="$LD"
47305    BUILD_LDCXX="$LDCXX"
47306    BUILD_NM="$NM"
47307    BUILD_AS="$AS"
47308    BUILD_OBJCOPY="$OBJCOPY"
47309    BUILD_STRIP="$STRIP"
47310    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47311    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47312    BUILD_AR="$AR"
47313
47314
47315  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47316    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47317$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47318    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47319$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47320  fi
47321
47322  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47323  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47324    { $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
47325$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;}
47326  fi
47327
47328  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47329    { $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
47330$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47331  fi
47332
47333  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47334
47335  fi
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350  # The package path is used only on macosx?
47351  # FIXME: clean this up, and/or move it elsewhere.
47352  PACKAGE_PATH=/opt/local
47353
47354
47355  # Check for extra potential brokenness.
47356  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47357    # On Windows, double-check that we got the right compiler.
47358    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47359    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47360    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47361      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47362        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
47363      fi
47364    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47365      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47366        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47367      fi
47368    fi
47369  fi
47370
47371  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47372    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47373    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47374    # This is later checked when setting flags.
47375
47376    # "-Og" suppported for GCC 4.8 and later
47377    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425    # Execute function body
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474    # Execute function body
47475
47476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47477$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47478  supports=yes
47479
47480  saved_cflags="$CFLAGS"
47481  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47482  ac_ext=c
47483ac_cpp='$CPP $CPPFLAGS'
47484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47486ac_compiler_gnu=$ac_cv_c_compiler_gnu
47487
47488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47489/* end confdefs.h.  */
47490int i;
47491_ACEOF
47492if ac_fn_c_try_compile "$LINENO"; then :
47493
47494else
47495  supports=no
47496fi
47497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47498  ac_ext=cpp
47499ac_cpp='$CXXCPP $CPPFLAGS'
47500ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47501ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47502ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47503
47504  CFLAGS="$saved_cflags"
47505
47506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47507$as_echo "$supports" >&6; }
47508  if test "x$supports" = "xyes" ; then
47509    :
47510    C_COMP_SUPPORTS="yes"
47511  else
47512    :
47513    C_COMP_SUPPORTS="no"
47514  fi
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574    # Execute function body
47575
47576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47577$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47578  supports=yes
47579
47580  saved_cxxflags="$CXXFLAGS"
47581  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47582  ac_ext=cpp
47583ac_cpp='$CXXCPP $CPPFLAGS'
47584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47587
47588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47589/* end confdefs.h.  */
47590int i;
47591_ACEOF
47592if ac_fn_cxx_try_compile "$LINENO"; then :
47593
47594else
47595  supports=no
47596fi
47597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47598  ac_ext=cpp
47599ac_cpp='$CXXCPP $CPPFLAGS'
47600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47603
47604  CXXFLAGS="$saved_cxxflags"
47605
47606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47607$as_echo "$supports" >&6; }
47608  if test "x$supports" = "xyes" ; then
47609    :
47610    CXX_COMP_SUPPORTS="yes"
47611  else
47612    :
47613    CXX_COMP_SUPPORTS="no"
47614  fi
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47629$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47630  supports=no
47631  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47632
47633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47634$as_echo "$supports" >&6; }
47635  if test "x$supports" = "xyes" ; then
47636    :
47637    HAS_CFLAG_OPTIMIZE_DEBUG=true
47638  else
47639    :
47640    HAS_CFLAG_OPTIMIZE_DEBUG=false
47641  fi
47642
47643
47644
47645
47646
47647
47648
47649    # "-z relro" supported in GNU binutils 2.17 and later
47650    LINKER_RELRO_FLAG="-Wl,-z,relro"
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698    # Execute function body
47699
47700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47701$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47702  supports=yes
47703
47704  saved_ldflags="$LDFLAGS"
47705  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47706  ac_ext=c
47707ac_cpp='$CPP $CPPFLAGS'
47708ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47709ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47710ac_compiler_gnu=$ac_cv_c_compiler_gnu
47711
47712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47713/* end confdefs.h.  */
47714
47715int
47716main ()
47717{
47718
47719  ;
47720  return 0;
47721}
47722_ACEOF
47723if ac_fn_c_try_link "$LINENO"; then :
47724
47725else
47726  supports=no
47727fi
47728rm -f core conftest.err conftest.$ac_objext \
47729    conftest$ac_exeext conftest.$ac_ext
47730  ac_ext=cpp
47731ac_cpp='$CXXCPP $CPPFLAGS'
47732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47735
47736  LDFLAGS="$saved_ldflags"
47737
47738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47739$as_echo "$supports" >&6; }
47740  if test "x$supports" = "xyes" ; then
47741    :
47742    HAS_LINKER_RELRO=true
47743  else
47744    :
47745    HAS_LINKER_RELRO=false
47746  fi
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760    # "-z now" supported in GNU binutils 2.11 and later
47761    LINKER_NOW_FLAG="-Wl,-z,now"
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809    # Execute function body
47810
47811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47812$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47813  supports=yes
47814
47815  saved_ldflags="$LDFLAGS"
47816  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47817  ac_ext=c
47818ac_cpp='$CPP $CPPFLAGS'
47819ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47820ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47821ac_compiler_gnu=$ac_cv_c_compiler_gnu
47822
47823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47824/* end confdefs.h.  */
47825
47826int
47827main ()
47828{
47829
47830  ;
47831  return 0;
47832}
47833_ACEOF
47834if ac_fn_c_try_link "$LINENO"; then :
47835
47836else
47837  supports=no
47838fi
47839rm -f core conftest.err conftest.$ac_objext \
47840    conftest$ac_exeext conftest.$ac_ext
47841  ac_ext=cpp
47842ac_cpp='$CXXCPP $CPPFLAGS'
47843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47846
47847  LDFLAGS="$saved_ldflags"
47848
47849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47850$as_echo "$supports" >&6; }
47851  if test "x$supports" = "xyes" ; then
47852    :
47853    HAS_LINKER_NOW=true
47854  else
47855    :
47856    HAS_LINKER_NOW=false
47857  fi
47858
47859
47860
47861
47862
47863
47864
47865
47866
47867
47868
47869
47870  fi
47871
47872  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47873  # in executable.'
47874  USING_BROKEN_SUSE_LD=no
47875  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47877$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47878    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47879    $ECHO "int main() { }" > main.c
47880    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47882$as_echo "no" >&6; }
47883      USING_BROKEN_SUSE_LD=no
47884    else
47885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47886$as_echo "yes" >&6; }
47887      USING_BROKEN_SUSE_LD=yes
47888    fi
47889    $RM version-script.map main.c a.out
47890  fi
47891
47892
47893  # Setup hotspot lecagy names for toolchains
47894  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47895  if test "x$TOOLCHAIN_TYPE" = xclang; then
47896    HOTSPOT_TOOLCHAIN_TYPE=gcc
47897  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47898    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47899  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47900    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47901  fi
47902
47903
47904
47905# Setup the JTReg Regression Test Harness.
47906
47907
47908# Check whether --with-jtreg was given.
47909if test "${with_jtreg+set}" = set; then :
47910  withval=$with_jtreg;
47911else
47912  with_jtreg=no
47913fi
47914
47915
47916  if test "x$with_jtreg" = xno; then
47917    # jtreg disabled
47918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47919$as_echo_n "checking for jtreg... " >&6; }
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47921$as_echo "no" >&6; }
47922  else
47923    if test "x$with_jtreg" != xyes; then
47924      # with path specified.
47925      JT_HOME="$with_jtreg"
47926    fi
47927
47928    if test "x$JT_HOME" != x; then
47929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47930$as_echo_n "checking for jtreg... " >&6; }
47931
47932      # use JT_HOME enviroment var.
47933
47934  # Only process if variable expands to non-empty
47935
47936  if test "x$JT_HOME" != x; then
47937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47938
47939  # Input might be given as Windows format, start by converting to
47940  # unix format.
47941  path="$JT_HOME"
47942  new_path=`$CYGPATH -u "$path"`
47943
47944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47947  # "foo.exe" is OK but "foo" is an error.
47948  #
47949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47950  # It is also a way to make sure we got the proper file name for the real test later on.
47951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47952  if test "x$test_shortpath" = x; then
47953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47954$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47955    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47956  fi
47957
47958  # Call helper function which possibly converts this using DOS-style short mode.
47959  # If so, the updated path is stored in $new_path.
47960
47961  input_path="$new_path"
47962  # Check if we need to convert this using DOS-style short mode. If the path
47963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47964  # take no chances and rewrite it.
47965  # Note: m4 eats our [], so we need to use [ and ] instead.
47966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47967  if test "x$has_forbidden_chars" != x; then
47968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47972      # Going to short mode and back again did indeed matter. Since short mode is
47973      # case insensitive, let's make it lowercase to improve readability.
47974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47975      # Now convert it back to Unix-style (cygpath)
47976      input_path=`$CYGPATH -u "$shortmode_path"`
47977      new_path="$input_path"
47978    fi
47979  fi
47980
47981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47982  if test "x$test_cygdrive_prefix" = x; then
47983    # As a simple fix, exclude /usr/bin since it's not a real path.
47984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47986      # a path prefixed by /cygdrive for fixpath to work.
47987      new_path="$CYGWIN_ROOT_PATH$input_path"
47988    fi
47989  fi
47990
47991
47992  if test "x$path" != "x$new_path"; then
47993    JT_HOME="$new_path"
47994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47995$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47996  fi
47997
47998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47999
48000  path="$JT_HOME"
48001  has_colon=`$ECHO $path | $GREP ^.:`
48002  new_path="$path"
48003  if test "x$has_colon" = x; then
48004    # Not in mixed or Windows style, start by that.
48005    new_path=`cmd //c echo $path`
48006  fi
48007
48008
48009  input_path="$new_path"
48010  # Check if we need to convert this using DOS-style short mode. If the path
48011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48012  # take no chances and rewrite it.
48013  # Note: m4 eats our [], so we need to use [ and ] instead.
48014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48015  if test "x$has_forbidden_chars" != x; then
48016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48018  fi
48019
48020
48021  windows_path="$new_path"
48022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48023    unix_path=`$CYGPATH -u "$windows_path"`
48024    new_path="$unix_path"
48025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48027    new_path="$unix_path"
48028  fi
48029
48030  if test "x$path" != "x$new_path"; then
48031    JT_HOME="$new_path"
48032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48033$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48034  fi
48035
48036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48038
48039    else
48040      # We're on a unix platform. Hooray! :)
48041      path="$JT_HOME"
48042      has_space=`$ECHO "$path" | $GREP " "`
48043      if test "x$has_space" != x; then
48044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48045$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48047      fi
48048
48049      # Use eval to expand a potential ~
48050      eval path="$path"
48051      if test ! -f "$path" && test ! -d "$path"; then
48052        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48053      fi
48054
48055      if test -d "$path"; then
48056        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48057      else
48058        dir="`$DIRNAME "$path"`"
48059        base="`$BASENAME "$path"`"
48060        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48061      fi
48062    fi
48063  fi
48064
48065
48066      # jtreg win32 script works for everybody
48067      JTREGEXE="$JT_HOME/bin/jtreg"
48068
48069      if test ! -f "$JTREGEXE"; then
48070        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48071      fi
48072
48073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48074$as_echo "$JTREGEXE" >&6; }
48075    else
48076      # try to find jtreg on path
48077
48078
48079
48080  # Publish this variable in the help.
48081
48082
48083  if [ -z "${JTREGEXE+x}" ]; then
48084    # The variable is not set by user, try to locate tool using the code snippet
48085    for ac_prog in jtreg
48086do
48087  # Extract the first word of "$ac_prog", so it can be a program name with args.
48088set dummy $ac_prog; ac_word=$2
48089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48090$as_echo_n "checking for $ac_word... " >&6; }
48091if ${ac_cv_path_JTREGEXE+:} false; then :
48092  $as_echo_n "(cached) " >&6
48093else
48094  case $JTREGEXE in
48095  [\\/]* | ?:[\\/]*)
48096  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48097  ;;
48098  *)
48099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48100for as_dir in $PATH
48101do
48102  IFS=$as_save_IFS
48103  test -z "$as_dir" && as_dir=.
48104    for ac_exec_ext in '' $ac_executable_extensions; do
48105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48106    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48108    break 2
48109  fi
48110done
48111  done
48112IFS=$as_save_IFS
48113
48114  ;;
48115esac
48116fi
48117JTREGEXE=$ac_cv_path_JTREGEXE
48118if test -n "$JTREGEXE"; then
48119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48120$as_echo "$JTREGEXE" >&6; }
48121else
48122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48123$as_echo "no" >&6; }
48124fi
48125
48126
48127  test -n "$JTREGEXE" && break
48128done
48129
48130  else
48131    # The variable is set, but is it from the command line or the environment?
48132
48133    # Try to remove the string !JTREGEXE! from our list.
48134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48136      # If it failed, the variable was not from the command line. Ignore it,
48137      # but warn the user (except for BASH, which is always set by the calling BASH).
48138      if test "xJTREGEXE" != xBASH; then
48139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48140$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48141      fi
48142      # Try to locate tool using the code snippet
48143      for ac_prog in jtreg
48144do
48145  # Extract the first word of "$ac_prog", so it can be a program name with args.
48146set dummy $ac_prog; ac_word=$2
48147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48148$as_echo_n "checking for $ac_word... " >&6; }
48149if ${ac_cv_path_JTREGEXE+:} false; then :
48150  $as_echo_n "(cached) " >&6
48151else
48152  case $JTREGEXE in
48153  [\\/]* | ?:[\\/]*)
48154  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48155  ;;
48156  *)
48157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48158for as_dir in $PATH
48159do
48160  IFS=$as_save_IFS
48161  test -z "$as_dir" && as_dir=.
48162    for ac_exec_ext in '' $ac_executable_extensions; do
48163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48164    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48166    break 2
48167  fi
48168done
48169  done
48170IFS=$as_save_IFS
48171
48172  ;;
48173esac
48174fi
48175JTREGEXE=$ac_cv_path_JTREGEXE
48176if test -n "$JTREGEXE"; then
48177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48178$as_echo "$JTREGEXE" >&6; }
48179else
48180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48181$as_echo "no" >&6; }
48182fi
48183
48184
48185  test -n "$JTREGEXE" && break
48186done
48187
48188    else
48189      # If it succeeded, then it was overridden by the user. We will use it
48190      # for the tool.
48191
48192      # First remove it from the list of overridden variables, so we can test
48193      # for unknown variables in the end.
48194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48195
48196      # Check if we try to supply an empty value
48197      if test "x$JTREGEXE" = x; then
48198        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48199$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48200        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48201$as_echo_n "checking for JTREGEXE... " >&6; }
48202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48203$as_echo "disabled" >&6; }
48204      else
48205        # Check if the provided tool contains a complete path.
48206        tool_specified="$JTREGEXE"
48207        tool_basename="${tool_specified##*/}"
48208        if test "x$tool_basename" = "x$tool_specified"; then
48209          # A command without a complete path is provided, search $PATH.
48210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48211$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48212          # Extract the first word of "$tool_basename", so it can be a program name with args.
48213set dummy $tool_basename; ac_word=$2
48214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48215$as_echo_n "checking for $ac_word... " >&6; }
48216if ${ac_cv_path_JTREGEXE+:} false; then :
48217  $as_echo_n "(cached) " >&6
48218else
48219  case $JTREGEXE in
48220  [\\/]* | ?:[\\/]*)
48221  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48222  ;;
48223  *)
48224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48225for as_dir in $PATH
48226do
48227  IFS=$as_save_IFS
48228  test -z "$as_dir" && as_dir=.
48229    for ac_exec_ext in '' $ac_executable_extensions; do
48230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48231    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48233    break 2
48234  fi
48235done
48236  done
48237IFS=$as_save_IFS
48238
48239  ;;
48240esac
48241fi
48242JTREGEXE=$ac_cv_path_JTREGEXE
48243if test -n "$JTREGEXE"; then
48244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48245$as_echo "$JTREGEXE" >&6; }
48246else
48247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48248$as_echo "no" >&6; }
48249fi
48250
48251
48252          if test "x$JTREGEXE" = x; then
48253            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48254          fi
48255        else
48256          # Otherwise we believe it is a complete path. Use it as it is.
48257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48258$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48259          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48260$as_echo_n "checking for JTREGEXE... " >&6; }
48261          if test ! -x "$tool_specified"; then
48262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48263$as_echo "not found" >&6; }
48264            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48265          fi
48266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48267$as_echo "$tool_specified" >&6; }
48268        fi
48269      fi
48270    fi
48271
48272  fi
48273
48274
48275
48276  if test "x$JTREGEXE" = x; then
48277    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48278  fi
48279
48280
48281      JT_HOME="`$DIRNAME $JTREGEXE`"
48282    fi
48283  fi
48284
48285
48286
48287
48288
48289
48290  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48291  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48292  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48293  #                              commands produced by the link step (currently AIX only)
48294  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48295    COMPILER_TARGET_BITS_FLAG="-q"
48296    COMPILER_COMMAND_FILE_FLAG="-f"
48297    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48298  else
48299    COMPILER_TARGET_BITS_FLAG="-m"
48300    COMPILER_COMMAND_FILE_FLAG="@"
48301    COMPILER_BINDCMD_FILE_FLAG=""
48302
48303    # The solstudio linker does not support @-files.
48304    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48305      COMPILER_COMMAND_FILE_FLAG=
48306    fi
48307
48308    # Check if @file is supported by gcc
48309    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48310      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48311$as_echo_n "checking if @file is supported by gcc... " >&6; }
48312      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48313      $ECHO "" "--version" > command.file
48314      if $CXX @command.file 2>&5 >&5; then
48315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48316$as_echo "yes" >&6; }
48317        COMPILER_COMMAND_FILE_FLAG="@"
48318      else
48319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48320$as_echo "no" >&6; }
48321        COMPILER_COMMAND_FILE_FLAG=
48322      fi
48323      $RM command.file
48324    fi
48325  fi
48326
48327
48328
48329
48330  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48331  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48332    ARFLAGS="-r"
48333  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48334    ARFLAGS="-X64"
48335  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48336    # lib.exe is used as AR to create static libraries.
48337    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48338  else
48339    ARFLAGS=""
48340  fi
48341
48342
48343  ## Setup strip.
48344  # FIXME: should this really be per platform, or should it be per toolchain type?
48345  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48346  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48347  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48348    STRIPFLAGS="-g"
48349  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48350    STRIPFLAGS="-x"
48351  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48352    STRIPFLAGS="-S"
48353  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48354    STRIPFLAGS="-X32_64"
48355  fi
48356
48357
48358
48359  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48360    CC_OUT_OPTION=-Fo
48361    EXE_OUT_OPTION=-out:
48362    LD_OUT_OPTION=-out:
48363    AR_OUT_OPTION=-out:
48364  else
48365    # The option used to specify the target .o,.a or .so file.
48366    # When compiling, how to specify the to be created object file.
48367    CC_OUT_OPTION='-o$(SPACE)'
48368    # When linking, how to specify the to be created executable.
48369    EXE_OUT_OPTION='-o$(SPACE)'
48370    # When linking, how to specify the to be created dynamically linkable library.
48371    LD_OUT_OPTION='-o$(SPACE)'
48372    # When archiving, how to specify the to be create static archive for object files.
48373    AR_OUT_OPTION='rcs$(SPACE)'
48374  fi
48375
48376
48377
48378
48379
48380  # On Windows, we need to set RC flags.
48381  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48382    RC_FLAGS="-nologo -l0x409"
48383    JVM_RCFLAGS="-nologo"
48384    if test "x$DEBUG_LEVEL" = xrelease; then
48385      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48386      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48387    fi
48388
48389    # The version variables used to create RC_FLAGS may be overridden
48390    # in a custom configure script, or possibly the command line.
48391    # Let those variables be expanded at make time in spec.gmk.
48392    # The \$ are escaped to the shell, and the $(...) variables
48393    # are evaluated by make.
48394    RC_FLAGS="$RC_FLAGS \
48395        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48396        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48397        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48398        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48399        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48400        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48401        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48402
48403    JVM_RCFLAGS="$JVM_RCFLAGS \
48404        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48405        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48406        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48407        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48408        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48409        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48410        -D\"HS_FNAME=jvm.dll\" \
48411        -D\"HS_INTERNAL_NAME=jvm\""
48412  fi
48413
48414
48415
48416  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48417    # silence copyright notice and other headers.
48418    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48419  fi
48420
48421
48422# Now we can test some aspects on the target using configure macros.
48423
48424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48425$as_echo_n "checking for ANSI C header files... " >&6; }
48426if ${ac_cv_header_stdc+:} false; then :
48427  $as_echo_n "(cached) " >&6
48428else
48429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48430/* end confdefs.h.  */
48431#include <stdlib.h>
48432#include <stdarg.h>
48433#include <string.h>
48434#include <float.h>
48435
48436int
48437main ()
48438{
48439
48440  ;
48441  return 0;
48442}
48443_ACEOF
48444if ac_fn_cxx_try_compile "$LINENO"; then :
48445  ac_cv_header_stdc=yes
48446else
48447  ac_cv_header_stdc=no
48448fi
48449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48450
48451if test $ac_cv_header_stdc = yes; then
48452  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48454/* end confdefs.h.  */
48455#include <string.h>
48456
48457_ACEOF
48458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48459  $EGREP "memchr" >/dev/null 2>&1; then :
48460
48461else
48462  ac_cv_header_stdc=no
48463fi
48464rm -f conftest*
48465
48466fi
48467
48468if test $ac_cv_header_stdc = yes; then
48469  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48471/* end confdefs.h.  */
48472#include <stdlib.h>
48473
48474_ACEOF
48475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48476  $EGREP "free" >/dev/null 2>&1; then :
48477
48478else
48479  ac_cv_header_stdc=no
48480fi
48481rm -f conftest*
48482
48483fi
48484
48485if test $ac_cv_header_stdc = yes; then
48486  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48487  if test "$cross_compiling" = yes; then :
48488  :
48489else
48490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48491/* end confdefs.h.  */
48492#include <ctype.h>
48493#include <stdlib.h>
48494#if ((' ' & 0x0FF) == 0x020)
48495# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48496# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48497#else
48498# define ISLOWER(c) \
48499		   (('a' <= (c) && (c) <= 'i') \
48500		     || ('j' <= (c) && (c) <= 'r') \
48501		     || ('s' <= (c) && (c) <= 'z'))
48502# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48503#endif
48504
48505#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48506int
48507main ()
48508{
48509  int i;
48510  for (i = 0; i < 256; i++)
48511    if (XOR (islower (i), ISLOWER (i))
48512	|| toupper (i) != TOUPPER (i))
48513      return 2;
48514  return 0;
48515}
48516_ACEOF
48517if ac_fn_cxx_try_run "$LINENO"; then :
48518
48519else
48520  ac_cv_header_stdc=no
48521fi
48522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48523  conftest.$ac_objext conftest.beam conftest.$ac_ext
48524fi
48525
48526fi
48527fi
48528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48529$as_echo "$ac_cv_header_stdc" >&6; }
48530if test $ac_cv_header_stdc = yes; then
48531
48532$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48533
48534fi
48535
48536# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48537for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48538		  inttypes.h stdint.h unistd.h
48539do :
48540  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48541ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48542"
48543if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48544  cat >>confdefs.h <<_ACEOF
48545#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48546_ACEOF
48547
48548fi
48549
48550done
48551
48552
48553
48554  ###############################################################################
48555  #
48556  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48557  # (The JVM can use 32 or 64 bit Java pointers but that decision
48558  # is made at runtime.)
48559  #
48560
48561  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48562    # Always specify -m flag on Solaris
48563    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48564
48565  # When we add flags to the "official" CFLAGS etc, we need to
48566  # keep track of these additions in ADDED_CFLAGS etc. These
48567  # will later be checked to make sure only controlled additions
48568  # have been made to CFLAGS etc.
48569  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48571  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48572
48573  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48574  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48575  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48576
48577  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48578  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48579  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48580
48581  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48582  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48583  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48584
48585  elif test "x$COMPILE_TYPE" = xreduced; then
48586    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48587      # Specify -m if running reduced on unix platforms
48588
48589  # When we add flags to the "official" CFLAGS etc, we need to
48590  # keep track of these additions in ADDED_CFLAGS etc. These
48591  # will later be checked to make sure only controlled additions
48592  # have been made to CFLAGS etc.
48593  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48594  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48595  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48596
48597  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48598  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48599  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48600
48601  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48602  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48603  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48604
48605  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48606  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48607  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48608
48609    fi
48610  fi
48611  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48612    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48613    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48614    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48615  fi
48616
48617  # Make compilation sanity check
48618  for ac_header in stdio.h
48619do :
48620  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48621if test "x$ac_cv_header_stdio_h" = xyes; then :
48622  cat >>confdefs.h <<_ACEOF
48623#define HAVE_STDIO_H 1
48624_ACEOF
48625
48626else
48627
48628    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48629$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48630    if test "x$COMPILE_TYPE" = xreduced; then
48631
48632  # Print a helpful message on how to acquire the necessary build dependency.
48633  # reduced is the help tag: freetype, cups, alsa etc
48634  MISSING_DEPENDENCY=reduced
48635
48636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48637    cygwin_help $MISSING_DEPENDENCY
48638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48639    msys_help $MISSING_DEPENDENCY
48640  else
48641    PKGHANDLER_COMMAND=
48642
48643    case $PKGHANDLER in
48644      apt-get)
48645        apt_help     $MISSING_DEPENDENCY ;;
48646      yum)
48647        yum_help     $MISSING_DEPENDENCY ;;
48648      brew)
48649        brew_help    $MISSING_DEPENDENCY ;;
48650      port)
48651        port_help    $MISSING_DEPENDENCY ;;
48652      pkgutil)
48653        pkgutil_help $MISSING_DEPENDENCY ;;
48654      pkgadd)
48655        pkgadd_help  $MISSING_DEPENDENCY ;;
48656    esac
48657
48658    if test "x$PKGHANDLER_COMMAND" != x; then
48659      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48660    fi
48661  fi
48662
48663      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48664$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48665    elif test "x$COMPILE_TYPE" = xcross; then
48666      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48667$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48668    fi
48669    as_fn_error $? "Cannot continue." "$LINENO" 5
48670
48671fi
48672
48673done
48674
48675
48676  # The cast to long int works around a bug in the HP C Compiler
48677# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48678# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48679# This bug is HP SR number 8606223364.
48680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48681$as_echo_n "checking size of int *... " >&6; }
48682if ${ac_cv_sizeof_int_p+:} false; then :
48683  $as_echo_n "(cached) " >&6
48684else
48685  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48686
48687else
48688  if test "$ac_cv_type_int_p" = yes; then
48689     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48690$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48691as_fn_error 77 "cannot compute sizeof (int *)
48692See \`config.log' for more details" "$LINENO" 5; }
48693   else
48694     ac_cv_sizeof_int_p=0
48695   fi
48696fi
48697
48698fi
48699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48700$as_echo "$ac_cv_sizeof_int_p" >&6; }
48701
48702
48703
48704cat >>confdefs.h <<_ACEOF
48705#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48706_ACEOF
48707
48708
48709
48710  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48711  if test "x$ac_cv_sizeof_int_p" = x; then
48712    # The test failed, lets stick to the assumed value.
48713    { $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
48714$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48715  else
48716    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48717
48718    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48719      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48720      # Let's try to implicitely set the compilers target architecture and retry the test
48721      { $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
48722$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;}
48723      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48724$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48725
48726  # When we add flags to the "official" CFLAGS etc, we need to
48727  # keep track of these additions in ADDED_CFLAGS etc. These
48728  # will later be checked to make sure only controlled additions
48729  # have been made to CFLAGS etc.
48730  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48731  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48732  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48733
48734  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48735  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48736  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48737
48738  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48739  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48740  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48741
48742  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48743  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48744  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48745
48746
48747      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48748      unset ac_cv_sizeof_int_p
48749      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48750      cat >>confdefs.h <<_ACEOF
48751#undef SIZEOF_INT_P
48752_ACEOF
48753
48754      # The cast to long int works around a bug in the HP C Compiler
48755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48757# This bug is HP SR number 8606223364.
48758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48759$as_echo_n "checking size of int *... " >&6; }
48760if ${ac_cv_sizeof_int_p+:} false; then :
48761  $as_echo_n "(cached) " >&6
48762else
48763  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48764
48765else
48766  if test "$ac_cv_type_int_p" = yes; then
48767     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48769as_fn_error 77 "cannot compute sizeof (int *)
48770See \`config.log' for more details" "$LINENO" 5; }
48771   else
48772     ac_cv_sizeof_int_p=0
48773   fi
48774fi
48775
48776fi
48777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48778$as_echo "$ac_cv_sizeof_int_p" >&6; }
48779
48780
48781
48782cat >>confdefs.h <<_ACEOF
48783#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48784_ACEOF
48785
48786
48787
48788      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48789
48790      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48791        { $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
48792$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;}
48793        if test "x$COMPILE_TYPE" = xreduced; then
48794
48795  # Print a helpful message on how to acquire the necessary build dependency.
48796  # reduced is the help tag: freetype, cups, alsa etc
48797  MISSING_DEPENDENCY=reduced
48798
48799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48800    cygwin_help $MISSING_DEPENDENCY
48801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48802    msys_help $MISSING_DEPENDENCY
48803  else
48804    PKGHANDLER_COMMAND=
48805
48806    case $PKGHANDLER in
48807      apt-get)
48808        apt_help     $MISSING_DEPENDENCY ;;
48809      yum)
48810        yum_help     $MISSING_DEPENDENCY ;;
48811      brew)
48812        brew_help    $MISSING_DEPENDENCY ;;
48813      port)
48814        port_help    $MISSING_DEPENDENCY ;;
48815      pkgutil)
48816        pkgutil_help $MISSING_DEPENDENCY ;;
48817      pkgadd)
48818        pkgadd_help  $MISSING_DEPENDENCY ;;
48819    esac
48820
48821    if test "x$PKGHANDLER_COMMAND" != x; then
48822      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48823    fi
48824  fi
48825
48826          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48827$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48828        elif test "x$COMPILE_TYPE" = xcross; then
48829          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48830$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48831        fi
48832        as_fn_error $? "Cannot continue." "$LINENO" 5
48833      fi
48834    fi
48835  fi
48836
48837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48838$as_echo_n "checking for target address size... " >&6; }
48839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48840$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48841
48842
48843  ###############################################################################
48844  #
48845  # Is the target little of big endian?
48846  #
48847   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48848$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48849if ${ac_cv_c_bigendian+:} false; then :
48850  $as_echo_n "(cached) " >&6
48851else
48852  ac_cv_c_bigendian=unknown
48853    # See if we're dealing with a universal compiler.
48854    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48855/* end confdefs.h.  */
48856#ifndef __APPLE_CC__
48857	       not a universal capable compiler
48858	     #endif
48859	     typedef int dummy;
48860
48861_ACEOF
48862if ac_fn_cxx_try_compile "$LINENO"; then :
48863
48864	# Check for potential -arch flags.  It is not universal unless
48865	# there are at least two -arch flags with different values.
48866	ac_arch=
48867	ac_prev=
48868	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48869	 if test -n "$ac_prev"; then
48870	   case $ac_word in
48871	     i?86 | x86_64 | ppc | ppc64)
48872	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48873		 ac_arch=$ac_word
48874	       else
48875		 ac_cv_c_bigendian=universal
48876		 break
48877	       fi
48878	       ;;
48879	   esac
48880	   ac_prev=
48881	 elif test "x$ac_word" = "x-arch"; then
48882	   ac_prev=arch
48883	 fi
48884       done
48885fi
48886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48887    if test $ac_cv_c_bigendian = unknown; then
48888      # See if sys/param.h defines the BYTE_ORDER macro.
48889      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48890/* end confdefs.h.  */
48891#include <sys/types.h>
48892	     #include <sys/param.h>
48893
48894int
48895main ()
48896{
48897#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48898		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48899		     && LITTLE_ENDIAN)
48900	      bogus endian macros
48901	     #endif
48902
48903  ;
48904  return 0;
48905}
48906_ACEOF
48907if ac_fn_cxx_try_compile "$LINENO"; then :
48908  # It does; now see whether it defined to BIG_ENDIAN or not.
48909	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48910/* end confdefs.h.  */
48911#include <sys/types.h>
48912		#include <sys/param.h>
48913
48914int
48915main ()
48916{
48917#if BYTE_ORDER != BIG_ENDIAN
48918		 not big endian
48919		#endif
48920
48921  ;
48922  return 0;
48923}
48924_ACEOF
48925if ac_fn_cxx_try_compile "$LINENO"; then :
48926  ac_cv_c_bigendian=yes
48927else
48928  ac_cv_c_bigendian=no
48929fi
48930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48931fi
48932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48933    fi
48934    if test $ac_cv_c_bigendian = unknown; then
48935      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48936      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48937/* end confdefs.h.  */
48938#include <limits.h>
48939
48940int
48941main ()
48942{
48943#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48944	      bogus endian macros
48945	     #endif
48946
48947  ;
48948  return 0;
48949}
48950_ACEOF
48951if ac_fn_cxx_try_compile "$LINENO"; then :
48952  # It does; now see whether it defined to _BIG_ENDIAN or not.
48953	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48954/* end confdefs.h.  */
48955#include <limits.h>
48956
48957int
48958main ()
48959{
48960#ifndef _BIG_ENDIAN
48961		 not big endian
48962		#endif
48963
48964  ;
48965  return 0;
48966}
48967_ACEOF
48968if ac_fn_cxx_try_compile "$LINENO"; then :
48969  ac_cv_c_bigendian=yes
48970else
48971  ac_cv_c_bigendian=no
48972fi
48973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48974fi
48975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48976    fi
48977    if test $ac_cv_c_bigendian = unknown; then
48978      # Compile a test program.
48979      if test "$cross_compiling" = yes; then :
48980  # Try to guess by grepping values from an object file.
48981	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48982/* end confdefs.h.  */
48983short int ascii_mm[] =
48984		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48985		short int ascii_ii[] =
48986		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48987		int use_ascii (int i) {
48988		  return ascii_mm[i] + ascii_ii[i];
48989		}
48990		short int ebcdic_ii[] =
48991		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48992		short int ebcdic_mm[] =
48993		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48994		int use_ebcdic (int i) {
48995		  return ebcdic_mm[i] + ebcdic_ii[i];
48996		}
48997		extern int foo;
48998
48999int
49000main ()
49001{
49002return use_ascii (foo) == use_ebcdic (foo);
49003  ;
49004  return 0;
49005}
49006_ACEOF
49007if ac_fn_cxx_try_compile "$LINENO"; then :
49008  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49009	      ac_cv_c_bigendian=yes
49010	    fi
49011	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49012	      if test "$ac_cv_c_bigendian" = unknown; then
49013		ac_cv_c_bigendian=no
49014	      else
49015		# finding both strings is unlikely to happen, but who knows?
49016		ac_cv_c_bigendian=unknown
49017	      fi
49018	    fi
49019fi
49020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49021else
49022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49023/* end confdefs.h.  */
49024$ac_includes_default
49025int
49026main ()
49027{
49028
49029	     /* Are we little or big endian?  From Harbison&Steele.  */
49030	     union
49031	     {
49032	       long int l;
49033	       char c[sizeof (long int)];
49034	     } u;
49035	     u.l = 1;
49036	     return u.c[sizeof (long int) - 1] == 1;
49037
49038  ;
49039  return 0;
49040}
49041_ACEOF
49042if ac_fn_cxx_try_run "$LINENO"; then :
49043  ac_cv_c_bigendian=no
49044else
49045  ac_cv_c_bigendian=yes
49046fi
49047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49048  conftest.$ac_objext conftest.beam conftest.$ac_ext
49049fi
49050
49051    fi
49052fi
49053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49054$as_echo "$ac_cv_c_bigendian" >&6; }
49055 case $ac_cv_c_bigendian in #(
49056   yes)
49057     ENDIAN="big";; #(
49058   no)
49059     ENDIAN="little" ;; #(
49060   universal)
49061     ENDIAN="universal_endianness"
49062     ;; #(
49063   *)
49064     ENDIAN="unknown" ;;
49065 esac
49066
49067
49068  if test "x$ENDIAN" = xuniversal_endianness; then
49069    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49070  fi
49071  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49072    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
49073  fi
49074
49075
49076# Configure flags for the tools
49077
49078  ###############################################################################
49079  #
49080  # How to compile shared libraries.
49081  #
49082
49083  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49084    PICFLAG="-fPIC"
49085    C_FLAG_REORDER=''
49086    CXX_FLAG_REORDER=''
49087
49088    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49089      # Linking is different on MacOSX
49090      if test "x$STATIC_BUILD" = xtrue; then
49091        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49092      else
49093        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49094        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49095      fi
49096      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49097      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49098      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49099      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49100    else
49101      # Default works for linux, might work on other platforms as well.
49102      SHARED_LIBRARY_FLAGS='-shared'
49103      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49104      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49105      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49106      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49107    fi
49108  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49109    C_FLAG_REORDER=''
49110    CXX_FLAG_REORDER=''
49111
49112    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49113      # Linking is different on MacOSX
49114      PICFLAG=''
49115      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49116      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49117      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49118      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49119      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49120
49121      if test "x$STATIC_BUILD" = xfalse; then
49122        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49123      fi
49124    else
49125      # Default works for linux, might work on other platforms as well.
49126      PICFLAG='-fPIC'
49127      SHARED_LIBRARY_FLAGS='-shared'
49128      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49129      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49130      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49131
49132      # arm specific settings
49133      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49134        # '-Wl,-z,origin' isn't used on arm.
49135        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49136      else
49137        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49138      fi
49139
49140    fi
49141  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49142    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49143      PICFLAG="-xcode=pic32"
49144    else
49145      PICFLAG="-KPIC"
49146    fi
49147    C_FLAG_REORDER='-xF'
49148    CXX_FLAG_REORDER='-xF'
49149    SHARED_LIBRARY_FLAGS="-G"
49150    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49151    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49152    SET_SHARED_LIBRARY_NAME='-h $1'
49153    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49154  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49155    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49156    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49157    # will have to patch this single instruction with a call to some out-of-order code which
49158    # does the load from the TOC. This is of course slow. But in that case we also would have
49159    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49160    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49161    # can be patched directly by the linker and does not require a jump to out-of-order code.
49162    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49163    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49164    # loads for accessing a global variable). But there are rumors that this may be seen as a
49165    # 'performance feature' because of improved code locality of the symbols used in a
49166    # compilation unit.
49167    PICFLAG="-qpic"
49168    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49169    C_FLAG_REORDER=''
49170    CXX_FLAG_REORDER=''
49171    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49172    SET_EXECUTABLE_ORIGIN=""
49173    SET_SHARED_LIBRARY_ORIGIN=''
49174    SET_SHARED_LIBRARY_NAME=''
49175    SET_SHARED_LIBRARY_MAPFILE=''
49176  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49177    PICFLAG=""
49178    C_FLAG_REORDER=''
49179    CXX_FLAG_REORDER=''
49180    SHARED_LIBRARY_FLAGS="-dll"
49181    SET_EXECUTABLE_ORIGIN=''
49182    SET_SHARED_LIBRARY_ORIGIN=''
49183    SET_SHARED_LIBRARY_NAME=''
49184    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49185  fi
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195  # The (cross) compiler is now configured, we can now test capabilities
49196  # of the target platform.
49197
49198
49199
49200  ###############################################################################
49201  #
49202  # Setup the opt flags for different compilers
49203  # and different operating systems.
49204  #
49205
49206  # FIXME: this was indirectly the old default, but just inherited.
49207  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49208  #   C_FLAG_DEPS="-MMD -MF"
49209  # fi
49210
49211  # Generate make dependency files
49212  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49213    C_FLAG_DEPS="-MMD -MF"
49214  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49215    C_FLAG_DEPS="-MMD -MF"
49216  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49217    C_FLAG_DEPS="-xMMD -xMF"
49218  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49219    C_FLAG_DEPS="-qmakedep=gcc -MF"
49220  fi
49221  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49222
49223
49224
49225  # Debug symbols
49226  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49227    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49228      # reduce from default "-g2" option to save space
49229      CFLAGS_DEBUG_SYMBOLS="-g1"
49230      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49231    else
49232      CFLAGS_DEBUG_SYMBOLS="-g"
49233      CXXFLAGS_DEBUG_SYMBOLS="-g"
49234    fi
49235  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49236    CFLAGS_DEBUG_SYMBOLS="-g"
49237    CXXFLAGS_DEBUG_SYMBOLS="-g"
49238  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49239    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49240    # -g0 enables debug symbols without disabling inlining.
49241    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49242  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49243    CFLAGS_DEBUG_SYMBOLS="-g"
49244    CXXFLAGS_DEBUG_SYMBOLS="-g"
49245  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49246    CFLAGS_DEBUG_SYMBOLS="-Zi"
49247    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49248  fi
49249
49250
49251
49252  # Debug symbols for JVM_CFLAGS
49253  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49254    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49255    if test "x$DEBUG_LEVEL" = xslowdebug; then
49256      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49257    else
49258      # -g0 does not disable inlining, which -g does.
49259      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49260    fi
49261  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49262    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49263  else
49264    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49265  fi
49266
49267
49268  # bounds, memory and behavior checking options
49269  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49270    case $DEBUG_LEVEL in
49271    release )
49272      # no adjustment
49273      ;;
49274    fastdebug )
49275      # no adjustment
49276      ;;
49277    slowdebug )
49278      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49279      # get's added conditionally on whether we produce debug symbols or not.
49280      # This is most likely not really correct.
49281
49282      # Add runtime stack smashing and undefined behavior checks.
49283      # Not all versions of gcc support -fstack-protector
49284      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327    # Execute function body
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376    # Execute function body
49377
49378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49379$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49380  supports=yes
49381
49382  saved_cflags="$CFLAGS"
49383  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49384  ac_ext=c
49385ac_cpp='$CPP $CPPFLAGS'
49386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49388ac_compiler_gnu=$ac_cv_c_compiler_gnu
49389
49390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49391/* end confdefs.h.  */
49392int i;
49393_ACEOF
49394if ac_fn_c_try_compile "$LINENO"; then :
49395
49396else
49397  supports=no
49398fi
49399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49400  ac_ext=cpp
49401ac_cpp='$CXXCPP $CPPFLAGS'
49402ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49403ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49404ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49405
49406  CFLAGS="$saved_cflags"
49407
49408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49409$as_echo "$supports" >&6; }
49410  if test "x$supports" = "xyes" ; then
49411    :
49412    C_COMP_SUPPORTS="yes"
49413  else
49414    :
49415    C_COMP_SUPPORTS="no"
49416  fi
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476    # Execute function body
49477
49478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49479$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49480  supports=yes
49481
49482  saved_cxxflags="$CXXFLAGS"
49483  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49484  ac_ext=cpp
49485ac_cpp='$CXXCPP $CPPFLAGS'
49486ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49487ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49488ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49489
49490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49491/* end confdefs.h.  */
49492int i;
49493_ACEOF
49494if ac_fn_cxx_try_compile "$LINENO"; then :
49495
49496else
49497  supports=no
49498fi
49499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49500  ac_ext=cpp
49501ac_cpp='$CXXCPP $CPPFLAGS'
49502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49505
49506  CXXFLAGS="$saved_cxxflags"
49507
49508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49509$as_echo "$supports" >&6; }
49510  if test "x$supports" = "xyes" ; then
49511    :
49512    CXX_COMP_SUPPORTS="yes"
49513  else
49514    :
49515    CXX_COMP_SUPPORTS="no"
49516  fi
49517
49518
49519
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49531$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49532  supports=no
49533  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49534
49535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49536$as_echo "$supports" >&6; }
49537  if test "x$supports" = "xyes" ; then
49538    :
49539
49540  else
49541    :
49542    STACK_PROTECTOR_CFLAG=""
49543  fi
49544
49545
49546
49547
49548
49549
49550
49551      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49552      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49553      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49554        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49555      fi
49556      ;;
49557    esac
49558  fi
49559
49560  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49561    if test "x$DEBUG_LEVEL" != xrelease; then
49562      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49563        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49564      fi
49565    fi
49566  fi
49567
49568  # Optimization levels
49569  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49570    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49571
49572    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49573      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49574      C_O_FLAG_HIGHEST_JVM="-xO4"
49575      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49576      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49577      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49578      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49579      C_O_FLAG_DEBUG_JVM=""
49580      C_O_FLAG_NONE="-xregs=no%frameptr"
49581      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49582      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49583      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49584      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49585      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49586      CXX_O_FLAG_DEBUG_JVM=""
49587      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49588      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49589        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49590        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49591      fi
49592    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49593      C_O_FLAG_HIGHEST_JVM="-xO4"
49594      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49595      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49596      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49597      C_O_FLAG_DEBUG=""
49598      C_O_FLAG_DEBUG_JVM=""
49599      C_O_FLAG_NONE=""
49600      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49601      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49602      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49603      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49604      CXX_O_FLAG_DEBUG=""
49605      CXX_O_FLAG_DEBUG_JVM=""
49606      CXX_O_FLAG_NONE=""
49607    fi
49608  else
49609    # The remaining toolchains share opt flags between CC and CXX;
49610    # setup for C and duplicate afterwards.
49611    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49612      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49613        # On MacOSX we optimize for size, something
49614        # we should do for all platforms?
49615        C_O_FLAG_HIGHEST_JVM="-Os"
49616        C_O_FLAG_HIGHEST="-Os"
49617        C_O_FLAG_HI="-Os"
49618        C_O_FLAG_NORM="-Os"
49619        C_O_FLAG_SIZE="-Os"
49620      else
49621        C_O_FLAG_HIGHEST_JVM="-O3"
49622        C_O_FLAG_HIGHEST="-O3"
49623        C_O_FLAG_HI="-O3"
49624        C_O_FLAG_NORM="-O2"
49625        C_O_FLAG_SIZE="-Os"
49626      fi
49627      C_O_FLAG_DEBUG="-O0"
49628      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49629        C_O_FLAG_DEBUG_JVM=""
49630      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49631        C_O_FLAG_DEBUG_JVM="-O0"
49632      fi
49633      C_O_FLAG_NONE="-O0"
49634    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49635      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49636        # On MacOSX we optimize for size, something
49637        # we should do for all platforms?
49638        C_O_FLAG_HIGHEST_JVM="-Os"
49639        C_O_FLAG_HIGHEST="-Os"
49640        C_O_FLAG_HI="-Os"
49641        C_O_FLAG_NORM="-Os"
49642        C_O_FLAG_SIZE="-Os"
49643      else
49644        C_O_FLAG_HIGHEST_JVM="-O3"
49645        C_O_FLAG_HIGHEST="-O3"
49646        C_O_FLAG_HI="-O3"
49647        C_O_FLAG_NORM="-O2"
49648        C_O_FLAG_SIZE="-Os"
49649      fi
49650      C_O_FLAG_DEBUG="-O0"
49651      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49652        C_O_FLAG_DEBUG_JVM=""
49653      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49654        C_O_FLAG_DEBUG_JVM="-O0"
49655      fi
49656      C_O_FLAG_NONE="-O0"
49657    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49658      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49659      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49660      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49661      C_O_FLAG_NORM="-O2"
49662      C_O_FLAG_DEBUG="-qnoopt"
49663      # FIXME: Value below not verified.
49664      C_O_FLAG_DEBUG_JVM=""
49665      C_O_FLAG_NONE="-qnoopt"
49666    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49667      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49668      C_O_FLAG_HIGHEST="-O2"
49669      C_O_FLAG_HI="-O1"
49670      C_O_FLAG_NORM="-O1"
49671      C_O_FLAG_DEBUG="-Od"
49672      C_O_FLAG_DEBUG_JVM=""
49673      C_O_FLAG_NONE="-Od"
49674      C_O_FLAG_SIZE="-Os"
49675    fi
49676    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49677    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49678    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49679    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49680    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49681    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49682    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49683    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49684  fi
49685
49686  # Adjust optimization flags according to debug level.
49687  case $DEBUG_LEVEL in
49688    release )
49689      # no adjustment
49690      ;;
49691    fastdebug )
49692      # Not quite so much optimization
49693      C_O_FLAG_HI="$C_O_FLAG_NORM"
49694      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49695      ;;
49696    slowdebug )
49697      # Disable optimization
49698      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49699      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49700      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49701      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49702      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49703      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49704      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49705      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49706      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49707      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49708      ;;
49709  esac
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730# Check whether --with-abi-profile was given.
49731if test "${with_abi_profile+set}" = set; then :
49732  withval=$with_abi_profile;
49733fi
49734
49735
49736  if test "x$with_abi_profile" != x; then
49737    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49738        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49739      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49740    fi
49741
49742    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49744$as_echo_n "checking for ABI profle... " >&6; }
49745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49746$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49747
49748    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49749      ARM_FLOAT_TYPE=vfp-sflt
49750      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49751    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49752      ARM_FLOAT_TYPE=vfp-hflt
49753      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49754    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49755      ARM_FLOAT_TYPE=sflt
49756      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49757    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49758      ARM_FLOAT_TYPE=vfp-sflt
49759      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49760    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49761      ARM_FLOAT_TYPE=vfp-hflt
49762      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49763    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49764      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49765      ARM_FLOAT_TYPE=
49766      ARM_ARCH_TYPE_FLAGS=
49767    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49768      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49769      ARM_FLOAT_TYPE=
49770      ARM_ARCH_TYPE_FLAGS=
49771    else
49772      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49773    fi
49774
49775    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49776      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49777    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49778      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49779    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49780      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49781    fi
49782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49783$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49785$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49786
49787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49788$as_echo_n "checking for arch type flags... " >&6; }
49789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49790$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49791
49792    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49793    # autoconf target triplet.
49794     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49795    # Sanity check that it is a known ABI.
49796    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49797        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49798        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49799          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49800$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49801    fi
49802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49803$as_echo_n "checking for ABI property name... " >&6; }
49804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49805$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49806
49807
49808    # Pass these on to the open part of configure as if they were set using
49809    # --with-extra-c[xx]flags.
49810    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49811    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49812    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49813    # FIXME: This should not really be set using extra_cflags.
49814    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49815        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49816        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49817    fi
49818    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49819    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49820    # And pass the architecture flags to the linker as well
49821    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49822  fi
49823
49824  # When building with an abi profile, the name of that profile is appended on the
49825  # bundle platform, which is used in bundle names.
49826  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49827    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49828  fi
49829
49830
49831  # Special extras...
49832  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49833    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49834      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49835      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49836    fi
49837    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49838    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49839  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49840    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49841    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49842  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49843    CXXSTD_CXXFLAG="-std=gnu++98"
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886    # Execute function body
49887
49888  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49889$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49890  supports=yes
49891
49892  saved_cxxflags="$CXXFLAGS"
49893  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49894  ac_ext=cpp
49895ac_cpp='$CXXCPP $CPPFLAGS'
49896ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49897ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49898ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49899
49900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49901/* end confdefs.h.  */
49902int i;
49903_ACEOF
49904if ac_fn_cxx_try_compile "$LINENO"; then :
49905
49906else
49907  supports=no
49908fi
49909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49910  ac_ext=cpp
49911ac_cpp='$CXXCPP $CPPFLAGS'
49912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49915
49916  CXXFLAGS="$saved_cxxflags"
49917
49918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49919$as_echo "$supports" >&6; }
49920  if test "x$supports" = "xyes" ; then
49921    :
49922
49923  else
49924    :
49925    CXXSTD_CXXFLAG=""
49926  fi
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49940    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49941
49942  fi
49943  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49944    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49945    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49946  fi
49947
49948  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49949    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49950    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49951  fi
49952
49953  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49954  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49955  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49956
49957  ###############################################################################
49958  #
49959  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49960  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49961  #
49962
49963  # Setup compiler/platform specific flags into
49964  #    CFLAGS_JDK    - C Compiler flags
49965  #    CXXFLAGS_JDK  - C++ Compiler flags
49966  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49967  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49968    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49969    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49970    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49971    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49972      # Force compatibility with i586 on 32 bit intel platforms.
49973      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49974      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49975    fi
49976    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49977        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49978    case $OPENJDK_TARGET_CPU_ARCH in
49979      arm )
49980        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49981        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49982        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49983        ;;
49984      ppc )
49985        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49986        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49987        ;;
49988      s390 )
49989        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49990        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49991        ;;
49992      * )
49993        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49994        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49995        ;;
49996    esac
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051    # Execute function body
50052
50053  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50054  REFERENCE_VERSION=6
50055
50056  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50057    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50058  fi
50059
50060  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50061    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50062  fi
50063
50064  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50065  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50066
50067  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50068    :
50069
50070  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50071  # runs afoul of the more aggressive versions of these optimisations.
50072  # Notably, value range propagation now assumes that the this pointer of C++
50073  # member functions is non-null.
50074  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50075        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50076        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50077$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50078  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50079  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50080
50081  else
50082    :
50083
50084  fi
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50100    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50101
50102    # Restrict the debug information created by Clang to avoid
50103    # too big object files and speed the build up a little bit
50104    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50105    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50106    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50107      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50108        # Force compatibility with i586 on 32 bit intel platforms.
50109        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50110        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50111      fi
50112      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50113      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50114          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50115      case $OPENJDK_TARGET_CPU_ARCH in
50116        ppc )
50117          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50118          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50119          ;;
50120        * )
50121          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50122          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50123          ;;
50124      esac
50125    fi
50126  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50127    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50128    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50129    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50130      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50131    fi
50132
50133    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50134    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50135  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50136    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50137    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50138    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50139  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50140    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50141        -MD -Zc:wchar_t- -W3 -wd4800 \
50142        -DWIN32_LEAN_AND_MEAN \
50143        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50144        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50145        -DWIN32 -DIAL"
50146    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50147      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50148    else
50149      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50150    fi
50151    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50152    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50153    # studio.
50154    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50155      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50156      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50157      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50158    fi
50159  fi
50160
50161  ###############################################################################
50162
50163  # Adjust flags according to debug level.
50164  case $DEBUG_LEVEL in
50165    fastdebug | slowdebug )
50166      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50167      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50168      ;;
50169    release )
50170      ;;
50171    * )
50172      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50173      ;;
50174  esac
50175
50176  # Set some common defines. These works for all compilers, but assume
50177  # -D is universally accepted.
50178
50179  # Setup endianness
50180  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50181    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50182    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50183    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50184    #   Note: -Dmacro         is the same as    #define macro 1
50185    #         -Dmacro=        is the same as    #define macro
50186    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50187      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50188    else
50189      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50190    fi
50191  else
50192    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50193    # are defined in the system?
50194    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50195      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50196    else
50197      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50198    fi
50199  fi
50200
50201  # Setup target OS define. Use OS target name but in upper case.
50202  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50203  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50204
50205  # Setup target CPU
50206  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50207      $OPENJDK_TARGET_ADD_LP64 \
50208      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50209
50210  # Setup debug/release defines
50211  if test "x$DEBUG_LEVEL" = xrelease; then
50212    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50213    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50214      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50215    fi
50216  else
50217    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50218  fi
50219
50220  # Set some additional per-OS defines.
50221  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50222    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50223    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50224        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50225  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50226    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50227    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50228        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50229  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50230    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50231    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50232    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50233    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50234        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50235        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50236        -fno-omit-frame-pointer"
50237  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50238    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50239    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50240    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50241        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50242        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50243  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50244    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50245  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50246    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50247    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50248  fi
50249
50250  # Set some additional per-CPU defines.
50251  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50252    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50253  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50254    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50255  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50256    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50257      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50258      # fixes `relocation truncated to fit' error for gcc 4.1.
50259      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50260      # Use ppc64 instructions, but schedule for power5
50261      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50262    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50263      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50264    fi
50265  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50266    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50267      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50268      # Little endian machine uses ELFv2 ABI.
50269      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50270      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50271      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50272    fi
50273  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50274    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50275      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50276    fi
50277  fi
50278
50279  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50280    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50281  fi
50282
50283  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50284    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50285      # Solaris does not have _LP64=1 in the old build.
50286      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50287      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50288    fi
50289  fi
50290
50291  # Set JVM_CFLAGS warning handling
50292  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50293    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50294        -Wunused-value -Woverloaded-virtual"
50295
50296    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351    # Execute function body
50352
50353  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50354  REFERENCE_VERSION=4.8
50355
50356  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50357    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50358  fi
50359
50360  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50361    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50362  fi
50363
50364  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50365  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50366
50367  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50368    :
50369
50370            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50371            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50372
50373
50374  else
50375    :
50376
50377  fi
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392    fi
50393    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50394      # Non-zero builds have stricter warnings
50395      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50396    else
50397      if test "x$TOOLCHAIN_TYPE" = xclang; then
50398        # Some versions of llvm do not like -Wundef
50399        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50400      fi
50401    fi
50402  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50403    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50404        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50405  fi
50406
50407  # Additional macosx handling
50408  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50409    # Setting these parameters makes it an error to link to macosx APIs that are
50410    # newer than the given OS version and makes the linked binaries compatible
50411    # even if built on a newer version of the OS.
50412    # The expected format is X.Y.Z
50413    MACOSX_VERSION_MIN=10.7.0
50414
50415
50416    # The macro takes the version with no dots, ex: 1070
50417    # Let the flags variables get resolved in make for easier override on make
50418    # command line.
50419    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50420    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50421  fi
50422
50423  # Setup some hard coded includes
50424  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50425      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50426      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50427      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50428      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50429      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50430      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50431
50432  # The shared libraries are compiled using the picflag.
50433  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50434      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50435  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50436      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50437
50438  # Executable flags
50439  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50440  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50441
50442
50443
50444
50445
50446
50447  # Setup LDFLAGS et al.
50448  #
50449
50450  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50451    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50452    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50453    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50454    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50455      LDFLAGS_SAFESH="-safeseh"
50456      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50457      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50458      # NOTE: Old build added -machine. Probably not needed.
50459      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50460    else
50461      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50462    fi
50463  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50464      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50465      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50466        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50467        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50468    fi
50469  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50470    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50471    # We have previously set HAS_GNU_HASH if this is the case
50472    if test -n "$HAS_GNU_HASH"; then
50473      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50474      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50475      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50476    fi
50477      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50478        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50479    fi
50480    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50481      # And since we now know that the linker is gnu, then add -z defs, to forbid
50482      # undefined symbols in object files.
50483      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50484      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50485      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50486      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50487      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50488      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50489        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50490      fi
50491      case $DEBUG_LEVEL in
50492        release )
50493          # tell linker to optimize libraries.
50494          # Should this be supplied to the OSS linker as well?
50495          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50496          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50497          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50498          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50499            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50500          fi
50501          ;;
50502        slowdebug )
50503          # Hotspot always let the linker optimize
50504          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50505          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50506            # do relocations at load
50507            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50508            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50509            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50510          fi
50511          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50512            # mark relocations read only
50513            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50514            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50515            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50516          fi
50517          ;;
50518        fastdebug )
50519          # Hotspot always let the linker optimize
50520          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50521          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50522            # mark relocations read only
50523            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50524            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50525            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50526          fi
50527          ;;
50528        * )
50529          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50530          ;;
50531        esac
50532    fi
50533  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50534    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50535    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50536    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50537    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50538    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50539    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50540      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50541    fi
50542  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50543    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50544    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50545    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50546  fi
50547
50548  # Customize LDFLAGS for executables
50549
50550  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50551
50552  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50553    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50554      LDFLAGS_STACK_SIZE=1048576
50555    else
50556      LDFLAGS_STACK_SIZE=327680
50557    fi
50558    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50559  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50560    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50561  fi
50562
50563  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50564
50565  # Customize LDFLAGS for libs
50566  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50567
50568  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50569  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50570    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50571        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50572    JDKLIB_LIBS=""
50573  else
50574    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50575        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50576
50577    if test "xTARGET" = "xTARGET"; then
50578      # On some platforms (mac) the linker warns about non existing -L dirs.
50579      # For any of the variants server, client or minimal, the dir matches the
50580      # variant name. The "main" variant should be used for linking. For the
50581      # rest, the dir is just server.
50582      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50583          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50584        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50585            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50586      else
50587        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50588            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50589      fi
50590    elif test "xTARGET" = "xBUILD"; then
50591      # When building a buildjdk, it's always only the server variant
50592      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50593          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50594    fi
50595
50596    JDKLIB_LIBS="-ljava -ljvm"
50597    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50598      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50599    fi
50600
50601  fi
50602
50603LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50604
50605  # Set JVM_LIBS (per os)
50606  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50607    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50608  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50609    # FIXME: This hard-coded path is not really proper.
50610    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50611      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50612    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50613      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50614    fi
50615    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50616        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50617  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50618    JVM_LIBS="$JVM_LIBS -lm"
50619  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50620    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50621  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50622    JVM_LIBS="$JVM_LIBS -lm"
50623  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50624    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50625        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50626        wsock32.lib winmm.lib version.lib psapi.lib"
50627    fi
50628
50629  # Set JVM_ASFLAGS
50630  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50631    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50632      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50633    fi
50634  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50635    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50636  fi
50637
50638  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654  # Special extras...
50655  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50656    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50657      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50658      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50659    fi
50660    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50661    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50662  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50663    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50664    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50665  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50666    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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    # Execute function body
50710
50711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50712$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50713  supports=yes
50714
50715  saved_cxxflags="$CXXFLAGS"
50716  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50717  ac_ext=cpp
50718ac_cpp='$CXXCPP $CPPFLAGS'
50719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50722
50723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50724/* end confdefs.h.  */
50725int i;
50726_ACEOF
50727if ac_fn_cxx_try_compile "$LINENO"; then :
50728
50729else
50730  supports=no
50731fi
50732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50733  ac_ext=cpp
50734ac_cpp='$CXXCPP $CPPFLAGS'
50735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50738
50739  CXXFLAGS="$saved_cxxflags"
50740
50741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50742$as_echo "$supports" >&6; }
50743  if test "x$supports" = "xyes" ; then
50744    :
50745
50746  else
50747    :
50748    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50749  fi
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50763    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50764
50765  fi
50766  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50767    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50768    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50769  fi
50770
50771  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50772    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50773    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50774  fi
50775
50776  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50777  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50778  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50779
50780  ###############################################################################
50781  #
50782  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50783  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50784  #
50785
50786  # Setup compiler/platform specific flags into
50787  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50788  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50789  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50790  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50791    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50792    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50793    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50794    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50795      # Force compatibility with i586 on 32 bit intel platforms.
50796      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50797      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50798    fi
50799    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50800        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50801    case $OPENJDK_BUILD_CPU_ARCH in
50802      arm )
50803        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50804        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50805        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50806        ;;
50807      ppc )
50808        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50809        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50810        ;;
50811      s390 )
50812        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50813        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50814        ;;
50815      * )
50816        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50817        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50818        ;;
50819    esac
50820
50821
50822
50823
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842
50843
50844
50845
50846
50847
50848
50849
50850
50851
50852
50853
50854
50855
50856
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867
50868
50869
50870
50871
50872
50873
50874    # Execute function body
50875
50876  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50877  REFERENCE_VERSION=6
50878
50879  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50880    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50881  fi
50882
50883  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50884    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50885  fi
50886
50887  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50888  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50889
50890  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50891    :
50892
50893  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50894  # runs afoul of the more aggressive versions of these optimisations.
50895  # Notably, value range propagation now assumes that the this pointer of C++
50896  # member functions is non-null.
50897  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50898        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50899        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50900$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50901  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50902  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50903
50904  else
50905    :
50906
50907  fi
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50923    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50924
50925    # Restrict the debug information created by Clang to avoid
50926    # too big object files and speed the build up a little bit
50927    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50928    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50929    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50930      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50931        # Force compatibility with i586 on 32 bit intel platforms.
50932        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50933        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50934      fi
50935      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50936      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50937          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50938      case $OPENJDK_BUILD_CPU_ARCH in
50939        ppc )
50940          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50941          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50942          ;;
50943        * )
50944          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50945          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50946          ;;
50947      esac
50948    fi
50949  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50950    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50951    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50952    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50953      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50954    fi
50955
50956    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50957    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50958  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50959    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50960    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50961    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50962  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50963    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50964        -MD -Zc:wchar_t- -W3 -wd4800 \
50965        -DWIN32_LEAN_AND_MEAN \
50966        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50967        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50968        -DWIN32 -DIAL"
50969    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50970      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50971    else
50972      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50973    fi
50974    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50975    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50976    # studio.
50977    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50978      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50979      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50980      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50981    fi
50982  fi
50983
50984  ###############################################################################
50985
50986  # Adjust flags according to debug level.
50987  case $DEBUG_LEVEL in
50988    fastdebug | slowdebug )
50989      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50990      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50991      ;;
50992    release )
50993      ;;
50994    * )
50995      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50996      ;;
50997  esac
50998
50999  # Set some common defines. These works for all compilers, but assume
51000  # -D is universally accepted.
51001
51002  # Setup endianness
51003  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51004    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51005    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51006    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51007    #   Note: -Dmacro         is the same as    #define macro 1
51008    #         -Dmacro=        is the same as    #define macro
51009    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51010      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51011    else
51012      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51013    fi
51014  else
51015    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51016    # are defined in the system?
51017    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51018      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51019    else
51020      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51021    fi
51022  fi
51023
51024  # Setup target OS define. Use OS target name but in upper case.
51025  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51026  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51027
51028  # Setup target CPU
51029  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51030      $OPENJDK_BUILD_ADD_LP64 \
51031      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51032
51033  # Setup debug/release defines
51034  if test "x$DEBUG_LEVEL" = xrelease; then
51035    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51036    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51037      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51038    fi
51039  else
51040    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51041  fi
51042
51043  # Set some additional per-OS defines.
51044  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51045    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51046    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51047        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51048  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51049    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51050    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51051        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51052  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51053    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51054    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51055    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51056    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51057        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51058        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51059        -fno-omit-frame-pointer"
51060  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51061    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51062    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51063    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51064        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51065        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51066  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51067    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51068  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51069    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51070    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51071  fi
51072
51073  # Set some additional per-CPU defines.
51074  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51075    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51076  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51077    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51078  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51079    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51080      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51081      # fixes `relocation truncated to fit' error for gcc 4.1.
51082      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51083      # Use ppc64 instructions, but schedule for power5
51084      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51085    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51086      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51087    fi
51088  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51089    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51090      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51091      # Little endian machine uses ELFv2 ABI.
51092      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51093      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51094      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51095    fi
51096  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51097    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51098      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51099    fi
51100  fi
51101
51102  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51103    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51104  fi
51105
51106  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51107    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51108      # Solaris does not have _LP64=1 in the old build.
51109      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51110      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51111    fi
51112  fi
51113
51114  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51115  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51116    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51117        -Wunused-value -Woverloaded-virtual"
51118
51119    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174    # Execute function body
51175
51176  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51177  REFERENCE_VERSION=4.8
51178
51179  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51180    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51181  fi
51182
51183  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51184    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51185  fi
51186
51187  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51188  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51189
51190  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51191    :
51192
51193            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51194            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51195
51196
51197  else
51198    :
51199
51200  fi
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215    fi
51216    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51217      # Non-zero builds have stricter warnings
51218      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51219    else
51220      if test "x$TOOLCHAIN_TYPE" = xclang; then
51221        # Some versions of llvm do not like -Wundef
51222        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51223      fi
51224    fi
51225  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51226    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51227        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51228  fi
51229
51230  # Additional macosx handling
51231  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51232    # Setting these parameters makes it an error to link to macosx APIs that are
51233    # newer than the given OS version and makes the linked binaries compatible
51234    # even if built on a newer version of the OS.
51235    # The expected format is X.Y.Z
51236    MACOSX_VERSION_MIN=10.7.0
51237
51238
51239    # The macro takes the version with no dots, ex: 1070
51240    # Let the flags variables get resolved in make for easier override on make
51241    # command line.
51242    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51243    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51244  fi
51245
51246  # Setup some hard coded includes
51247  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51248      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51249      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51250      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51251      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51252      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51253      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51254
51255  # The shared libraries are compiled using the picflag.
51256  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51257      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51258  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51259      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51260
51261  # Executable flags
51262  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51263  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51264
51265
51266
51267
51268
51269
51270  # Setup LDFLAGS et al.
51271  #
51272
51273  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51274    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51275    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51276    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51277    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51278      LDFLAGS_SAFESH="-safeseh"
51279      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51280      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51281      # NOTE: Old build added -machine. Probably not needed.
51282      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51283    else
51284      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51285    fi
51286  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51287      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51288      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51289        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51290        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51291    fi
51292  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51293    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51294    # We have previously set HAS_GNU_HASH if this is the case
51295    if test -n "$HAS_GNU_HASH"; then
51296      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51297      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51298      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51299    fi
51300      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51301        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51302    fi
51303    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51304      # And since we now know that the linker is gnu, then add -z defs, to forbid
51305      # undefined symbols in object files.
51306      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51307      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51308      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51309      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51310      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51311      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51312        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51313      fi
51314      case $DEBUG_LEVEL in
51315        release )
51316          # tell linker to optimize libraries.
51317          # Should this be supplied to the OSS linker as well?
51318          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51319          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51320          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51321          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51322            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51323          fi
51324          ;;
51325        slowdebug )
51326          # Hotspot always let the linker optimize
51327          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51328          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51329            # do relocations at load
51330            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51331            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51332            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51333          fi
51334          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51335            # mark relocations read only
51336            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51337            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51338            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51339          fi
51340          ;;
51341        fastdebug )
51342          # Hotspot always let the linker optimize
51343          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51344          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51345            # mark relocations read only
51346            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51347            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51348            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51349          fi
51350          ;;
51351        * )
51352          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51353          ;;
51354        esac
51355    fi
51356  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51357    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51358    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51359    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51360    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51361    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51362    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51363      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51364    fi
51365  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51366    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51367    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51368    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51369  fi
51370
51371  # Customize LDFLAGS for executables
51372
51373  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51374
51375  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51376    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51377      LDFLAGS_STACK_SIZE=1048576
51378    else
51379      LDFLAGS_STACK_SIZE=327680
51380    fi
51381    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51382  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51383    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51384  fi
51385
51386  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51387
51388  # Customize LDFLAGS for libs
51389  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51390
51391  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51392  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51393    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51394        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51395    OPENJDK_BUILD_JDKLIB_LIBS=""
51396  else
51397    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51398        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51399
51400    if test "xBUILD" = "xTARGET"; then
51401      # On some platforms (mac) the linker warns about non existing -L dirs.
51402      # For any of the variants server, client or minimal, the dir matches the
51403      # variant name. The "main" variant should be used for linking. For the
51404      # rest, the dir is just server.
51405      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51406          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51407        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51408            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51409      else
51410        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51411            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51412      fi
51413    elif test "xBUILD" = "xBUILD"; then
51414      # When building a buildjdk, it's always only the server variant
51415      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51416          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51417    fi
51418
51419    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51420    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51421      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51422    fi
51423
51424  fi
51425
51426OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51427
51428  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51429  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51430    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51431  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51432    # FIXME: This hard-coded path is not really proper.
51433    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51434      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51435    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51436      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51437    fi
51438    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51439        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51440  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51441    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51442  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51443    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51444  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51445    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51446  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51447    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51448        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51449        wsock32.lib winmm.lib version.lib psapi.lib"
51450    fi
51451
51452  # Set OPENJDK_BUILD_JVM_ASFLAGS
51453  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51454    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51455      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51456    fi
51457  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51458    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51459  fi
51460
51461  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477  # Tests are only ever compiled for TARGET
51478  # Flags for compiling test libraries
51479  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51480  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51481
51482  # Flags for compiling test executables
51483  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51484  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51485
51486
51487
51488
51489
51490
51491  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51492  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51493
51494
51495
51496
51497
51498
51499  # Some Zero and Shark settings.
51500  # ZERO_ARCHFLAG tells the compiler which mode to build for
51501  case "${OPENJDK_TARGET_CPU}" in
51502    s390)
51503      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51504      ;;
51505    *)
51506      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51507  esac
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550    # Execute function body
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599    # Execute function body
51600
51601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51602$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51603  supports=yes
51604
51605  saved_cflags="$CFLAGS"
51606  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51607  ac_ext=c
51608ac_cpp='$CPP $CPPFLAGS'
51609ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51610ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51611ac_compiler_gnu=$ac_cv_c_compiler_gnu
51612
51613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51614/* end confdefs.h.  */
51615int i;
51616_ACEOF
51617if ac_fn_c_try_compile "$LINENO"; then :
51618
51619else
51620  supports=no
51621fi
51622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51623  ac_ext=cpp
51624ac_cpp='$CXXCPP $CPPFLAGS'
51625ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51626ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51627ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51628
51629  CFLAGS="$saved_cflags"
51630
51631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51632$as_echo "$supports" >&6; }
51633  if test "x$supports" = "xyes" ; then
51634    :
51635    C_COMP_SUPPORTS="yes"
51636  else
51637    :
51638    C_COMP_SUPPORTS="no"
51639  fi
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699    # Execute function body
51700
51701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51702$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51703  supports=yes
51704
51705  saved_cxxflags="$CXXFLAGS"
51706  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51707  ac_ext=cpp
51708ac_cpp='$CXXCPP $CPPFLAGS'
51709ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51710ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51711ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51712
51713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51714/* end confdefs.h.  */
51715int i;
51716_ACEOF
51717if ac_fn_cxx_try_compile "$LINENO"; then :
51718
51719else
51720  supports=no
51721fi
51722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51723  ac_ext=cpp
51724ac_cpp='$CXXCPP $CPPFLAGS'
51725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51728
51729  CXXFLAGS="$saved_cxxflags"
51730
51731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51732$as_echo "$supports" >&6; }
51733  if test "x$supports" = "xyes" ; then
51734    :
51735    CXX_COMP_SUPPORTS="yes"
51736  else
51737    :
51738    CXX_COMP_SUPPORTS="no"
51739  fi
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51754$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51755  supports=no
51756  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51757
51758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51759$as_echo "$supports" >&6; }
51760  if test "x$supports" = "xyes" ; then
51761    :
51762
51763  else
51764    :
51765    ZERO_ARCHFLAG=""
51766  fi
51767
51768
51769
51770
51771
51772
51773
51774
51775  # Check that the compiler supports -mX (or -qX on AIX) flags
51776  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824    # Execute function body
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873    # Execute function body
51874
51875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51876$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51877  supports=yes
51878
51879  saved_cflags="$CFLAGS"
51880  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51881  ac_ext=c
51882ac_cpp='$CPP $CPPFLAGS'
51883ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51884ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51885ac_compiler_gnu=$ac_cv_c_compiler_gnu
51886
51887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51888/* end confdefs.h.  */
51889int i;
51890_ACEOF
51891if ac_fn_c_try_compile "$LINENO"; then :
51892
51893else
51894  supports=no
51895fi
51896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51897  ac_ext=cpp
51898ac_cpp='$CXXCPP $CPPFLAGS'
51899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51902
51903  CFLAGS="$saved_cflags"
51904
51905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51906$as_echo "$supports" >&6; }
51907  if test "x$supports" = "xyes" ; then
51908    :
51909    C_COMP_SUPPORTS="yes"
51910  else
51911    :
51912    C_COMP_SUPPORTS="no"
51913  fi
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973    # Execute function body
51974
51975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51976$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51977  supports=yes
51978
51979  saved_cxxflags="$CXXFLAGS"
51980  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51981  ac_ext=cpp
51982ac_cpp='$CXXCPP $CPPFLAGS'
51983ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51984ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51985ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51986
51987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51988/* end confdefs.h.  */
51989int i;
51990_ACEOF
51991if ac_fn_cxx_try_compile "$LINENO"; then :
51992
51993else
51994  supports=no
51995fi
51996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51997  ac_ext=cpp
51998ac_cpp='$CXXCPP $CPPFLAGS'
51999ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52000ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52001ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52002
52003  CXXFLAGS="$saved_cxxflags"
52004
52005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52006$as_echo "$supports" >&6; }
52007  if test "x$supports" = "xyes" ; then
52008    :
52009    CXX_COMP_SUPPORTS="yes"
52010  else
52011    :
52012    CXX_COMP_SUPPORTS="no"
52013  fi
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52028$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52029  supports=no
52030  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52031
52032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52033$as_echo "$supports" >&6; }
52034  if test "x$supports" = "xyes" ; then
52035    :
52036    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52037  else
52038    :
52039    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52040  fi
52041
52042
52043
52044
52045
52046
52047
52048
52049  # Check whether --enable-warnings-as-errors was given.
52050if test "${enable_warnings_as_errors+set}" = set; then :
52051  enableval=$enable_warnings_as_errors;
52052fi
52053
52054
52055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52056$as_echo_n "checking if native warnings are errors... " >&6; }
52057  if test "x$enable_warnings_as_errors" = "xyes"; then
52058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52059$as_echo "yes (explicitly set)" >&6; }
52060    WARNINGS_AS_ERRORS=true
52061  elif test "x$enable_warnings_as_errors" = "xno"; then
52062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52063$as_echo "no" >&6; }
52064    WARNINGS_AS_ERRORS=false
52065  elif test "x$enable_warnings_as_errors" = "x"; then
52066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52067$as_echo "yes (default)" >&6; }
52068    WARNINGS_AS_ERRORS=true
52069  else
52070    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52071  fi
52072
52073  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52074    # Set legacy hotspot variable
52075    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52076  else
52077    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52078  fi
52079
52080
52081
52082
52083  case "${TOOLCHAIN_TYPE}" in
52084    microsoft)
52085      DISABLE_WARNING_PREFIX="-wd"
52086      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52087      ;;
52088    solstudio)
52089      DISABLE_WARNING_PREFIX="-erroff="
52090      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52091      ;;
52092    gcc)
52093      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141    # Execute function body
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190    # Execute function body
52191
52192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52193$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52194  supports=yes
52195
52196  saved_cflags="$CFLAGS"
52197  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52198  ac_ext=c
52199ac_cpp='$CPP $CPPFLAGS'
52200ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52201ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52202ac_compiler_gnu=$ac_cv_c_compiler_gnu
52203
52204  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52205/* end confdefs.h.  */
52206int i;
52207_ACEOF
52208if ac_fn_c_try_compile "$LINENO"; then :
52209
52210else
52211  supports=no
52212fi
52213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52214  ac_ext=cpp
52215ac_cpp='$CXXCPP $CPPFLAGS'
52216ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52217ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52218ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52219
52220  CFLAGS="$saved_cflags"
52221
52222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52223$as_echo "$supports" >&6; }
52224  if test "x$supports" = "xyes" ; then
52225    :
52226    C_COMP_SUPPORTS="yes"
52227  else
52228    :
52229    C_COMP_SUPPORTS="no"
52230  fi
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290    # Execute function body
52291
52292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52293$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52294  supports=yes
52295
52296  saved_cxxflags="$CXXFLAGS"
52297  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52298  ac_ext=cpp
52299ac_cpp='$CXXCPP $CPPFLAGS'
52300ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52301ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52302ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52303
52304  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52305/* end confdefs.h.  */
52306int i;
52307_ACEOF
52308if ac_fn_cxx_try_compile "$LINENO"; then :
52309
52310else
52311  supports=no
52312fi
52313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52314  ac_ext=cpp
52315ac_cpp='$CXXCPP $CPPFLAGS'
52316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52319
52320  CXXFLAGS="$saved_cxxflags"
52321
52322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52323$as_echo "$supports" >&6; }
52324  if test "x$supports" = "xyes" ; then
52325    :
52326    CXX_COMP_SUPPORTS="yes"
52327  else
52328    :
52329    CXX_COMP_SUPPORTS="no"
52330  fi
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52345$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52346  supports=no
52347  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52348
52349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52350$as_echo "$supports" >&6; }
52351  if test "x$supports" = "xyes" ; then
52352    :
52353    GCC_CAN_DISABLE_WARNINGS=true
52354  else
52355    :
52356    GCC_CAN_DISABLE_WARNINGS=false
52357
52358  fi
52359
52360
52361
52362
52363
52364
52365      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52366        DISABLE_WARNING_PREFIX="-Wno-"
52367      else
52368        DISABLE_WARNING_PREFIX=
52369      fi
52370      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52371      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52372      # CFLAGS since any target specific flags will likely not work with the
52373      # build compiler
52374      CC_OLD="$CC"
52375      CXX_OLD="$CXX"
52376      CC="$BUILD_CC"
52377      CXX="$BUILD_CXX"
52378      CFLAGS_OLD="$CFLAGS"
52379      CFLAGS=""
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427    # Execute function body
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476    # Execute function body
52477
52478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52479$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52480  supports=yes
52481
52482  saved_cflags="$CFLAGS"
52483  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52484  ac_ext=c
52485ac_cpp='$CPP $CPPFLAGS'
52486ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52487ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52488ac_compiler_gnu=$ac_cv_c_compiler_gnu
52489
52490  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52491/* end confdefs.h.  */
52492int i;
52493_ACEOF
52494if ac_fn_c_try_compile "$LINENO"; then :
52495
52496else
52497  supports=no
52498fi
52499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52500  ac_ext=cpp
52501ac_cpp='$CXXCPP $CPPFLAGS'
52502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52505
52506  CFLAGS="$saved_cflags"
52507
52508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52509$as_echo "$supports" >&6; }
52510  if test "x$supports" = "xyes" ; then
52511    :
52512    C_COMP_SUPPORTS="yes"
52513  else
52514    :
52515    C_COMP_SUPPORTS="no"
52516  fi
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
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576    # Execute function body
52577
52578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52579$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52580  supports=yes
52581
52582  saved_cxxflags="$CXXFLAGS"
52583  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52584  ac_ext=cpp
52585ac_cpp='$CXXCPP $CPPFLAGS'
52586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52589
52590  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52591/* end confdefs.h.  */
52592int i;
52593_ACEOF
52594if ac_fn_cxx_try_compile "$LINENO"; then :
52595
52596else
52597  supports=no
52598fi
52599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52600  ac_ext=cpp
52601ac_cpp='$CXXCPP $CPPFLAGS'
52602ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52603ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52604ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52605
52606  CXXFLAGS="$saved_cxxflags"
52607
52608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52609$as_echo "$supports" >&6; }
52610  if test "x$supports" = "xyes" ; then
52611    :
52612    CXX_COMP_SUPPORTS="yes"
52613  else
52614    :
52615    CXX_COMP_SUPPORTS="no"
52616  fi
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52631$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52632  supports=no
52633  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52634
52635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52636$as_echo "$supports" >&6; }
52637  if test "x$supports" = "xyes" ; then
52638    :
52639    BUILD_CC_CAN_DISABLE_WARNINGS=true
52640  else
52641    :
52642    BUILD_CC_CAN_DISABLE_WARNINGS=false
52643
52644  fi
52645
52646
52647
52648
52649
52650
52651      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52652        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52653      else
52654        BUILD_CC_DISABLE_WARNING_PREFIX=
52655      fi
52656      CC="$CC_OLD"
52657      CXX="$CXX_OLD"
52658      CFLAGS="$CFLAGS_OLD"
52659      ;;
52660    clang)
52661      DISABLE_WARNING_PREFIX="-Wno-"
52662      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52663      ;;
52664    xlc)
52665      DISABLE_WARNING_PREFIX="-qsuppress="
52666      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52667      ;;
52668  esac
52669
52670
52671
52672
52673
52674# Setup debug symbols (need objcopy from the toolchain for that)
52675
52676  #
52677  # NATIVE_DEBUG_SYMBOLS
52678  # This must be done after the toolchain is setup, since we're looking at objcopy.
52679  #
52680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52681$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52682
52683# Check whether --with-native-debug-symbols was given.
52684if test "${with_native_debug_symbols+set}" = set; then :
52685  withval=$with_native_debug_symbols;
52686        if test "x$OPENJDK_TARGET_OS" = xaix; then
52687          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52688            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52689          fi
52690        fi
52691
52692else
52693
52694        if test "x$OPENJDK_TARGET_OS" = xaix; then
52695          # AIX doesn't support 'zipped' so use 'internal' as default
52696          with_native_debug_symbols="internal"
52697        else
52698          if test "x$STATIC_BUILD" = xtrue; then
52699            with_native_debug_symbols="none"
52700          else
52701            with_native_debug_symbols="zipped"
52702          fi
52703        fi
52704
52705fi
52706
52707  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52709$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52710
52711  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52712
52713    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52714      if test "x$OBJCOPY" = x; then
52715        # enabling of enable-debug-symbols and can't find objcopy
52716        # this is an error
52717        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52718      fi
52719    fi
52720
52721    COMPILE_WITH_DEBUG_SYMBOLS=true
52722    COPY_DEBUG_SYMBOLS=true
52723    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52724  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52725    COMPILE_WITH_DEBUG_SYMBOLS=false
52726    COPY_DEBUG_SYMBOLS=false
52727    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52728  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52729    COMPILE_WITH_DEBUG_SYMBOLS=true
52730    COPY_DEBUG_SYMBOLS=false
52731    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52732  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52733
52734    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52735      if test "x$OBJCOPY" = x; then
52736        # enabling of enable-debug-symbols and can't find objcopy
52737        # this is an error
52738        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52739      fi
52740    fi
52741
52742    COMPILE_WITH_DEBUG_SYMBOLS=true
52743    COPY_DEBUG_SYMBOLS=true
52744    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52745  else
52746    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52747  fi
52748
52749  # --enable-debug-symbols is deprecated.
52750  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52751
52752  # Check whether --enable-debug-symbols was given.
52753if test "${enable_debug_symbols+set}" = set; then :
52754  enableval=$enable_debug_symbols;
52755fi
52756
52757  if test "x$enable_debug_symbols" != x; then
52758    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52759$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52760
52761    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52762      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52763$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52764    fi
52765
52766  fi
52767
52768
52769  # --enable-zip-debug-info is deprecated.
52770  # Please use --with-native-debug-symbols=zipped .
52771
52772  # Check whether --enable-zip-debug-info was given.
52773if test "${enable_zip_debug_info+set}" = set; then :
52774  enableval=$enable_zip_debug_info;
52775fi
52776
52777  if test "x$enable_zip_debug_info" != x; then
52778    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52779$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52780
52781    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52782      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52783$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52784    fi
52785
52786  fi
52787
52788
52789
52790
52791
52792
52793
52794  # Check whether --enable-native-coverage was given.
52795if test "${enable_native_coverage+set}" = set; then :
52796  enableval=$enable_native_coverage;
52797fi
52798
52799  GCOV_ENABLED="false"
52800  if test "x$enable_native_coverage" = "xyes"; then
52801    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52803$as_echo_n "checking if native coverage is enabled... " >&6; }
52804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52805$as_echo "yes" >&6; }
52806      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52807      GCOV_LDFLAGS="-fprofile-arcs"
52808      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52809      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52810      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52811      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52812      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52813      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52814      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52815      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52816      GCOV_ENABLED="true"
52817    else
52818      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52819    fi
52820  elif test "x$enable_native_coverage" = "xno"; then
52821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52822$as_echo_n "checking if native coverage is enabled... " >&6; }
52823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52824$as_echo "no" >&6; }
52825  elif test "x$enable_native_coverage" != "x"; then
52826    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52827  fi
52828
52829
52830
52831
52832# Need toolchain to setup dtrace
52833
52834  # Test for dtrace dependencies
52835  # Check whether --enable-dtrace was given.
52836if test "${enable_dtrace+set}" = set; then :
52837  enableval=$enable_dtrace;
52838fi
52839
52840
52841  DTRACE_DEP_MISSING=false
52842
52843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52844$as_echo_n "checking for dtrace tool... " >&6; }
52845  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52847$as_echo "$DTRACE" >&6; }
52848  else
52849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52850$as_echo "not found, cannot build dtrace" >&6; }
52851    DTRACE_DEP_MISSING=true
52852  fi
52853
52854  for ac_header in sys/sdt.h
52855do :
52856  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52857if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52858  cat >>confdefs.h <<_ACEOF
52859#define HAVE_SYS_SDT_H 1
52860_ACEOF
52861 DTRACE_HEADERS_OK=yes
52862else
52863  DTRACE_HEADERS_OK=no
52864fi
52865
52866done
52867
52868  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52869    DTRACE_DEP_MISSING=true
52870  fi
52871
52872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52873$as_echo_n "checking if dtrace should be built... " >&6; }
52874  if test "x$enable_dtrace" = "xyes"; then
52875    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52877$as_echo "no, missing dependencies" >&6; }
52878
52879  # Print a helpful message on how to acquire the necessary build dependency.
52880  # dtrace is the help tag: freetype, cups, alsa etc
52881  MISSING_DEPENDENCY=dtrace
52882
52883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52884    cygwin_help $MISSING_DEPENDENCY
52885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52886    msys_help $MISSING_DEPENDENCY
52887  else
52888    PKGHANDLER_COMMAND=
52889
52890    case $PKGHANDLER in
52891      apt-get)
52892        apt_help     $MISSING_DEPENDENCY ;;
52893      yum)
52894        yum_help     $MISSING_DEPENDENCY ;;
52895      brew)
52896        brew_help    $MISSING_DEPENDENCY ;;
52897      port)
52898        port_help    $MISSING_DEPENDENCY ;;
52899      pkgutil)
52900        pkgutil_help $MISSING_DEPENDENCY ;;
52901      pkgadd)
52902        pkgadd_help  $MISSING_DEPENDENCY ;;
52903    esac
52904
52905    if test "x$PKGHANDLER_COMMAND" != x; then
52906      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52907    fi
52908  fi
52909
52910      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52911    else
52912      INCLUDE_DTRACE=true
52913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52914$as_echo "yes, forced" >&6; }
52915    fi
52916  elif test "x$enable_dtrace" = "xno"; then
52917    INCLUDE_DTRACE=false
52918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52919$as_echo "no, forced" >&6; }
52920  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52921    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52922      INCLUDE_DTRACE=false
52923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52924$as_echo "no, missing dependencies" >&6; }
52925    else
52926      INCLUDE_DTRACE=true
52927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52928$as_echo "yes, dependencies present" >&6; }
52929    fi
52930  else
52931    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52932  fi
52933
52934
52935
52936  # Check whether --enable-aot was given.
52937if test "${enable_aot+set}" = set; then :
52938  enableval=$enable_aot;
52939fi
52940
52941
52942  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52943    ENABLE_AOT="true"
52944  elif test "x$enable_aot" = "xyes"; then
52945    ENABLE_AOT="true"
52946  elif test "x$enable_aot" = "xno"; then
52947    ENABLE_AOT="false"
52948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52949$as_echo_n "checking if aot should be enabled... " >&6; }
52950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52951$as_echo "no, forced" >&6; }
52952  else
52953    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52954  fi
52955
52956  if test "x$ENABLE_AOT" = "xtrue"; then
52957    # Only enable AOT on linux-X64.
52958    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52959      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52960        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52961          ENABLE_AOT="true"
52962        else
52963          ENABLE_AOT="false"
52964          if test "x$enable_aot" = "xyes"; then
52965            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52966          fi
52967        fi
52968      else
52969        ENABLE_AOT="false"
52970        if test "x$enable_aot" = "xyes"; then
52971          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52972        fi
52973      fi
52974    else
52975      ENABLE_AOT="false"
52976      if test "x$enable_aot" = "xyes"; then
52977        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52978      fi
52979    fi
52980  fi
52981
52982
52983
52984
52985  # Check whether --enable-hotspot-gtest was given.
52986if test "${enable_hotspot_gtest+set}" = set; then :
52987  enableval=$enable_hotspot_gtest;
52988fi
52989
52990
52991  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52992    GTEST_DIR_EXISTS="true"
52993  else
52994    GTEST_DIR_EXISTS="false"
52995  fi
52996
52997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52998$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52999  if test "x$enable_hotspot_gtest" = "xyes"; then
53000    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53002$as_echo "yes, forced" >&6; }
53003      BUILD_GTEST="true"
53004    else
53005      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53006    fi
53007  elif test "x$enable_hotspot_gtest" = "xno"; then
53008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53009$as_echo "no, forced" >&6; }
53010    BUILD_GTEST="false"
53011  elif test "x$enable_hotspot_gtest" = "x"; then
53012    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53014$as_echo "yes" >&6; }
53015      BUILD_GTEST="true"
53016    else
53017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53018$as_echo "no" >&6; }
53019      BUILD_GTEST="false"
53020    fi
53021  else
53022    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53023  fi
53024
53025
53026
53027
53028###############################################################################
53029#
53030# Check dependencies for external and internal libraries.
53031#
53032###############################################################################
53033
53034# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53035
53036  # When using cygwin or msys, we need a wrapper binary that renames
53037  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53038  # @files and rewrites these too! This wrapper binary is
53039  # called fixpath.
53040  FIXPATH=
53041  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53043$as_echo_n "checking if fixpath can be created... " >&6; }
53044    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53045    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53046    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53047    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53048      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53049      FIXPATH="$FIXPATH_BIN -c"
53050    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53051      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53052      # @ was chosen as separator to minimize risk of other tools messing around with it
53053      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53054          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53055      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53056      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53057    fi
53058    FIXPATH_SRC_W="$FIXPATH_SRC"
53059    FIXPATH_BIN_W="$FIXPATH_BIN"
53060
53061  unix_path="$FIXPATH_SRC_W"
53062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53063    windows_path=`$CYGPATH -m "$unix_path"`
53064    FIXPATH_SRC_W="$windows_path"
53065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53066    windows_path=`cmd //c echo $unix_path`
53067    FIXPATH_SRC_W="$windows_path"
53068  fi
53069
53070
53071  unix_path="$FIXPATH_BIN_W"
53072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53073    windows_path=`$CYGPATH -m "$unix_path"`
53074    FIXPATH_BIN_W="$windows_path"
53075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53076    windows_path=`cmd //c echo $unix_path`
53077    FIXPATH_BIN_W="$windows_path"
53078  fi
53079
53080    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53081    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53082    cd $FIXPATH_DIR
53083    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53084    cd $CURDIR
53085
53086    if test ! -x $FIXPATH_BIN; then
53087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53088$as_echo "no" >&6; }
53089      cat $FIXPATH_DIR/fixpath1.log
53090      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53091    fi
53092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53093$as_echo "yes" >&6; }
53094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53095$as_echo_n "checking if fixpath.exe works... " >&6; }
53096    cd $FIXPATH_DIR
53097    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53098        > $FIXPATH_DIR/fixpath2.log 2>&1
53099    cd $CURDIR
53100    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53102$as_echo "no" >&6; }
53103      cat $FIXPATH_DIR/fixpath2.log
53104      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53105    fi
53106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53107$as_echo "yes" >&6; }
53108
53109    FIXPATH_DETACH_FLAG="--detach"
53110  fi
53111
53112
53113
53114
53115
53116
53117  # Check if X11 is needed
53118  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53119    # No X11 support on windows or macosx
53120    NEEDS_LIB_X11=false
53121  else
53122    # All other instances need X11, even if building headless only, libawt still
53123    # needs X11 headers.
53124    NEEDS_LIB_X11=true
53125  fi
53126
53127  # Check if cups is needed
53128  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53129    # Windows have a separate print system
53130    NEEDS_LIB_CUPS=false
53131  else
53132    NEEDS_LIB_CUPS=true
53133  fi
53134
53135  # A custom hook may have set this already
53136  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53137    NEEDS_LIB_FREETYPE=true
53138  fi
53139
53140  # Check if alsa is needed
53141  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53142    NEEDS_LIB_ALSA=true
53143  else
53144    NEEDS_LIB_ALSA=false
53145  fi
53146
53147  # Check if ffi is needed
53148  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53149    NEEDS_LIB_FFI=true
53150  else
53151    NEEDS_LIB_FFI=false
53152  fi
53153
53154
53155  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53156  # dynamic build is configured on command line.
53157
53158# Check whether --with-stdc++lib was given.
53159if test "${with_stdc__lib+set}" = set; then :
53160  withval=$with_stdc__lib;
53161        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53162                && test "x$with_stdc__lib" != xdefault; then
53163          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53164        fi
53165
53166else
53167  with_stdc__lib=default
53168
53169fi
53170
53171
53172  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53173    # Test if stdc++ can be linked statically.
53174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53175$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53176    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53177    ac_ext=cpp
53178ac_cpp='$CXXCPP $CPPFLAGS'
53179ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53180ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53181ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53182
53183    OLD_LIBS="$LIBS"
53184    LIBS="$STATIC_STDCXX_FLAGS"
53185    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53186/* end confdefs.h.  */
53187
53188int
53189main ()
53190{
53191return 0;
53192  ;
53193  return 0;
53194}
53195_ACEOF
53196if ac_fn_cxx_try_link "$LINENO"; then :
53197  has_static_libstdcxx=yes
53198else
53199  has_static_libstdcxx=no
53200fi
53201rm -f core conftest.err conftest.$ac_objext \
53202    conftest$ac_exeext conftest.$ac_ext
53203    LIBS="$OLD_LIBS"
53204    ac_ext=cpp
53205ac_cpp='$CXXCPP $CPPFLAGS'
53206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53209
53210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53211$as_echo "$has_static_libstdcxx" >&6; }
53212
53213    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53214      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53215    fi
53216
53217    # If dynamic was requested, it's available since it would fail above otherwise.
53218    # If dynamic wasn't requested, go with static unless it isn't available.
53219    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53220$as_echo_n "checking how to link with libstdc++... " >&6; }
53221    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53222        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53224$as_echo "dynamic" >&6; }
53225    else
53226      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53227      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53228      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53229      # just use the same setting as for the TARGET toolchain.
53230      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53232$as_echo "static" >&6; }
53233    fi
53234  fi
53235
53236  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53237  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53238    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53239  fi
53240
53241
53242
53243  # Setup Windows runtime dlls
53244  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53245
53246
53247# Check whether --with-msvcr-dll was given.
53248if test "${with_msvcr_dll+set}" = set; then :
53249  withval=$with_msvcr_dll;
53250fi
53251
53252
53253  if test "x$with_msvcr_dll" != x; then
53254    # If given explicitly by user, do not probe. If not present, fail directly.
53255
53256  DLL_NAME="$MSVCR_NAME"
53257  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53258  METHOD="--with-msvcr-dll"
53259  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53260    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53261$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53262
53263    # Need to check if the found msvcr is correct architecture
53264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53265$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53266    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53268      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53269      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53270      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53271        CORRECT_MSVCR_ARCH="PE32 executable"
53272      else
53273        CORRECT_MSVCR_ARCH="PE32+ executable"
53274      fi
53275    else
53276      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53277        CORRECT_MSVCR_ARCH=386
53278      else
53279        CORRECT_MSVCR_ARCH=x86-64
53280      fi
53281    fi
53282    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53284$as_echo "ok" >&6; }
53285      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53286
53287  # Only process if variable expands to non-empty
53288
53289  if test "x$MSVC_DLL" != x; then
53290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53291
53292  # Input might be given as Windows format, start by converting to
53293  # unix format.
53294  path="$MSVC_DLL"
53295  new_path=`$CYGPATH -u "$path"`
53296
53297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53300  # "foo.exe" is OK but "foo" is an error.
53301  #
53302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53303  # It is also a way to make sure we got the proper file name for the real test later on.
53304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53305  if test "x$test_shortpath" = x; then
53306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53307$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53308    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53309  fi
53310
53311  # Call helper function which possibly converts this using DOS-style short mode.
53312  # If so, the updated path is stored in $new_path.
53313
53314  input_path="$new_path"
53315  # Check if we need to convert this using DOS-style short mode. If the path
53316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53317  # take no chances and rewrite it.
53318  # Note: m4 eats our [], so we need to use [ and ] instead.
53319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53320  if test "x$has_forbidden_chars" != x; then
53321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53325      # Going to short mode and back again did indeed matter. Since short mode is
53326      # case insensitive, let's make it lowercase to improve readability.
53327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53328      # Now convert it back to Unix-style (cygpath)
53329      input_path=`$CYGPATH -u "$shortmode_path"`
53330      new_path="$input_path"
53331    fi
53332  fi
53333
53334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53335  if test "x$test_cygdrive_prefix" = x; then
53336    # As a simple fix, exclude /usr/bin since it's not a real path.
53337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53339      # a path prefixed by /cygdrive for fixpath to work.
53340      new_path="$CYGWIN_ROOT_PATH$input_path"
53341    fi
53342  fi
53343
53344
53345  if test "x$path" != "x$new_path"; then
53346    MSVC_DLL="$new_path"
53347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53348$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53349  fi
53350
53351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53352
53353  path="$MSVC_DLL"
53354  has_colon=`$ECHO $path | $GREP ^.:`
53355  new_path="$path"
53356  if test "x$has_colon" = x; then
53357    # Not in mixed or Windows style, start by that.
53358    new_path=`cmd //c echo $path`
53359  fi
53360
53361
53362  input_path="$new_path"
53363  # Check if we need to convert this using DOS-style short mode. If the path
53364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53365  # take no chances and rewrite it.
53366  # Note: m4 eats our [], so we need to use [ and ] instead.
53367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53368  if test "x$has_forbidden_chars" != x; then
53369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53371  fi
53372
53373
53374  windows_path="$new_path"
53375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53376    unix_path=`$CYGPATH -u "$windows_path"`
53377    new_path="$unix_path"
53378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53380    new_path="$unix_path"
53381  fi
53382
53383  if test "x$path" != "x$new_path"; then
53384    MSVC_DLL="$new_path"
53385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53387  fi
53388
53389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53391
53392    else
53393      # We're on a unix platform. Hooray! :)
53394      path="$MSVC_DLL"
53395      has_space=`$ECHO "$path" | $GREP " "`
53396      if test "x$has_space" != x; then
53397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53398$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53400      fi
53401
53402      # Use eval to expand a potential ~
53403      eval path="$path"
53404      if test ! -f "$path" && test ! -d "$path"; then
53405        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53406      fi
53407
53408      if test -d "$path"; then
53409        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53410      else
53411        dir="`$DIRNAME "$path"`"
53412        base="`$BASENAME "$path"`"
53413        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53414      fi
53415    fi
53416  fi
53417
53418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53419$as_echo_n "checking for $DLL_NAME... " >&6; }
53420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53421$as_echo "$MSVC_DLL" >&6; }
53422    else
53423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53424$as_echo "incorrect, ignoring" >&6; }
53425      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53426$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53427    fi
53428  fi
53429
53430    if test "x$MSVC_DLL" = x; then
53431      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53432    fi
53433    MSVCR_DLL="$MSVC_DLL"
53434  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53435
53436  DLL_NAME="$MSVCR_NAME"
53437  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53438  METHOD="devkit"
53439  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53440    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53441$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53442
53443    # Need to check if the found msvcr is correct architecture
53444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53445$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53446    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53448      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53449      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53450      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53451        CORRECT_MSVCR_ARCH="PE32 executable"
53452      else
53453        CORRECT_MSVCR_ARCH="PE32+ executable"
53454      fi
53455    else
53456      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53457        CORRECT_MSVCR_ARCH=386
53458      else
53459        CORRECT_MSVCR_ARCH=x86-64
53460      fi
53461    fi
53462    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53464$as_echo "ok" >&6; }
53465      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53466
53467  # Only process if variable expands to non-empty
53468
53469  if test "x$MSVC_DLL" != x; then
53470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53471
53472  # Input might be given as Windows format, start by converting to
53473  # unix format.
53474  path="$MSVC_DLL"
53475  new_path=`$CYGPATH -u "$path"`
53476
53477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53480  # "foo.exe" is OK but "foo" is an error.
53481  #
53482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53483  # It is also a way to make sure we got the proper file name for the real test later on.
53484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53485  if test "x$test_shortpath" = x; then
53486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53487$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53488    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53489  fi
53490
53491  # Call helper function which possibly converts this using DOS-style short mode.
53492  # If so, the updated path is stored in $new_path.
53493
53494  input_path="$new_path"
53495  # Check if we need to convert this using DOS-style short mode. If the path
53496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53497  # take no chances and rewrite it.
53498  # Note: m4 eats our [], so we need to use [ and ] instead.
53499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53500  if test "x$has_forbidden_chars" != x; then
53501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53505      # Going to short mode and back again did indeed matter. Since short mode is
53506      # case insensitive, let's make it lowercase to improve readability.
53507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53508      # Now convert it back to Unix-style (cygpath)
53509      input_path=`$CYGPATH -u "$shortmode_path"`
53510      new_path="$input_path"
53511    fi
53512  fi
53513
53514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53515  if test "x$test_cygdrive_prefix" = x; then
53516    # As a simple fix, exclude /usr/bin since it's not a real path.
53517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53519      # a path prefixed by /cygdrive for fixpath to work.
53520      new_path="$CYGWIN_ROOT_PATH$input_path"
53521    fi
53522  fi
53523
53524
53525  if test "x$path" != "x$new_path"; then
53526    MSVC_DLL="$new_path"
53527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53529  fi
53530
53531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53532
53533  path="$MSVC_DLL"
53534  has_colon=`$ECHO $path | $GREP ^.:`
53535  new_path="$path"
53536  if test "x$has_colon" = x; then
53537    # Not in mixed or Windows style, start by that.
53538    new_path=`cmd //c echo $path`
53539  fi
53540
53541
53542  input_path="$new_path"
53543  # Check if we need to convert this using DOS-style short mode. If the path
53544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53545  # take no chances and rewrite it.
53546  # Note: m4 eats our [], so we need to use [ and ] instead.
53547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53548  if test "x$has_forbidden_chars" != x; then
53549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53551  fi
53552
53553
53554  windows_path="$new_path"
53555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53556    unix_path=`$CYGPATH -u "$windows_path"`
53557    new_path="$unix_path"
53558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53560    new_path="$unix_path"
53561  fi
53562
53563  if test "x$path" != "x$new_path"; then
53564    MSVC_DLL="$new_path"
53565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53567  fi
53568
53569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53571
53572    else
53573      # We're on a unix platform. Hooray! :)
53574      path="$MSVC_DLL"
53575      has_space=`$ECHO "$path" | $GREP " "`
53576      if test "x$has_space" != x; then
53577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53580      fi
53581
53582      # Use eval to expand a potential ~
53583      eval path="$path"
53584      if test ! -f "$path" && test ! -d "$path"; then
53585        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53586      fi
53587
53588      if test -d "$path"; then
53589        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53590      else
53591        dir="`$DIRNAME "$path"`"
53592        base="`$BASENAME "$path"`"
53593        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53594      fi
53595    fi
53596  fi
53597
53598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53599$as_echo_n "checking for $DLL_NAME... " >&6; }
53600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53601$as_echo "$MSVC_DLL" >&6; }
53602    else
53603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53604$as_echo "incorrect, ignoring" >&6; }
53605      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53606$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53607    fi
53608  fi
53609
53610    if test "x$MSVC_DLL" = x; then
53611      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53612    fi
53613    MSVCR_DLL="$MSVC_DLL"
53614  else
53615
53616  DLL_NAME="${MSVCR_NAME}"
53617  MSVC_DLL=
53618
53619  if test "x$MSVC_DLL" = x; then
53620    # Probe: Using well-known location from Visual Studio 10.0
53621    if test "x$VCINSTALLDIR" != x; then
53622      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53623
53624  windows_path="$CYGWIN_VC_INSTALL_DIR"
53625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53626    unix_path=`$CYGPATH -u "$windows_path"`
53627    CYGWIN_VC_INSTALL_DIR="$unix_path"
53628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53630    CYGWIN_VC_INSTALL_DIR="$unix_path"
53631  fi
53632
53633      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53634        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53635      else
53636        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53637      fi
53638      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53639
53640  DLL_NAME="$DLL_NAME"
53641  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53642  METHOD="well-known location in VCINSTALLDIR"
53643  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53644    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53645$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53646
53647    # Need to check if the found msvcr is correct architecture
53648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53649$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53650    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53652      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53653      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53654      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53655        CORRECT_MSVCR_ARCH="PE32 executable"
53656      else
53657        CORRECT_MSVCR_ARCH="PE32+ executable"
53658      fi
53659    else
53660      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53661        CORRECT_MSVCR_ARCH=386
53662      else
53663        CORRECT_MSVCR_ARCH=x86-64
53664      fi
53665    fi
53666    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53668$as_echo "ok" >&6; }
53669      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53670
53671  # Only process if variable expands to non-empty
53672
53673  if test "x$MSVC_DLL" != x; then
53674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53675
53676  # Input might be given as Windows format, start by converting to
53677  # unix format.
53678  path="$MSVC_DLL"
53679  new_path=`$CYGPATH -u "$path"`
53680
53681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53684  # "foo.exe" is OK but "foo" is an error.
53685  #
53686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53687  # It is also a way to make sure we got the proper file name for the real test later on.
53688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53689  if test "x$test_shortpath" = x; then
53690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53691$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53692    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53693  fi
53694
53695  # Call helper function which possibly converts this using DOS-style short mode.
53696  # If so, the updated path is stored in $new_path.
53697
53698  input_path="$new_path"
53699  # Check if we need to convert this using DOS-style short mode. If the path
53700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53701  # take no chances and rewrite it.
53702  # Note: m4 eats our [], so we need to use [ and ] instead.
53703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53704  if test "x$has_forbidden_chars" != x; then
53705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53709      # Going to short mode and back again did indeed matter. Since short mode is
53710      # case insensitive, let's make it lowercase to improve readability.
53711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53712      # Now convert it back to Unix-style (cygpath)
53713      input_path=`$CYGPATH -u "$shortmode_path"`
53714      new_path="$input_path"
53715    fi
53716  fi
53717
53718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53719  if test "x$test_cygdrive_prefix" = x; then
53720    # As a simple fix, exclude /usr/bin since it's not a real path.
53721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53723      # a path prefixed by /cygdrive for fixpath to work.
53724      new_path="$CYGWIN_ROOT_PATH$input_path"
53725    fi
53726  fi
53727
53728
53729  if test "x$path" != "x$new_path"; then
53730    MSVC_DLL="$new_path"
53731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53732$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53733  fi
53734
53735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53736
53737  path="$MSVC_DLL"
53738  has_colon=`$ECHO $path | $GREP ^.:`
53739  new_path="$path"
53740  if test "x$has_colon" = x; then
53741    # Not in mixed or Windows style, start by that.
53742    new_path=`cmd //c echo $path`
53743  fi
53744
53745
53746  input_path="$new_path"
53747  # Check if we need to convert this using DOS-style short mode. If the path
53748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53749  # take no chances and rewrite it.
53750  # Note: m4 eats our [], so we need to use [ and ] instead.
53751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53752  if test "x$has_forbidden_chars" != x; then
53753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53755  fi
53756
53757
53758  windows_path="$new_path"
53759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53760    unix_path=`$CYGPATH -u "$windows_path"`
53761    new_path="$unix_path"
53762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53764    new_path="$unix_path"
53765  fi
53766
53767  if test "x$path" != "x$new_path"; then
53768    MSVC_DLL="$new_path"
53769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53770$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53771  fi
53772
53773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53775
53776    else
53777      # We're on a unix platform. Hooray! :)
53778      path="$MSVC_DLL"
53779      has_space=`$ECHO "$path" | $GREP " "`
53780      if test "x$has_space" != x; then
53781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53782$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53784      fi
53785
53786      # Use eval to expand a potential ~
53787      eval path="$path"
53788      if test ! -f "$path" && test ! -d "$path"; then
53789        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53790      fi
53791
53792      if test -d "$path"; then
53793        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53794      else
53795        dir="`$DIRNAME "$path"`"
53796        base="`$BASENAME "$path"`"
53797        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53798      fi
53799    fi
53800  fi
53801
53802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53803$as_echo_n "checking for $DLL_NAME... " >&6; }
53804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53805$as_echo "$MSVC_DLL" >&6; }
53806    else
53807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53808$as_echo "incorrect, ignoring" >&6; }
53809      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53810$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53811    fi
53812  fi
53813
53814    fi
53815  fi
53816
53817  if test "x$MSVC_DLL" = x; then
53818    # Probe: Check in the Boot JDK directory.
53819    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53820
53821  DLL_NAME="$DLL_NAME"
53822  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53823  METHOD="well-known location in Boot JDK"
53824  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53825    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53826$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53827
53828    # Need to check if the found msvcr is correct architecture
53829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53830$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53831    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53833      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53834      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53835      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53836        CORRECT_MSVCR_ARCH="PE32 executable"
53837      else
53838        CORRECT_MSVCR_ARCH="PE32+ executable"
53839      fi
53840    else
53841      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53842        CORRECT_MSVCR_ARCH=386
53843      else
53844        CORRECT_MSVCR_ARCH=x86-64
53845      fi
53846    fi
53847    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53849$as_echo "ok" >&6; }
53850      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53851
53852  # Only process if variable expands to non-empty
53853
53854  if test "x$MSVC_DLL" != x; then
53855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53856
53857  # Input might be given as Windows format, start by converting to
53858  # unix format.
53859  path="$MSVC_DLL"
53860  new_path=`$CYGPATH -u "$path"`
53861
53862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53865  # "foo.exe" is OK but "foo" is an error.
53866  #
53867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53868  # It is also a way to make sure we got the proper file name for the real test later on.
53869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53870  if test "x$test_shortpath" = x; then
53871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53872$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53873    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53874  fi
53875
53876  # Call helper function which possibly converts this using DOS-style short mode.
53877  # If so, the updated path is stored in $new_path.
53878
53879  input_path="$new_path"
53880  # Check if we need to convert this using DOS-style short mode. If the path
53881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53882  # take no chances and rewrite it.
53883  # Note: m4 eats our [], so we need to use [ and ] instead.
53884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53885  if test "x$has_forbidden_chars" != x; then
53886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53890      # Going to short mode and back again did indeed matter. Since short mode is
53891      # case insensitive, let's make it lowercase to improve readability.
53892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53893      # Now convert it back to Unix-style (cygpath)
53894      input_path=`$CYGPATH -u "$shortmode_path"`
53895      new_path="$input_path"
53896    fi
53897  fi
53898
53899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53900  if test "x$test_cygdrive_prefix" = x; then
53901    # As a simple fix, exclude /usr/bin since it's not a real path.
53902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53904      # a path prefixed by /cygdrive for fixpath to work.
53905      new_path="$CYGWIN_ROOT_PATH$input_path"
53906    fi
53907  fi
53908
53909
53910  if test "x$path" != "x$new_path"; then
53911    MSVC_DLL="$new_path"
53912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53913$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53914  fi
53915
53916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53917
53918  path="$MSVC_DLL"
53919  has_colon=`$ECHO $path | $GREP ^.:`
53920  new_path="$path"
53921  if test "x$has_colon" = x; then
53922    # Not in mixed or Windows style, start by that.
53923    new_path=`cmd //c echo $path`
53924  fi
53925
53926
53927  input_path="$new_path"
53928  # Check if we need to convert this using DOS-style short mode. If the path
53929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53930  # take no chances and rewrite it.
53931  # Note: m4 eats our [], so we need to use [ and ] instead.
53932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53933  if test "x$has_forbidden_chars" != x; then
53934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53936  fi
53937
53938
53939  windows_path="$new_path"
53940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53941    unix_path=`$CYGPATH -u "$windows_path"`
53942    new_path="$unix_path"
53943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53945    new_path="$unix_path"
53946  fi
53947
53948  if test "x$path" != "x$new_path"; then
53949    MSVC_DLL="$new_path"
53950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53951$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53952  fi
53953
53954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53956
53957    else
53958      # We're on a unix platform. Hooray! :)
53959      path="$MSVC_DLL"
53960      has_space=`$ECHO "$path" | $GREP " "`
53961      if test "x$has_space" != x; then
53962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53963$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53965      fi
53966
53967      # Use eval to expand a potential ~
53968      eval path="$path"
53969      if test ! -f "$path" && test ! -d "$path"; then
53970        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53971      fi
53972
53973      if test -d "$path"; then
53974        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53975      else
53976        dir="`$DIRNAME "$path"`"
53977        base="`$BASENAME "$path"`"
53978        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53979      fi
53980    fi
53981  fi
53982
53983      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53984$as_echo_n "checking for $DLL_NAME... " >&6; }
53985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53986$as_echo "$MSVC_DLL" >&6; }
53987    else
53988      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53989$as_echo "incorrect, ignoring" >&6; }
53990      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53991$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53992    fi
53993  fi
53994
53995  fi
53996
53997  if test "x$MSVC_DLL" = x; then
53998    # Probe: Look in the Windows system32 directory
53999    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54000
54001  windows_path="$CYGWIN_SYSTEMROOT"
54002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54003    unix_path=`$CYGPATH -u "$windows_path"`
54004    CYGWIN_SYSTEMROOT="$unix_path"
54005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54007    CYGWIN_SYSTEMROOT="$unix_path"
54008  fi
54009
54010    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54011
54012  DLL_NAME="$DLL_NAME"
54013  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54014  METHOD="well-known location in SYSTEMROOT"
54015  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54016    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54017$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54018
54019    # Need to check if the found msvcr is correct architecture
54020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54021$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54022    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54024      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54025      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54026      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54027        CORRECT_MSVCR_ARCH="PE32 executable"
54028      else
54029        CORRECT_MSVCR_ARCH="PE32+ executable"
54030      fi
54031    else
54032      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54033        CORRECT_MSVCR_ARCH=386
54034      else
54035        CORRECT_MSVCR_ARCH=x86-64
54036      fi
54037    fi
54038    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54040$as_echo "ok" >&6; }
54041      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54042
54043  # Only process if variable expands to non-empty
54044
54045  if test "x$MSVC_DLL" != x; then
54046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54047
54048  # Input might be given as Windows format, start by converting to
54049  # unix format.
54050  path="$MSVC_DLL"
54051  new_path=`$CYGPATH -u "$path"`
54052
54053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54056  # "foo.exe" is OK but "foo" is an error.
54057  #
54058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54059  # It is also a way to make sure we got the proper file name for the real test later on.
54060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54061  if test "x$test_shortpath" = x; then
54062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54063$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54064    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54065  fi
54066
54067  # Call helper function which possibly converts this using DOS-style short mode.
54068  # If so, the updated path is stored in $new_path.
54069
54070  input_path="$new_path"
54071  # Check if we need to convert this using DOS-style short mode. If the path
54072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54073  # take no chances and rewrite it.
54074  # Note: m4 eats our [], so we need to use [ and ] instead.
54075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54076  if test "x$has_forbidden_chars" != x; then
54077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54081      # Going to short mode and back again did indeed matter. Since short mode is
54082      # case insensitive, let's make it lowercase to improve readability.
54083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54084      # Now convert it back to Unix-style (cygpath)
54085      input_path=`$CYGPATH -u "$shortmode_path"`
54086      new_path="$input_path"
54087    fi
54088  fi
54089
54090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54091  if test "x$test_cygdrive_prefix" = x; then
54092    # As a simple fix, exclude /usr/bin since it's not a real path.
54093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54095      # a path prefixed by /cygdrive for fixpath to work.
54096      new_path="$CYGWIN_ROOT_PATH$input_path"
54097    fi
54098  fi
54099
54100
54101  if test "x$path" != "x$new_path"; then
54102    MSVC_DLL="$new_path"
54103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54104$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54105  fi
54106
54107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54108
54109  path="$MSVC_DLL"
54110  has_colon=`$ECHO $path | $GREP ^.:`
54111  new_path="$path"
54112  if test "x$has_colon" = x; then
54113    # Not in mixed or Windows style, start by that.
54114    new_path=`cmd //c echo $path`
54115  fi
54116
54117
54118  input_path="$new_path"
54119  # Check if we need to convert this using DOS-style short mode. If the path
54120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54121  # take no chances and rewrite it.
54122  # Note: m4 eats our [], so we need to use [ and ] instead.
54123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54124  if test "x$has_forbidden_chars" != x; then
54125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54127  fi
54128
54129
54130  windows_path="$new_path"
54131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54132    unix_path=`$CYGPATH -u "$windows_path"`
54133    new_path="$unix_path"
54134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54136    new_path="$unix_path"
54137  fi
54138
54139  if test "x$path" != "x$new_path"; then
54140    MSVC_DLL="$new_path"
54141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54142$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54143  fi
54144
54145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54147
54148    else
54149      # We're on a unix platform. Hooray! :)
54150      path="$MSVC_DLL"
54151      has_space=`$ECHO "$path" | $GREP " "`
54152      if test "x$has_space" != x; then
54153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54154$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54156      fi
54157
54158      # Use eval to expand a potential ~
54159      eval path="$path"
54160      if test ! -f "$path" && test ! -d "$path"; then
54161        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54162      fi
54163
54164      if test -d "$path"; then
54165        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54166      else
54167        dir="`$DIRNAME "$path"`"
54168        base="`$BASENAME "$path"`"
54169        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54170      fi
54171    fi
54172  fi
54173
54174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54175$as_echo_n "checking for $DLL_NAME... " >&6; }
54176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54177$as_echo "$MSVC_DLL" >&6; }
54178    else
54179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54180$as_echo "incorrect, ignoring" >&6; }
54181      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54182$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54183    fi
54184  fi
54185
54186  fi
54187
54188  if test "x$MSVC_DLL" = x; then
54189    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54190    if test "x$VS100COMNTOOLS" != x; then
54191      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54192
54193  windows_path="$CYGWIN_VS_TOOLS_DIR"
54194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54195    unix_path=`$CYGPATH -u "$windows_path"`
54196    CYGWIN_VS_TOOLS_DIR="$unix_path"
54197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54199    CYGWIN_VS_TOOLS_DIR="$unix_path"
54200  fi
54201
54202      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54203        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54204	    | $GREP -i /x64/ | $HEAD --lines 1`
54205      else
54206        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54207	    | $GREP -i /x86/ | $HEAD --lines 1`
54208      fi
54209
54210  DLL_NAME="$DLL_NAME"
54211  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54212  METHOD="search of VS100COMNTOOLS"
54213  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54214    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54215$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54216
54217    # Need to check if the found msvcr is correct architecture
54218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54219$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54220    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54222      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54223      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54224      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54225        CORRECT_MSVCR_ARCH="PE32 executable"
54226      else
54227        CORRECT_MSVCR_ARCH="PE32+ executable"
54228      fi
54229    else
54230      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54231        CORRECT_MSVCR_ARCH=386
54232      else
54233        CORRECT_MSVCR_ARCH=x86-64
54234      fi
54235    fi
54236    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54238$as_echo "ok" >&6; }
54239      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54240
54241  # Only process if variable expands to non-empty
54242
54243  if test "x$MSVC_DLL" != x; then
54244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54245
54246  # Input might be given as Windows format, start by converting to
54247  # unix format.
54248  path="$MSVC_DLL"
54249  new_path=`$CYGPATH -u "$path"`
54250
54251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54254  # "foo.exe" is OK but "foo" is an error.
54255  #
54256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54257  # It is also a way to make sure we got the proper file name for the real test later on.
54258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54259  if test "x$test_shortpath" = x; then
54260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54262    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54263  fi
54264
54265  # Call helper function which possibly converts this using DOS-style short mode.
54266  # If so, the updated path is stored in $new_path.
54267
54268  input_path="$new_path"
54269  # Check if we need to convert this using DOS-style short mode. If the path
54270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54271  # take no chances and rewrite it.
54272  # Note: m4 eats our [], so we need to use [ and ] instead.
54273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54274  if test "x$has_forbidden_chars" != x; then
54275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54279      # Going to short mode and back again did indeed matter. Since short mode is
54280      # case insensitive, let's make it lowercase to improve readability.
54281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54282      # Now convert it back to Unix-style (cygpath)
54283      input_path=`$CYGPATH -u "$shortmode_path"`
54284      new_path="$input_path"
54285    fi
54286  fi
54287
54288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54289  if test "x$test_cygdrive_prefix" = x; then
54290    # As a simple fix, exclude /usr/bin since it's not a real path.
54291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54293      # a path prefixed by /cygdrive for fixpath to work.
54294      new_path="$CYGWIN_ROOT_PATH$input_path"
54295    fi
54296  fi
54297
54298
54299  if test "x$path" != "x$new_path"; then
54300    MSVC_DLL="$new_path"
54301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54303  fi
54304
54305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54306
54307  path="$MSVC_DLL"
54308  has_colon=`$ECHO $path | $GREP ^.:`
54309  new_path="$path"
54310  if test "x$has_colon" = x; then
54311    # Not in mixed or Windows style, start by that.
54312    new_path=`cmd //c echo $path`
54313  fi
54314
54315
54316  input_path="$new_path"
54317  # Check if we need to convert this using DOS-style short mode. If the path
54318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54319  # take no chances and rewrite it.
54320  # Note: m4 eats our [], so we need to use [ and ] instead.
54321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54322  if test "x$has_forbidden_chars" != x; then
54323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54325  fi
54326
54327
54328  windows_path="$new_path"
54329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54330    unix_path=`$CYGPATH -u "$windows_path"`
54331    new_path="$unix_path"
54332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54334    new_path="$unix_path"
54335  fi
54336
54337  if test "x$path" != "x$new_path"; then
54338    MSVC_DLL="$new_path"
54339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54341  fi
54342
54343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54345
54346    else
54347      # We're on a unix platform. Hooray! :)
54348      path="$MSVC_DLL"
54349      has_space=`$ECHO "$path" | $GREP " "`
54350      if test "x$has_space" != x; then
54351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54352$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54354      fi
54355
54356      # Use eval to expand a potential ~
54357      eval path="$path"
54358      if test ! -f "$path" && test ! -d "$path"; then
54359        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54360      fi
54361
54362      if test -d "$path"; then
54363        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54364      else
54365        dir="`$DIRNAME "$path"`"
54366        base="`$BASENAME "$path"`"
54367        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54368      fi
54369    fi
54370  fi
54371
54372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54373$as_echo_n "checking for $DLL_NAME... " >&6; }
54374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54375$as_echo "$MSVC_DLL" >&6; }
54376    else
54377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54378$as_echo "incorrect, ignoring" >&6; }
54379      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54380$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54381    fi
54382  fi
54383
54384    fi
54385  fi
54386
54387  if test "x$MSVC_DLL" = x; then
54388    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54389    # (This was the original behaviour; kept since it might turn something up)
54390    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54391      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54392        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54393	    | $GREP x64 | $HEAD --lines 1`
54394      else
54395        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54396	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54397        if test "x$POSSIBLE_MSVC_DLL" = x; then
54398          # We're grasping at straws now...
54399          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54400	      | $HEAD --lines 1`
54401        fi
54402      fi
54403
54404
54405  DLL_NAME="$DLL_NAME"
54406  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54407  METHOD="search of VCINSTALLDIR"
54408  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54409    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54410$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54411
54412    # Need to check if the found msvcr is correct architecture
54413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54414$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54415    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54417      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54418      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54419      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54420        CORRECT_MSVCR_ARCH="PE32 executable"
54421      else
54422        CORRECT_MSVCR_ARCH="PE32+ executable"
54423      fi
54424    else
54425      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54426        CORRECT_MSVCR_ARCH=386
54427      else
54428        CORRECT_MSVCR_ARCH=x86-64
54429      fi
54430    fi
54431    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54433$as_echo "ok" >&6; }
54434      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54435
54436  # Only process if variable expands to non-empty
54437
54438  if test "x$MSVC_DLL" != x; then
54439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54440
54441  # Input might be given as Windows format, start by converting to
54442  # unix format.
54443  path="$MSVC_DLL"
54444  new_path=`$CYGPATH -u "$path"`
54445
54446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54449  # "foo.exe" is OK but "foo" is an error.
54450  #
54451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54452  # It is also a way to make sure we got the proper file name for the real test later on.
54453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54454  if test "x$test_shortpath" = x; then
54455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54456$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54457    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54458  fi
54459
54460  # Call helper function which possibly converts this using DOS-style short mode.
54461  # If so, the updated path is stored in $new_path.
54462
54463  input_path="$new_path"
54464  # Check if we need to convert this using DOS-style short mode. If the path
54465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54466  # take no chances and rewrite it.
54467  # Note: m4 eats our [], so we need to use [ and ] instead.
54468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54469  if test "x$has_forbidden_chars" != x; then
54470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54474      # Going to short mode and back again did indeed matter. Since short mode is
54475      # case insensitive, let's make it lowercase to improve readability.
54476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54477      # Now convert it back to Unix-style (cygpath)
54478      input_path=`$CYGPATH -u "$shortmode_path"`
54479      new_path="$input_path"
54480    fi
54481  fi
54482
54483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54484  if test "x$test_cygdrive_prefix" = x; then
54485    # As a simple fix, exclude /usr/bin since it's not a real path.
54486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54488      # a path prefixed by /cygdrive for fixpath to work.
54489      new_path="$CYGWIN_ROOT_PATH$input_path"
54490    fi
54491  fi
54492
54493
54494  if test "x$path" != "x$new_path"; then
54495    MSVC_DLL="$new_path"
54496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54497$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54498  fi
54499
54500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54501
54502  path="$MSVC_DLL"
54503  has_colon=`$ECHO $path | $GREP ^.:`
54504  new_path="$path"
54505  if test "x$has_colon" = x; then
54506    # Not in mixed or Windows style, start by that.
54507    new_path=`cmd //c echo $path`
54508  fi
54509
54510
54511  input_path="$new_path"
54512  # Check if we need to convert this using DOS-style short mode. If the path
54513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54514  # take no chances and rewrite it.
54515  # Note: m4 eats our [], so we need to use [ and ] instead.
54516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54517  if test "x$has_forbidden_chars" != x; then
54518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54520  fi
54521
54522
54523  windows_path="$new_path"
54524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54525    unix_path=`$CYGPATH -u "$windows_path"`
54526    new_path="$unix_path"
54527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54529    new_path="$unix_path"
54530  fi
54531
54532  if test "x$path" != "x$new_path"; then
54533    MSVC_DLL="$new_path"
54534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54535$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54536  fi
54537
54538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54540
54541    else
54542      # We're on a unix platform. Hooray! :)
54543      path="$MSVC_DLL"
54544      has_space=`$ECHO "$path" | $GREP " "`
54545      if test "x$has_space" != x; then
54546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54547$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54549      fi
54550
54551      # Use eval to expand a potential ~
54552      eval path="$path"
54553      if test ! -f "$path" && test ! -d "$path"; then
54554        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54555      fi
54556
54557      if test -d "$path"; then
54558        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54559      else
54560        dir="`$DIRNAME "$path"`"
54561        base="`$BASENAME "$path"`"
54562        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54563      fi
54564    fi
54565  fi
54566
54567      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54568$as_echo_n "checking for $DLL_NAME... " >&6; }
54569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54570$as_echo "$MSVC_DLL" >&6; }
54571    else
54572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54573$as_echo "incorrect, ignoring" >&6; }
54574      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54575$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54576    fi
54577  fi
54578
54579    fi
54580  fi
54581
54582  if test "x$MSVC_DLL" = x; then
54583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54584$as_echo_n "checking for $DLL_NAME... " >&6; }
54585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54586$as_echo "no" >&6; }
54587    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54588  fi
54589
54590    MSVCR_DLL="$MSVC_DLL"
54591  fi
54592
54593
54594
54595# Check whether --with-msvcp-dll was given.
54596if test "${with_msvcp_dll+set}" = set; then :
54597  withval=$with_msvcp_dll;
54598fi
54599
54600
54601  if test "x$MSVCP_NAME" != "x"; then
54602    if test "x$with_msvcp_dll" != x; then
54603      # If given explicitly by user, do not probe. If not present, fail directly.
54604
54605  DLL_NAME="$MSVCP_NAME"
54606  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54607  METHOD="--with-msvcp-dll"
54608  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54609    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54610$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54611
54612    # Need to check if the found msvcr is correct architecture
54613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54614$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54615    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54617      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54618      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54619      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54620        CORRECT_MSVCR_ARCH="PE32 executable"
54621      else
54622        CORRECT_MSVCR_ARCH="PE32+ executable"
54623      fi
54624    else
54625      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54626        CORRECT_MSVCR_ARCH=386
54627      else
54628        CORRECT_MSVCR_ARCH=x86-64
54629      fi
54630    fi
54631    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54633$as_echo "ok" >&6; }
54634      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54635
54636  # Only process if variable expands to non-empty
54637
54638  if test "x$MSVC_DLL" != x; then
54639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54640
54641  # Input might be given as Windows format, start by converting to
54642  # unix format.
54643  path="$MSVC_DLL"
54644  new_path=`$CYGPATH -u "$path"`
54645
54646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54649  # "foo.exe" is OK but "foo" is an error.
54650  #
54651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54652  # It is also a way to make sure we got the proper file name for the real test later on.
54653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54654  if test "x$test_shortpath" = x; then
54655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54656$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54657    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54658  fi
54659
54660  # Call helper function which possibly converts this using DOS-style short mode.
54661  # If so, the updated path is stored in $new_path.
54662
54663  input_path="$new_path"
54664  # Check if we need to convert this using DOS-style short mode. If the path
54665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54666  # take no chances and rewrite it.
54667  # Note: m4 eats our [], so we need to use [ and ] instead.
54668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54669  if test "x$has_forbidden_chars" != x; then
54670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54674      # Going to short mode and back again did indeed matter. Since short mode is
54675      # case insensitive, let's make it lowercase to improve readability.
54676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54677      # Now convert it back to Unix-style (cygpath)
54678      input_path=`$CYGPATH -u "$shortmode_path"`
54679      new_path="$input_path"
54680    fi
54681  fi
54682
54683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54684  if test "x$test_cygdrive_prefix" = x; then
54685    # As a simple fix, exclude /usr/bin since it's not a real path.
54686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54688      # a path prefixed by /cygdrive for fixpath to work.
54689      new_path="$CYGWIN_ROOT_PATH$input_path"
54690    fi
54691  fi
54692
54693
54694  if test "x$path" != "x$new_path"; then
54695    MSVC_DLL="$new_path"
54696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54697$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54698  fi
54699
54700    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54701
54702  path="$MSVC_DLL"
54703  has_colon=`$ECHO $path | $GREP ^.:`
54704  new_path="$path"
54705  if test "x$has_colon" = x; then
54706    # Not in mixed or Windows style, start by that.
54707    new_path=`cmd //c echo $path`
54708  fi
54709
54710
54711  input_path="$new_path"
54712  # Check if we need to convert this using DOS-style short mode. If the path
54713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54714  # take no chances and rewrite it.
54715  # Note: m4 eats our [], so we need to use [ and ] instead.
54716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54717  if test "x$has_forbidden_chars" != x; then
54718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54720  fi
54721
54722
54723  windows_path="$new_path"
54724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54725    unix_path=`$CYGPATH -u "$windows_path"`
54726    new_path="$unix_path"
54727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54729    new_path="$unix_path"
54730  fi
54731
54732  if test "x$path" != "x$new_path"; then
54733    MSVC_DLL="$new_path"
54734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54735$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54736  fi
54737
54738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54740
54741    else
54742      # We're on a unix platform. Hooray! :)
54743      path="$MSVC_DLL"
54744      has_space=`$ECHO "$path" | $GREP " "`
54745      if test "x$has_space" != x; then
54746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54747$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54748        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54749      fi
54750
54751      # Use eval to expand a potential ~
54752      eval path="$path"
54753      if test ! -f "$path" && test ! -d "$path"; then
54754        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54755      fi
54756
54757      if test -d "$path"; then
54758        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54759      else
54760        dir="`$DIRNAME "$path"`"
54761        base="`$BASENAME "$path"`"
54762        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54763      fi
54764    fi
54765  fi
54766
54767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54768$as_echo_n "checking for $DLL_NAME... " >&6; }
54769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54770$as_echo "$MSVC_DLL" >&6; }
54771    else
54772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54773$as_echo "incorrect, ignoring" >&6; }
54774      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54775$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54776    fi
54777  fi
54778
54779      if test "x$MSVC_DLL" = x; then
54780        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54781      fi
54782      MSVCP_DLL="$MSVC_DLL"
54783    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54784
54785  DLL_NAME="$MSVCP_NAME"
54786  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54787  METHOD="devkit"
54788  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54789    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54790$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54791
54792    # Need to check if the found msvcr is correct architecture
54793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54794$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54795    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54797      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54798      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54799      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54800        CORRECT_MSVCR_ARCH="PE32 executable"
54801      else
54802        CORRECT_MSVCR_ARCH="PE32+ executable"
54803      fi
54804    else
54805      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54806        CORRECT_MSVCR_ARCH=386
54807      else
54808        CORRECT_MSVCR_ARCH=x86-64
54809      fi
54810    fi
54811    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54813$as_echo "ok" >&6; }
54814      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54815
54816  # Only process if variable expands to non-empty
54817
54818  if test "x$MSVC_DLL" != x; then
54819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54820
54821  # Input might be given as Windows format, start by converting to
54822  # unix format.
54823  path="$MSVC_DLL"
54824  new_path=`$CYGPATH -u "$path"`
54825
54826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54829  # "foo.exe" is OK but "foo" is an error.
54830  #
54831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54832  # It is also a way to make sure we got the proper file name for the real test later on.
54833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54834  if test "x$test_shortpath" = x; then
54835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54836$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54837    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54838  fi
54839
54840  # Call helper function which possibly converts this using DOS-style short mode.
54841  # If so, the updated path is stored in $new_path.
54842
54843  input_path="$new_path"
54844  # Check if we need to convert this using DOS-style short mode. If the path
54845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54846  # take no chances and rewrite it.
54847  # Note: m4 eats our [], so we need to use [ and ] instead.
54848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54849  if test "x$has_forbidden_chars" != x; then
54850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54854      # Going to short mode and back again did indeed matter. Since short mode is
54855      # case insensitive, let's make it lowercase to improve readability.
54856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54857      # Now convert it back to Unix-style (cygpath)
54858      input_path=`$CYGPATH -u "$shortmode_path"`
54859      new_path="$input_path"
54860    fi
54861  fi
54862
54863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54864  if test "x$test_cygdrive_prefix" = x; then
54865    # As a simple fix, exclude /usr/bin since it's not a real path.
54866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54868      # a path prefixed by /cygdrive for fixpath to work.
54869      new_path="$CYGWIN_ROOT_PATH$input_path"
54870    fi
54871  fi
54872
54873
54874  if test "x$path" != "x$new_path"; then
54875    MSVC_DLL="$new_path"
54876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54877$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54878  fi
54879
54880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54881
54882  path="$MSVC_DLL"
54883  has_colon=`$ECHO $path | $GREP ^.:`
54884  new_path="$path"
54885  if test "x$has_colon" = x; then
54886    # Not in mixed or Windows style, start by that.
54887    new_path=`cmd //c echo $path`
54888  fi
54889
54890
54891  input_path="$new_path"
54892  # Check if we need to convert this using DOS-style short mode. If the path
54893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54894  # take no chances and rewrite it.
54895  # Note: m4 eats our [], so we need to use [ and ] instead.
54896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54897  if test "x$has_forbidden_chars" != x; then
54898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54900  fi
54901
54902
54903  windows_path="$new_path"
54904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54905    unix_path=`$CYGPATH -u "$windows_path"`
54906    new_path="$unix_path"
54907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54909    new_path="$unix_path"
54910  fi
54911
54912  if test "x$path" != "x$new_path"; then
54913    MSVC_DLL="$new_path"
54914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54915$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54916  fi
54917
54918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54920
54921    else
54922      # We're on a unix platform. Hooray! :)
54923      path="$MSVC_DLL"
54924      has_space=`$ECHO "$path" | $GREP " "`
54925      if test "x$has_space" != x; then
54926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54927$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54929      fi
54930
54931      # Use eval to expand a potential ~
54932      eval path="$path"
54933      if test ! -f "$path" && test ! -d "$path"; then
54934        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54935      fi
54936
54937      if test -d "$path"; then
54938        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54939      else
54940        dir="`$DIRNAME "$path"`"
54941        base="`$BASENAME "$path"`"
54942        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54943      fi
54944    fi
54945  fi
54946
54947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54948$as_echo_n "checking for $DLL_NAME... " >&6; }
54949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54950$as_echo "$MSVC_DLL" >&6; }
54951    else
54952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54953$as_echo "incorrect, ignoring" >&6; }
54954      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54955$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54956    fi
54957  fi
54958
54959      if test "x$MSVC_DLL" = x; then
54960        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54961      fi
54962      MSVCP_DLL="$MSVC_DLL"
54963    else
54964
54965  DLL_NAME="${MSVCP_NAME}"
54966  MSVC_DLL=
54967
54968  if test "x$MSVC_DLL" = x; then
54969    # Probe: Using well-known location from Visual Studio 10.0
54970    if test "x$VCINSTALLDIR" != x; then
54971      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54972
54973  windows_path="$CYGWIN_VC_INSTALL_DIR"
54974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54975    unix_path=`$CYGPATH -u "$windows_path"`
54976    CYGWIN_VC_INSTALL_DIR="$unix_path"
54977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54979    CYGWIN_VC_INSTALL_DIR="$unix_path"
54980  fi
54981
54982      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54983        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54984      else
54985        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54986      fi
54987      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54988
54989  DLL_NAME="$DLL_NAME"
54990  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54991  METHOD="well-known location in VCINSTALLDIR"
54992  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54993    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54994$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54995
54996    # Need to check if the found msvcr is correct architecture
54997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54998$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54999    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55001      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55002      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55004        CORRECT_MSVCR_ARCH="PE32 executable"
55005      else
55006        CORRECT_MSVCR_ARCH="PE32+ executable"
55007      fi
55008    else
55009      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55010        CORRECT_MSVCR_ARCH=386
55011      else
55012        CORRECT_MSVCR_ARCH=x86-64
55013      fi
55014    fi
55015    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55017$as_echo "ok" >&6; }
55018      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55019
55020  # Only process if variable expands to non-empty
55021
55022  if test "x$MSVC_DLL" != x; then
55023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55024
55025  # Input might be given as Windows format, start by converting to
55026  # unix format.
55027  path="$MSVC_DLL"
55028  new_path=`$CYGPATH -u "$path"`
55029
55030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55033  # "foo.exe" is OK but "foo" is an error.
55034  #
55035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55036  # It is also a way to make sure we got the proper file name for the real test later on.
55037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55038  if test "x$test_shortpath" = x; then
55039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55040$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55041    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55042  fi
55043
55044  # Call helper function which possibly converts this using DOS-style short mode.
55045  # If so, the updated path is stored in $new_path.
55046
55047  input_path="$new_path"
55048  # Check if we need to convert this using DOS-style short mode. If the path
55049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55050  # take no chances and rewrite it.
55051  # Note: m4 eats our [], so we need to use [ and ] instead.
55052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55053  if test "x$has_forbidden_chars" != x; then
55054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55058      # Going to short mode and back again did indeed matter. Since short mode is
55059      # case insensitive, let's make it lowercase to improve readability.
55060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55061      # Now convert it back to Unix-style (cygpath)
55062      input_path=`$CYGPATH -u "$shortmode_path"`
55063      new_path="$input_path"
55064    fi
55065  fi
55066
55067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55068  if test "x$test_cygdrive_prefix" = x; then
55069    # As a simple fix, exclude /usr/bin since it's not a real path.
55070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55072      # a path prefixed by /cygdrive for fixpath to work.
55073      new_path="$CYGWIN_ROOT_PATH$input_path"
55074    fi
55075  fi
55076
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55085
55086  path="$MSVC_DLL"
55087  has_colon=`$ECHO $path | $GREP ^.:`
55088  new_path="$path"
55089  if test "x$has_colon" = x; then
55090    # Not in mixed or Windows style, start by that.
55091    new_path=`cmd //c echo $path`
55092  fi
55093
55094
55095  input_path="$new_path"
55096  # Check if we need to convert this using DOS-style short mode. If the path
55097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55098  # take no chances and rewrite it.
55099  # Note: m4 eats our [], so we need to use [ and ] instead.
55100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55101  if test "x$has_forbidden_chars" != x; then
55102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55104  fi
55105
55106
55107  windows_path="$new_path"
55108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55109    unix_path=`$CYGPATH -u "$windows_path"`
55110    new_path="$unix_path"
55111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55113    new_path="$unix_path"
55114  fi
55115
55116  if test "x$path" != "x$new_path"; then
55117    MSVC_DLL="$new_path"
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55119$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55120  fi
55121
55122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55124
55125    else
55126      # We're on a unix platform. Hooray! :)
55127      path="$MSVC_DLL"
55128      has_space=`$ECHO "$path" | $GREP " "`
55129      if test "x$has_space" != x; then
55130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55131$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55133      fi
55134
55135      # Use eval to expand a potential ~
55136      eval path="$path"
55137      if test ! -f "$path" && test ! -d "$path"; then
55138        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55139      fi
55140
55141      if test -d "$path"; then
55142        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55143      else
55144        dir="`$DIRNAME "$path"`"
55145        base="`$BASENAME "$path"`"
55146        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55147      fi
55148    fi
55149  fi
55150
55151      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55152$as_echo_n "checking for $DLL_NAME... " >&6; }
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55154$as_echo "$MSVC_DLL" >&6; }
55155    else
55156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55157$as_echo "incorrect, ignoring" >&6; }
55158      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55159$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55160    fi
55161  fi
55162
55163    fi
55164  fi
55165
55166  if test "x$MSVC_DLL" = x; then
55167    # Probe: Check in the Boot JDK directory.
55168    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55169
55170  DLL_NAME="$DLL_NAME"
55171  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55172  METHOD="well-known location in Boot JDK"
55173  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55175$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55176
55177    # Need to check if the found msvcr is correct architecture
55178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55179$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55180    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55182      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55183      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55184      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55185        CORRECT_MSVCR_ARCH="PE32 executable"
55186      else
55187        CORRECT_MSVCR_ARCH="PE32+ executable"
55188      fi
55189    else
55190      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55191        CORRECT_MSVCR_ARCH=386
55192      else
55193        CORRECT_MSVCR_ARCH=x86-64
55194      fi
55195    fi
55196    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55198$as_echo "ok" >&6; }
55199      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55200
55201  # Only process if variable expands to non-empty
55202
55203  if test "x$MSVC_DLL" != x; then
55204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55205
55206  # Input might be given as Windows format, start by converting to
55207  # unix format.
55208  path="$MSVC_DLL"
55209  new_path=`$CYGPATH -u "$path"`
55210
55211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55214  # "foo.exe" is OK but "foo" is an error.
55215  #
55216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55217  # It is also a way to make sure we got the proper file name for the real test later on.
55218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55219  if test "x$test_shortpath" = x; then
55220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55221$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55222    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55223  fi
55224
55225  # Call helper function which possibly converts this using DOS-style short mode.
55226  # If so, the updated path is stored in $new_path.
55227
55228  input_path="$new_path"
55229  # Check if we need to convert this using DOS-style short mode. If the path
55230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55231  # take no chances and rewrite it.
55232  # Note: m4 eats our [], so we need to use [ and ] instead.
55233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55234  if test "x$has_forbidden_chars" != x; then
55235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55239      # Going to short mode and back again did indeed matter. Since short mode is
55240      # case insensitive, let's make it lowercase to improve readability.
55241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55242      # Now convert it back to Unix-style (cygpath)
55243      input_path=`$CYGPATH -u "$shortmode_path"`
55244      new_path="$input_path"
55245    fi
55246  fi
55247
55248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55249  if test "x$test_cygdrive_prefix" = x; then
55250    # As a simple fix, exclude /usr/bin since it's not a real path.
55251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55253      # a path prefixed by /cygdrive for fixpath to work.
55254      new_path="$CYGWIN_ROOT_PATH$input_path"
55255    fi
55256  fi
55257
55258
55259  if test "x$path" != "x$new_path"; then
55260    MSVC_DLL="$new_path"
55261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55262$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55263  fi
55264
55265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55266
55267  path="$MSVC_DLL"
55268  has_colon=`$ECHO $path | $GREP ^.:`
55269  new_path="$path"
55270  if test "x$has_colon" = x; then
55271    # Not in mixed or Windows style, start by that.
55272    new_path=`cmd //c echo $path`
55273  fi
55274
55275
55276  input_path="$new_path"
55277  # Check if we need to convert this using DOS-style short mode. If the path
55278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55279  # take no chances and rewrite it.
55280  # Note: m4 eats our [], so we need to use [ and ] instead.
55281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55282  if test "x$has_forbidden_chars" != x; then
55283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55285  fi
55286
55287
55288  windows_path="$new_path"
55289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55290    unix_path=`$CYGPATH -u "$windows_path"`
55291    new_path="$unix_path"
55292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55294    new_path="$unix_path"
55295  fi
55296
55297  if test "x$path" != "x$new_path"; then
55298    MSVC_DLL="$new_path"
55299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55300$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55301  fi
55302
55303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55305
55306    else
55307      # We're on a unix platform. Hooray! :)
55308      path="$MSVC_DLL"
55309      has_space=`$ECHO "$path" | $GREP " "`
55310      if test "x$has_space" != x; then
55311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55312$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55314      fi
55315
55316      # Use eval to expand a potential ~
55317      eval path="$path"
55318      if test ! -f "$path" && test ! -d "$path"; then
55319        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55320      fi
55321
55322      if test -d "$path"; then
55323        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55324      else
55325        dir="`$DIRNAME "$path"`"
55326        base="`$BASENAME "$path"`"
55327        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55328      fi
55329    fi
55330  fi
55331
55332      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55333$as_echo_n "checking for $DLL_NAME... " >&6; }
55334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55335$as_echo "$MSVC_DLL" >&6; }
55336    else
55337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55338$as_echo "incorrect, ignoring" >&6; }
55339      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55340$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55341    fi
55342  fi
55343
55344  fi
55345
55346  if test "x$MSVC_DLL" = x; then
55347    # Probe: Look in the Windows system32 directory
55348    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55349
55350  windows_path="$CYGWIN_SYSTEMROOT"
55351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55352    unix_path=`$CYGPATH -u "$windows_path"`
55353    CYGWIN_SYSTEMROOT="$unix_path"
55354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55356    CYGWIN_SYSTEMROOT="$unix_path"
55357  fi
55358
55359    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55360
55361  DLL_NAME="$DLL_NAME"
55362  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55363  METHOD="well-known location in SYSTEMROOT"
55364  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55365    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55366$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55367
55368    # Need to check if the found msvcr is correct architecture
55369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55370$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55371    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55373      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55374      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55375      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55376        CORRECT_MSVCR_ARCH="PE32 executable"
55377      else
55378        CORRECT_MSVCR_ARCH="PE32+ executable"
55379      fi
55380    else
55381      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55382        CORRECT_MSVCR_ARCH=386
55383      else
55384        CORRECT_MSVCR_ARCH=x86-64
55385      fi
55386    fi
55387    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55389$as_echo "ok" >&6; }
55390      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55391
55392  # Only process if variable expands to non-empty
55393
55394  if test "x$MSVC_DLL" != x; then
55395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55396
55397  # Input might be given as Windows format, start by converting to
55398  # unix format.
55399  path="$MSVC_DLL"
55400  new_path=`$CYGPATH -u "$path"`
55401
55402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55405  # "foo.exe" is OK but "foo" is an error.
55406  #
55407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55408  # It is also a way to make sure we got the proper file name for the real test later on.
55409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55410  if test "x$test_shortpath" = x; then
55411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55412$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55413    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55414  fi
55415
55416  # Call helper function which possibly converts this using DOS-style short mode.
55417  # If so, the updated path is stored in $new_path.
55418
55419  input_path="$new_path"
55420  # Check if we need to convert this using DOS-style short mode. If the path
55421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55422  # take no chances and rewrite it.
55423  # Note: m4 eats our [], so we need to use [ and ] instead.
55424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55425  if test "x$has_forbidden_chars" != x; then
55426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55430      # Going to short mode and back again did indeed matter. Since short mode is
55431      # case insensitive, let's make it lowercase to improve readability.
55432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55433      # Now convert it back to Unix-style (cygpath)
55434      input_path=`$CYGPATH -u "$shortmode_path"`
55435      new_path="$input_path"
55436    fi
55437  fi
55438
55439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55440  if test "x$test_cygdrive_prefix" = x; then
55441    # As a simple fix, exclude /usr/bin since it's not a real path.
55442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55444      # a path prefixed by /cygdrive for fixpath to work.
55445      new_path="$CYGWIN_ROOT_PATH$input_path"
55446    fi
55447  fi
55448
55449
55450  if test "x$path" != "x$new_path"; then
55451    MSVC_DLL="$new_path"
55452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55453$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55454  fi
55455
55456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55457
55458  path="$MSVC_DLL"
55459  has_colon=`$ECHO $path | $GREP ^.:`
55460  new_path="$path"
55461  if test "x$has_colon" = x; then
55462    # Not in mixed or Windows style, start by that.
55463    new_path=`cmd //c echo $path`
55464  fi
55465
55466
55467  input_path="$new_path"
55468  # Check if we need to convert this using DOS-style short mode. If the path
55469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55470  # take no chances and rewrite it.
55471  # Note: m4 eats our [], so we need to use [ and ] instead.
55472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55473  if test "x$has_forbidden_chars" != x; then
55474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55476  fi
55477
55478
55479  windows_path="$new_path"
55480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55481    unix_path=`$CYGPATH -u "$windows_path"`
55482    new_path="$unix_path"
55483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55485    new_path="$unix_path"
55486  fi
55487
55488  if test "x$path" != "x$new_path"; then
55489    MSVC_DLL="$new_path"
55490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55491$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55492  fi
55493
55494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55496
55497    else
55498      # We're on a unix platform. Hooray! :)
55499      path="$MSVC_DLL"
55500      has_space=`$ECHO "$path" | $GREP " "`
55501      if test "x$has_space" != x; then
55502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55503$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55505      fi
55506
55507      # Use eval to expand a potential ~
55508      eval path="$path"
55509      if test ! -f "$path" && test ! -d "$path"; then
55510        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55511      fi
55512
55513      if test -d "$path"; then
55514        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55515      else
55516        dir="`$DIRNAME "$path"`"
55517        base="`$BASENAME "$path"`"
55518        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55519      fi
55520    fi
55521  fi
55522
55523      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55524$as_echo_n "checking for $DLL_NAME... " >&6; }
55525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55526$as_echo "$MSVC_DLL" >&6; }
55527    else
55528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55529$as_echo "incorrect, ignoring" >&6; }
55530      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55531$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55532    fi
55533  fi
55534
55535  fi
55536
55537  if test "x$MSVC_DLL" = x; then
55538    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55539    if test "x$VS100COMNTOOLS" != x; then
55540      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55541
55542  windows_path="$CYGWIN_VS_TOOLS_DIR"
55543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55544    unix_path=`$CYGPATH -u "$windows_path"`
55545    CYGWIN_VS_TOOLS_DIR="$unix_path"
55546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55548    CYGWIN_VS_TOOLS_DIR="$unix_path"
55549  fi
55550
55551      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55552        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55553	    | $GREP -i /x64/ | $HEAD --lines 1`
55554      else
55555        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55556	    | $GREP -i /x86/ | $HEAD --lines 1`
55557      fi
55558
55559  DLL_NAME="$DLL_NAME"
55560  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55561  METHOD="search of VS100COMNTOOLS"
55562  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55563    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55564$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55565
55566    # Need to check if the found msvcr is correct architecture
55567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55568$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55569    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55571      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55572      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55573      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55574        CORRECT_MSVCR_ARCH="PE32 executable"
55575      else
55576        CORRECT_MSVCR_ARCH="PE32+ executable"
55577      fi
55578    else
55579      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55580        CORRECT_MSVCR_ARCH=386
55581      else
55582        CORRECT_MSVCR_ARCH=x86-64
55583      fi
55584    fi
55585    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55587$as_echo "ok" >&6; }
55588      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55589
55590  # Only process if variable expands to non-empty
55591
55592  if test "x$MSVC_DLL" != x; then
55593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55594
55595  # Input might be given as Windows format, start by converting to
55596  # unix format.
55597  path="$MSVC_DLL"
55598  new_path=`$CYGPATH -u "$path"`
55599
55600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55603  # "foo.exe" is OK but "foo" is an error.
55604  #
55605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55606  # It is also a way to make sure we got the proper file name for the real test later on.
55607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55608  if test "x$test_shortpath" = x; then
55609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55610$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55611    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55612  fi
55613
55614  # Call helper function which possibly converts this using DOS-style short mode.
55615  # If so, the updated path is stored in $new_path.
55616
55617  input_path="$new_path"
55618  # Check if we need to convert this using DOS-style short mode. If the path
55619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55620  # take no chances and rewrite it.
55621  # Note: m4 eats our [], so we need to use [ and ] instead.
55622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55623  if test "x$has_forbidden_chars" != x; then
55624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55628      # Going to short mode and back again did indeed matter. Since short mode is
55629      # case insensitive, let's make it lowercase to improve readability.
55630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55631      # Now convert it back to Unix-style (cygpath)
55632      input_path=`$CYGPATH -u "$shortmode_path"`
55633      new_path="$input_path"
55634    fi
55635  fi
55636
55637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55638  if test "x$test_cygdrive_prefix" = x; then
55639    # As a simple fix, exclude /usr/bin since it's not a real path.
55640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55642      # a path prefixed by /cygdrive for fixpath to work.
55643      new_path="$CYGWIN_ROOT_PATH$input_path"
55644    fi
55645  fi
55646
55647
55648  if test "x$path" != "x$new_path"; then
55649    MSVC_DLL="$new_path"
55650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55651$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55652  fi
55653
55654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55655
55656  path="$MSVC_DLL"
55657  has_colon=`$ECHO $path | $GREP ^.:`
55658  new_path="$path"
55659  if test "x$has_colon" = x; then
55660    # Not in mixed or Windows style, start by that.
55661    new_path=`cmd //c echo $path`
55662  fi
55663
55664
55665  input_path="$new_path"
55666  # Check if we need to convert this using DOS-style short mode. If the path
55667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55668  # take no chances and rewrite it.
55669  # Note: m4 eats our [], so we need to use [ and ] instead.
55670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55671  if test "x$has_forbidden_chars" != x; then
55672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55674  fi
55675
55676
55677  windows_path="$new_path"
55678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55679    unix_path=`$CYGPATH -u "$windows_path"`
55680    new_path="$unix_path"
55681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55683    new_path="$unix_path"
55684  fi
55685
55686  if test "x$path" != "x$new_path"; then
55687    MSVC_DLL="$new_path"
55688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55689$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55690  fi
55691
55692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55694
55695    else
55696      # We're on a unix platform. Hooray! :)
55697      path="$MSVC_DLL"
55698      has_space=`$ECHO "$path" | $GREP " "`
55699      if test "x$has_space" != x; then
55700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55701$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55703      fi
55704
55705      # Use eval to expand a potential ~
55706      eval path="$path"
55707      if test ! -f "$path" && test ! -d "$path"; then
55708        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55709      fi
55710
55711      if test -d "$path"; then
55712        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55713      else
55714        dir="`$DIRNAME "$path"`"
55715        base="`$BASENAME "$path"`"
55716        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55717      fi
55718    fi
55719  fi
55720
55721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55722$as_echo_n "checking for $DLL_NAME... " >&6; }
55723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55724$as_echo "$MSVC_DLL" >&6; }
55725    else
55726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55727$as_echo "incorrect, ignoring" >&6; }
55728      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55729$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55730    fi
55731  fi
55732
55733    fi
55734  fi
55735
55736  if test "x$MSVC_DLL" = x; then
55737    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55738    # (This was the original behaviour; kept since it might turn something up)
55739    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55740      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55741        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55742	    | $GREP x64 | $HEAD --lines 1`
55743      else
55744        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55745	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55746        if test "x$POSSIBLE_MSVC_DLL" = x; then
55747          # We're grasping at straws now...
55748          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55749	      | $HEAD --lines 1`
55750        fi
55751      fi
55752
55753
55754  DLL_NAME="$DLL_NAME"
55755  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55756  METHOD="search of VCINSTALLDIR"
55757  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55758    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55759$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55760
55761    # Need to check if the found msvcr is correct architecture
55762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55763$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55764    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55766      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55767      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55769        CORRECT_MSVCR_ARCH="PE32 executable"
55770      else
55771        CORRECT_MSVCR_ARCH="PE32+ executable"
55772      fi
55773    else
55774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55775        CORRECT_MSVCR_ARCH=386
55776      else
55777        CORRECT_MSVCR_ARCH=x86-64
55778      fi
55779    fi
55780    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55782$as_echo "ok" >&6; }
55783      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55784
55785  # Only process if variable expands to non-empty
55786
55787  if test "x$MSVC_DLL" != x; then
55788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55789
55790  # Input might be given as Windows format, start by converting to
55791  # unix format.
55792  path="$MSVC_DLL"
55793  new_path=`$CYGPATH -u "$path"`
55794
55795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55798  # "foo.exe" is OK but "foo" is an error.
55799  #
55800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55801  # It is also a way to make sure we got the proper file name for the real test later on.
55802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55803  if test "x$test_shortpath" = x; then
55804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55805$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55806    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55807  fi
55808
55809  # Call helper function which possibly converts this using DOS-style short mode.
55810  # If so, the updated path is stored in $new_path.
55811
55812  input_path="$new_path"
55813  # Check if we need to convert this using DOS-style short mode. If the path
55814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55815  # take no chances and rewrite it.
55816  # Note: m4 eats our [], so we need to use [ and ] instead.
55817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55818  if test "x$has_forbidden_chars" != x; then
55819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55823      # Going to short mode and back again did indeed matter. Since short mode is
55824      # case insensitive, let's make it lowercase to improve readability.
55825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55826      # Now convert it back to Unix-style (cygpath)
55827      input_path=`$CYGPATH -u "$shortmode_path"`
55828      new_path="$input_path"
55829    fi
55830  fi
55831
55832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55833  if test "x$test_cygdrive_prefix" = x; then
55834    # As a simple fix, exclude /usr/bin since it's not a real path.
55835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55837      # a path prefixed by /cygdrive for fixpath to work.
55838      new_path="$CYGWIN_ROOT_PATH$input_path"
55839    fi
55840  fi
55841
55842
55843  if test "x$path" != "x$new_path"; then
55844    MSVC_DLL="$new_path"
55845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55847  fi
55848
55849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55850
55851  path="$MSVC_DLL"
55852  has_colon=`$ECHO $path | $GREP ^.:`
55853  new_path="$path"
55854  if test "x$has_colon" = x; then
55855    # Not in mixed or Windows style, start by that.
55856    new_path=`cmd //c echo $path`
55857  fi
55858
55859
55860  input_path="$new_path"
55861  # Check if we need to convert this using DOS-style short mode. If the path
55862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55863  # take no chances and rewrite it.
55864  # Note: m4 eats our [], so we need to use [ and ] instead.
55865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55866  if test "x$has_forbidden_chars" != x; then
55867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55869  fi
55870
55871
55872  windows_path="$new_path"
55873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55874    unix_path=`$CYGPATH -u "$windows_path"`
55875    new_path="$unix_path"
55876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55878    new_path="$unix_path"
55879  fi
55880
55881  if test "x$path" != "x$new_path"; then
55882    MSVC_DLL="$new_path"
55883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55885  fi
55886
55887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55889
55890    else
55891      # We're on a unix platform. Hooray! :)
55892      path="$MSVC_DLL"
55893      has_space=`$ECHO "$path" | $GREP " "`
55894      if test "x$has_space" != x; then
55895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55896$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55898      fi
55899
55900      # Use eval to expand a potential ~
55901      eval path="$path"
55902      if test ! -f "$path" && test ! -d "$path"; then
55903        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55904      fi
55905
55906      if test -d "$path"; then
55907        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55908      else
55909        dir="`$DIRNAME "$path"`"
55910        base="`$BASENAME "$path"`"
55911        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55912      fi
55913    fi
55914  fi
55915
55916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55917$as_echo_n "checking for $DLL_NAME... " >&6; }
55918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55919$as_echo "$MSVC_DLL" >&6; }
55920    else
55921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55922$as_echo "incorrect, ignoring" >&6; }
55923      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55924$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55925    fi
55926  fi
55927
55928    fi
55929  fi
55930
55931  if test "x$MSVC_DLL" = x; then
55932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55933$as_echo_n "checking for $DLL_NAME... " >&6; }
55934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55935$as_echo "no" >&6; }
55936    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55937  fi
55938
55939      MSVCP_DLL="$MSVC_DLL"
55940    fi
55941
55942  fi
55943
55944  fi
55945
55946
55947  if test "x$NEEDS_LIB_X11" = xfalse; then
55948    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55949      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55950$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55951    fi
55952    X_CFLAGS=
55953    X_LIBS=
55954  else
55955
55956    if test "x${with_x}" = xno; then
55957      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55958    fi
55959
55960    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55961      # The user has specified a X11 base directory. Use it for includes and
55962      # libraries, unless explicitly overridden.
55963      if test "x$x_includes" = xNONE; then
55964        x_includes="${with_x}/include"
55965      fi
55966      if test "x$x_libraries" = xNONE; then
55967        x_libraries="${with_x}/lib"
55968      fi
55969    else
55970      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55971      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55972      # --x-libraries for the sysroot, if that seems to be correct.
55973      if test "x$SYSROOT" != "x"; then
55974        if test "x$x_includes" = xNONE; then
55975          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55976            x_includes="$SYSROOT/usr/X11R6/include"
55977          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55978            x_includes="$SYSROOT/usr/include"
55979          fi
55980        fi
55981        if test "x$x_libraries" = xNONE; then
55982          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55983            x_libraries="$SYSROOT/usr/X11R6/lib"
55984          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55985            x_libraries="$SYSROOT/usr/lib64"
55986          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55987            x_libraries="$SYSROOT/usr/lib"
55988          fi
55989        fi
55990      fi
55991    fi
55992
55993    # Now let autoconf do it's magic
55994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55995$as_echo_n "checking for X... " >&6; }
55996
55997
55998# Check whether --with-x was given.
55999if test "${with_x+set}" = set; then :
56000  withval=$with_x;
56001fi
56002
56003# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56004if test "x$with_x" = xno; then
56005  # The user explicitly disabled X.
56006  have_x=disabled
56007else
56008  case $x_includes,$x_libraries in #(
56009    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56010    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56011  $as_echo_n "(cached) " >&6
56012else
56013  # One or both of the vars are not set, and there is no cached value.
56014ac_x_includes=no ac_x_libraries=no
56015rm -f -r conftest.dir
56016if mkdir conftest.dir; then
56017  cd conftest.dir
56018  cat >Imakefile <<'_ACEOF'
56019incroot:
56020	@echo incroot='${INCROOT}'
56021usrlibdir:
56022	@echo usrlibdir='${USRLIBDIR}'
56023libdir:
56024	@echo libdir='${LIBDIR}'
56025_ACEOF
56026  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56027    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56028    for ac_var in incroot usrlibdir libdir; do
56029      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56030    done
56031    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56032    for ac_extension in a so sl dylib la dll; do
56033      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56034	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56035	ac_im_usrlibdir=$ac_im_libdir; break
56036      fi
56037    done
56038    # Screen out bogus values from the imake configuration.  They are
56039    # bogus both because they are the default anyway, and because
56040    # using them would break gcc on systems where it needs fixed includes.
56041    case $ac_im_incroot in
56042	/usr/include) ac_x_includes= ;;
56043	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56044    esac
56045    case $ac_im_usrlibdir in
56046	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56047	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56048    esac
56049  fi
56050  cd ..
56051  rm -f -r conftest.dir
56052fi
56053
56054# Standard set of common directories for X headers.
56055# Check X11 before X11Rn because it is often a symlink to the current release.
56056ac_x_header_dirs='
56057/usr/X11/include
56058/usr/X11R7/include
56059/usr/X11R6/include
56060/usr/X11R5/include
56061/usr/X11R4/include
56062
56063/usr/include/X11
56064/usr/include/X11R7
56065/usr/include/X11R6
56066/usr/include/X11R5
56067/usr/include/X11R4
56068
56069/usr/local/X11/include
56070/usr/local/X11R7/include
56071/usr/local/X11R6/include
56072/usr/local/X11R5/include
56073/usr/local/X11R4/include
56074
56075/usr/local/include/X11
56076/usr/local/include/X11R7
56077/usr/local/include/X11R6
56078/usr/local/include/X11R5
56079/usr/local/include/X11R4
56080
56081/usr/X386/include
56082/usr/x386/include
56083/usr/XFree86/include/X11
56084
56085/usr/include
56086/usr/local/include
56087/usr/unsupported/include
56088/usr/athena/include
56089/usr/local/x11r5/include
56090/usr/lpp/Xamples/include
56091
56092/usr/openwin/include
56093/usr/openwin/share/include'
56094
56095if test "$ac_x_includes" = no; then
56096  # Guess where to find include files, by looking for Xlib.h.
56097  # First, try using that file with no special directory specified.
56098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56099/* end confdefs.h.  */
56100#include <X11/Xlib.h>
56101_ACEOF
56102if ac_fn_cxx_try_cpp "$LINENO"; then :
56103  # We can compile using X headers with no special include directory.
56104ac_x_includes=
56105else
56106  for ac_dir in $ac_x_header_dirs; do
56107  if test -r "$ac_dir/X11/Xlib.h"; then
56108    ac_x_includes=$ac_dir
56109    break
56110  fi
56111done
56112fi
56113rm -f conftest.err conftest.i conftest.$ac_ext
56114fi # $ac_x_includes = no
56115
56116if test "$ac_x_libraries" = no; then
56117  # Check for the libraries.
56118  # See if we find them without any special options.
56119  # Don't add to $LIBS permanently.
56120  ac_save_LIBS=$LIBS
56121  LIBS="-lX11 $LIBS"
56122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56123/* end confdefs.h.  */
56124#include <X11/Xlib.h>
56125int
56126main ()
56127{
56128XrmInitialize ()
56129  ;
56130  return 0;
56131}
56132_ACEOF
56133if ac_fn_cxx_try_link "$LINENO"; then :
56134  LIBS=$ac_save_LIBS
56135# We can link X programs with no special library path.
56136ac_x_libraries=
56137else
56138  LIBS=$ac_save_LIBS
56139for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56140do
56141  # Don't even attempt the hair of trying to link an X program!
56142  for ac_extension in a so sl dylib la dll; do
56143    if test -r "$ac_dir/libX11.$ac_extension"; then
56144      ac_x_libraries=$ac_dir
56145      break 2
56146    fi
56147  done
56148done
56149fi
56150rm -f core conftest.err conftest.$ac_objext \
56151    conftest$ac_exeext conftest.$ac_ext
56152fi # $ac_x_libraries = no
56153
56154case $ac_x_includes,$ac_x_libraries in #(
56155  no,* | *,no | *\'*)
56156    # Didn't find X, or a directory has "'" in its name.
56157    ac_cv_have_x="have_x=no";; #(
56158  *)
56159    # Record where we found X for the cache.
56160    ac_cv_have_x="have_x=yes\
56161	ac_x_includes='$ac_x_includes'\
56162	ac_x_libraries='$ac_x_libraries'"
56163esac
56164fi
56165;; #(
56166    *) have_x=yes;;
56167  esac
56168  eval "$ac_cv_have_x"
56169fi # $with_x != no
56170
56171if test "$have_x" != yes; then
56172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56173$as_echo "$have_x" >&6; }
56174  no_x=yes
56175else
56176  # If each of the values was on the command line, it overrides each guess.
56177  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56178  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56179  # Update the cache value to reflect the command line values.
56180  ac_cv_have_x="have_x=yes\
56181	ac_x_includes='$x_includes'\
56182	ac_x_libraries='$x_libraries'"
56183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56184$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56185fi
56186
56187    if test "$no_x" = yes; then
56188  # Not all programs may use this symbol, but it does not hurt to define it.
56189
56190$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56191
56192  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56193else
56194  if test -n "$x_includes"; then
56195    X_CFLAGS="$X_CFLAGS -I$x_includes"
56196  fi
56197
56198  # It would also be nice to do this for all -L options, not just this one.
56199  if test -n "$x_libraries"; then
56200    X_LIBS="$X_LIBS -L$x_libraries"
56201    # For Solaris; some versions of Sun CC require a space after -R and
56202    # others require no space.  Words are not sufficient . . . .
56203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56204$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56205    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56206    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56207    ac_cxx_werror_flag=yes
56208    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56209/* end confdefs.h.  */
56210
56211int
56212main ()
56213{
56214
56215  ;
56216  return 0;
56217}
56218_ACEOF
56219if ac_fn_cxx_try_link "$LINENO"; then :
56220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56221$as_echo "no" >&6; }
56222       X_LIBS="$X_LIBS -R$x_libraries"
56223else
56224  LIBS="$ac_xsave_LIBS -R $x_libraries"
56225       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56226/* end confdefs.h.  */
56227
56228int
56229main ()
56230{
56231
56232  ;
56233  return 0;
56234}
56235_ACEOF
56236if ac_fn_cxx_try_link "$LINENO"; then :
56237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56238$as_echo "yes" >&6; }
56239	  X_LIBS="$X_LIBS -R $x_libraries"
56240else
56241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56242$as_echo "neither works" >&6; }
56243fi
56244rm -f core conftest.err conftest.$ac_objext \
56245    conftest$ac_exeext conftest.$ac_ext
56246fi
56247rm -f core conftest.err conftest.$ac_objext \
56248    conftest$ac_exeext conftest.$ac_ext
56249    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56250    LIBS=$ac_xsave_LIBS
56251  fi
56252
56253  # Check for system-dependent libraries X programs must link with.
56254  # Do this before checking for the system-independent R6 libraries
56255  # (-lICE), since we may need -lsocket or whatever for X linking.
56256
56257  if test "$ISC" = yes; then
56258    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56259  else
56260    # Martyn Johnson says this is needed for Ultrix, if the X
56261    # libraries were built with DECnet support.  And Karl Berry says
56262    # the Alpha needs dnet_stub (dnet does not exist).
56263    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56264    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56265/* end confdefs.h.  */
56266
56267/* Override any GCC internal prototype to avoid an error.
56268   Use char because int might match the return type of a GCC
56269   builtin and then its argument prototype would still apply.  */
56270#ifdef __cplusplus
56271extern "C"
56272#endif
56273char XOpenDisplay ();
56274int
56275main ()
56276{
56277return XOpenDisplay ();
56278  ;
56279  return 0;
56280}
56281_ACEOF
56282if ac_fn_cxx_try_link "$LINENO"; then :
56283
56284else
56285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56286$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56287if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56288  $as_echo_n "(cached) " >&6
56289else
56290  ac_check_lib_save_LIBS=$LIBS
56291LIBS="-ldnet  $LIBS"
56292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56293/* end confdefs.h.  */
56294
56295/* Override any GCC internal prototype to avoid an error.
56296   Use char because int might match the return type of a GCC
56297   builtin and then its argument prototype would still apply.  */
56298#ifdef __cplusplus
56299extern "C"
56300#endif
56301char dnet_ntoa ();
56302int
56303main ()
56304{
56305return dnet_ntoa ();
56306  ;
56307  return 0;
56308}
56309_ACEOF
56310if ac_fn_cxx_try_link "$LINENO"; then :
56311  ac_cv_lib_dnet_dnet_ntoa=yes
56312else
56313  ac_cv_lib_dnet_dnet_ntoa=no
56314fi
56315rm -f core conftest.err conftest.$ac_objext \
56316    conftest$ac_exeext conftest.$ac_ext
56317LIBS=$ac_check_lib_save_LIBS
56318fi
56319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56320$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56321if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56322  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56323fi
56324
56325    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56327$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56328if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56329  $as_echo_n "(cached) " >&6
56330else
56331  ac_check_lib_save_LIBS=$LIBS
56332LIBS="-ldnet_stub  $LIBS"
56333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56334/* end confdefs.h.  */
56335
56336/* Override any GCC internal prototype to avoid an error.
56337   Use char because int might match the return type of a GCC
56338   builtin and then its argument prototype would still apply.  */
56339#ifdef __cplusplus
56340extern "C"
56341#endif
56342char dnet_ntoa ();
56343int
56344main ()
56345{
56346return dnet_ntoa ();
56347  ;
56348  return 0;
56349}
56350_ACEOF
56351if ac_fn_cxx_try_link "$LINENO"; then :
56352  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56353else
56354  ac_cv_lib_dnet_stub_dnet_ntoa=no
56355fi
56356rm -f core conftest.err conftest.$ac_objext \
56357    conftest$ac_exeext conftest.$ac_ext
56358LIBS=$ac_check_lib_save_LIBS
56359fi
56360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56361$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56362if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56363  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56364fi
56365
56366    fi
56367fi
56368rm -f core conftest.err conftest.$ac_objext \
56369    conftest$ac_exeext conftest.$ac_ext
56370    LIBS="$ac_xsave_LIBS"
56371
56372    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56373    # to get the SysV transport functions.
56374    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56375    # needs -lnsl.
56376    # The nsl library prevents programs from opening the X display
56377    # on Irix 5.2, according to T.E. Dickey.
56378    # The functions gethostbyname, getservbyname, and inet_addr are
56379    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56380    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56381if test "x$ac_cv_func_gethostbyname" = xyes; then :
56382
56383fi
56384
56385    if test $ac_cv_func_gethostbyname = no; then
56386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56387$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56388if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56389  $as_echo_n "(cached) " >&6
56390else
56391  ac_check_lib_save_LIBS=$LIBS
56392LIBS="-lnsl  $LIBS"
56393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56394/* end confdefs.h.  */
56395
56396/* Override any GCC internal prototype to avoid an error.
56397   Use char because int might match the return type of a GCC
56398   builtin and then its argument prototype would still apply.  */
56399#ifdef __cplusplus
56400extern "C"
56401#endif
56402char gethostbyname ();
56403int
56404main ()
56405{
56406return gethostbyname ();
56407  ;
56408  return 0;
56409}
56410_ACEOF
56411if ac_fn_cxx_try_link "$LINENO"; then :
56412  ac_cv_lib_nsl_gethostbyname=yes
56413else
56414  ac_cv_lib_nsl_gethostbyname=no
56415fi
56416rm -f core conftest.err conftest.$ac_objext \
56417    conftest$ac_exeext conftest.$ac_ext
56418LIBS=$ac_check_lib_save_LIBS
56419fi
56420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56421$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56422if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56423  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56424fi
56425
56426      if test $ac_cv_lib_nsl_gethostbyname = no; then
56427	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56428$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56429if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56430  $as_echo_n "(cached) " >&6
56431else
56432  ac_check_lib_save_LIBS=$LIBS
56433LIBS="-lbsd  $LIBS"
56434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56435/* end confdefs.h.  */
56436
56437/* Override any GCC internal prototype to avoid an error.
56438   Use char because int might match the return type of a GCC
56439   builtin and then its argument prototype would still apply.  */
56440#ifdef __cplusplus
56441extern "C"
56442#endif
56443char gethostbyname ();
56444int
56445main ()
56446{
56447return gethostbyname ();
56448  ;
56449  return 0;
56450}
56451_ACEOF
56452if ac_fn_cxx_try_link "$LINENO"; then :
56453  ac_cv_lib_bsd_gethostbyname=yes
56454else
56455  ac_cv_lib_bsd_gethostbyname=no
56456fi
56457rm -f core conftest.err conftest.$ac_objext \
56458    conftest$ac_exeext conftest.$ac_ext
56459LIBS=$ac_check_lib_save_LIBS
56460fi
56461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56462$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56463if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56464  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56465fi
56466
56467      fi
56468    fi
56469
56470    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56471    # socket/setsockopt and other routines are undefined under SCO ODT
56472    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56473    # on later versions), says Simon Leinen: it contains gethostby*
56474    # variants that don't use the name server (or something).  -lsocket
56475    # must be given before -lnsl if both are needed.  We assume that
56476    # if connect needs -lnsl, so does gethostbyname.
56477    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56478if test "x$ac_cv_func_connect" = xyes; then :
56479
56480fi
56481
56482    if test $ac_cv_func_connect = no; then
56483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56484$as_echo_n "checking for connect in -lsocket... " >&6; }
56485if ${ac_cv_lib_socket_connect+:} false; then :
56486  $as_echo_n "(cached) " >&6
56487else
56488  ac_check_lib_save_LIBS=$LIBS
56489LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56491/* end confdefs.h.  */
56492
56493/* Override any GCC internal prototype to avoid an error.
56494   Use char because int might match the return type of a GCC
56495   builtin and then its argument prototype would still apply.  */
56496#ifdef __cplusplus
56497extern "C"
56498#endif
56499char connect ();
56500int
56501main ()
56502{
56503return connect ();
56504  ;
56505  return 0;
56506}
56507_ACEOF
56508if ac_fn_cxx_try_link "$LINENO"; then :
56509  ac_cv_lib_socket_connect=yes
56510else
56511  ac_cv_lib_socket_connect=no
56512fi
56513rm -f core conftest.err conftest.$ac_objext \
56514    conftest$ac_exeext conftest.$ac_ext
56515LIBS=$ac_check_lib_save_LIBS
56516fi
56517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56518$as_echo "$ac_cv_lib_socket_connect" >&6; }
56519if test "x$ac_cv_lib_socket_connect" = xyes; then :
56520  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56521fi
56522
56523    fi
56524
56525    # Guillermo Gomez says -lposix is necessary on A/UX.
56526    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56527if test "x$ac_cv_func_remove" = xyes; then :
56528
56529fi
56530
56531    if test $ac_cv_func_remove = no; then
56532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56533$as_echo_n "checking for remove in -lposix... " >&6; }
56534if ${ac_cv_lib_posix_remove+:} false; then :
56535  $as_echo_n "(cached) " >&6
56536else
56537  ac_check_lib_save_LIBS=$LIBS
56538LIBS="-lposix  $LIBS"
56539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56540/* end confdefs.h.  */
56541
56542/* Override any GCC internal prototype to avoid an error.
56543   Use char because int might match the return type of a GCC
56544   builtin and then its argument prototype would still apply.  */
56545#ifdef __cplusplus
56546extern "C"
56547#endif
56548char remove ();
56549int
56550main ()
56551{
56552return remove ();
56553  ;
56554  return 0;
56555}
56556_ACEOF
56557if ac_fn_cxx_try_link "$LINENO"; then :
56558  ac_cv_lib_posix_remove=yes
56559else
56560  ac_cv_lib_posix_remove=no
56561fi
56562rm -f core conftest.err conftest.$ac_objext \
56563    conftest$ac_exeext conftest.$ac_ext
56564LIBS=$ac_check_lib_save_LIBS
56565fi
56566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56567$as_echo "$ac_cv_lib_posix_remove" >&6; }
56568if test "x$ac_cv_lib_posix_remove" = xyes; then :
56569  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56570fi
56571
56572    fi
56573
56574    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56575    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56576if test "x$ac_cv_func_shmat" = xyes; then :
56577
56578fi
56579
56580    if test $ac_cv_func_shmat = no; then
56581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56582$as_echo_n "checking for shmat in -lipc... " >&6; }
56583if ${ac_cv_lib_ipc_shmat+:} false; then :
56584  $as_echo_n "(cached) " >&6
56585else
56586  ac_check_lib_save_LIBS=$LIBS
56587LIBS="-lipc  $LIBS"
56588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56589/* end confdefs.h.  */
56590
56591/* Override any GCC internal prototype to avoid an error.
56592   Use char because int might match the return type of a GCC
56593   builtin and then its argument prototype would still apply.  */
56594#ifdef __cplusplus
56595extern "C"
56596#endif
56597char shmat ();
56598int
56599main ()
56600{
56601return shmat ();
56602  ;
56603  return 0;
56604}
56605_ACEOF
56606if ac_fn_cxx_try_link "$LINENO"; then :
56607  ac_cv_lib_ipc_shmat=yes
56608else
56609  ac_cv_lib_ipc_shmat=no
56610fi
56611rm -f core conftest.err conftest.$ac_objext \
56612    conftest$ac_exeext conftest.$ac_ext
56613LIBS=$ac_check_lib_save_LIBS
56614fi
56615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56616$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56617if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56618  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56619fi
56620
56621    fi
56622  fi
56623
56624  # Check for libraries that X11R6 Xt/Xaw programs need.
56625  ac_save_LDFLAGS=$LDFLAGS
56626  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56627  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56628  # check for ICE first), but we must link in the order -lSM -lICE or
56629  # we get undefined symbols.  So assume we have SM if we have ICE.
56630  # These have to be linked with before -lX11, unlike the other
56631  # libraries we check for below, so use a different variable.
56632  # John Interrante, Karl Berry
56633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56634$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56635if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56636  $as_echo_n "(cached) " >&6
56637else
56638  ac_check_lib_save_LIBS=$LIBS
56639LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56641/* end confdefs.h.  */
56642
56643/* Override any GCC internal prototype to avoid an error.
56644   Use char because int might match the return type of a GCC
56645   builtin and then its argument prototype would still apply.  */
56646#ifdef __cplusplus
56647extern "C"
56648#endif
56649char IceConnectionNumber ();
56650int
56651main ()
56652{
56653return IceConnectionNumber ();
56654  ;
56655  return 0;
56656}
56657_ACEOF
56658if ac_fn_cxx_try_link "$LINENO"; then :
56659  ac_cv_lib_ICE_IceConnectionNumber=yes
56660else
56661  ac_cv_lib_ICE_IceConnectionNumber=no
56662fi
56663rm -f core conftest.err conftest.$ac_objext \
56664    conftest$ac_exeext conftest.$ac_ext
56665LIBS=$ac_check_lib_save_LIBS
56666fi
56667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56668$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56669if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56670  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56671fi
56672
56673  LDFLAGS=$ac_save_LDFLAGS
56674
56675fi
56676
56677
56678    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56679    # this doesn't make sense so we remove it.
56680    if test "x$COMPILE_TYPE" = xcross; then
56681      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56682    fi
56683
56684    if test "x$no_x" = xyes; then
56685
56686  # Print a helpful message on how to acquire the necessary build dependency.
56687  # x11 is the help tag: freetype, cups, alsa etc
56688  MISSING_DEPENDENCY=x11
56689
56690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56691    cygwin_help $MISSING_DEPENDENCY
56692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56693    msys_help $MISSING_DEPENDENCY
56694  else
56695    PKGHANDLER_COMMAND=
56696
56697    case $PKGHANDLER in
56698      apt-get)
56699        apt_help     $MISSING_DEPENDENCY ;;
56700      yum)
56701        yum_help     $MISSING_DEPENDENCY ;;
56702      brew)
56703        brew_help    $MISSING_DEPENDENCY ;;
56704      port)
56705        port_help    $MISSING_DEPENDENCY ;;
56706      pkgutil)
56707        pkgutil_help $MISSING_DEPENDENCY ;;
56708      pkgadd)
56709        pkgadd_help  $MISSING_DEPENDENCY ;;
56710    esac
56711
56712    if test "x$PKGHANDLER_COMMAND" != x; then
56713      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56714    fi
56715  fi
56716
56717      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56718    fi
56719
56720    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56721      OPENWIN_HOME="/usr/openwin"
56722      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56723      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56724          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56725    fi
56726
56727    ac_ext=c
56728ac_cpp='$CPP $CPPFLAGS'
56729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56731ac_compiler_gnu=$ac_cv_c_compiler_gnu
56732
56733    OLD_CFLAGS="$CFLAGS"
56734    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56735
56736    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56737    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56738do :
56739  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56740ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56741          # include <X11/Xlib.h>
56742          # include <X11/Xutil.h>
56743
56744
56745"
56746if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56747  cat >>confdefs.h <<_ACEOF
56748#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56749_ACEOF
56750 X11_HEADERS_OK=yes
56751else
56752  X11_HEADERS_OK=no; break
56753fi
56754
56755done
56756
56757
56758    if test "x$X11_HEADERS_OK" = xno; then
56759
56760  # Print a helpful message on how to acquire the necessary build dependency.
56761  # x11 is the help tag: freetype, cups, alsa etc
56762  MISSING_DEPENDENCY=x11
56763
56764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56765    cygwin_help $MISSING_DEPENDENCY
56766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56767    msys_help $MISSING_DEPENDENCY
56768  else
56769    PKGHANDLER_COMMAND=
56770
56771    case $PKGHANDLER in
56772      apt-get)
56773        apt_help     $MISSING_DEPENDENCY ;;
56774      yum)
56775        yum_help     $MISSING_DEPENDENCY ;;
56776      brew)
56777        brew_help    $MISSING_DEPENDENCY ;;
56778      port)
56779        port_help    $MISSING_DEPENDENCY ;;
56780      pkgutil)
56781        pkgutil_help $MISSING_DEPENDENCY ;;
56782      pkgadd)
56783        pkgadd_help  $MISSING_DEPENDENCY ;;
56784    esac
56785
56786    if test "x$PKGHANDLER_COMMAND" != x; then
56787      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56788    fi
56789  fi
56790
56791      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56792    fi
56793
56794    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56795    # defined in libawt_xawt.
56796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56797$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56798    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56799/* end confdefs.h.  */
56800#include <X11/extensions/Xrender.h>
56801int
56802main ()
56803{
56804XLinearGradient x;
56805  ;
56806  return 0;
56807}
56808_ACEOF
56809if ac_fn_c_try_compile "$LINENO"; then :
56810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56811$as_echo "yes" >&6; }
56812else
56813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56814$as_echo "no" >&6; }
56815         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56816fi
56817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56818
56819    CFLAGS="$OLD_CFLAGS"
56820    ac_ext=cpp
56821ac_cpp='$CXXCPP $CPPFLAGS'
56822ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56823ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56824ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56825
56826  fi # NEEDS_LIB_X11
56827
56828
56829
56830
56831
56832
56833# Check whether --with-cups was given.
56834if test "${with_cups+set}" = set; then :
56835  withval=$with_cups;
56836fi
56837
56838
56839# Check whether --with-cups-include was given.
56840if test "${with_cups_include+set}" = set; then :
56841  withval=$with_cups_include;
56842fi
56843
56844
56845  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56846    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56847        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56848      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56849$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56850    fi
56851    CUPS_CFLAGS=
56852  else
56853    CUPS_FOUND=no
56854
56855    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56856      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56857    fi
56858
56859    if test "x${with_cups}" != x; then
56860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56861$as_echo_n "checking for cups headers... " >&6; }
56862      if test -s "${with_cups}/include/cups/cups.h"; then
56863        CUPS_CFLAGS="-I${with_cups}/include"
56864        CUPS_FOUND=yes
56865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56866$as_echo "$CUPS_FOUND" >&6; }
56867      else
56868        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56869      fi
56870    fi
56871    if test "x${with_cups_include}" != x; then
56872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56873$as_echo_n "checking for cups headers... " >&6; }
56874      if test -s "${with_cups_include}/cups/cups.h"; then
56875        CUPS_CFLAGS="-I${with_cups_include}"
56876        CUPS_FOUND=yes
56877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56878$as_echo "$CUPS_FOUND" >&6; }
56879      else
56880        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56881      fi
56882    fi
56883    if test "x$CUPS_FOUND" = xno; then
56884      # Are the cups headers installed in the default /usr/include location?
56885      for ac_header in cups/cups.h cups/ppd.h
56886do :
56887  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56888ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56889if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56890  cat >>confdefs.h <<_ACEOF
56891#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56892_ACEOF
56893
56894          CUPS_FOUND=yes
56895          CUPS_CFLAGS=
56896          DEFAULT_CUPS=yes
56897
56898fi
56899
56900done
56901
56902    fi
56903    if test "x$CUPS_FOUND" = xno; then
56904
56905  # Print a helpful message on how to acquire the necessary build dependency.
56906  # cups is the help tag: freetype, cups, alsa etc
56907  MISSING_DEPENDENCY=cups
56908
56909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56910    cygwin_help $MISSING_DEPENDENCY
56911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56912    msys_help $MISSING_DEPENDENCY
56913  else
56914    PKGHANDLER_COMMAND=
56915
56916    case $PKGHANDLER in
56917      apt-get)
56918        apt_help     $MISSING_DEPENDENCY ;;
56919      yum)
56920        yum_help     $MISSING_DEPENDENCY ;;
56921      brew)
56922        brew_help    $MISSING_DEPENDENCY ;;
56923      port)
56924        port_help    $MISSING_DEPENDENCY ;;
56925      pkgutil)
56926        pkgutil_help $MISSING_DEPENDENCY ;;
56927      pkgadd)
56928        pkgadd_help  $MISSING_DEPENDENCY ;;
56929    esac
56930
56931    if test "x$PKGHANDLER_COMMAND" != x; then
56932      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56933    fi
56934  fi
56935
56936      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56937    fi
56938  fi
56939
56940
56941
56942
56943
56944# Check whether --with-freetype was given.
56945if test "${with_freetype+set}" = set; then :
56946  withval=$with_freetype;
56947fi
56948
56949
56950# Check whether --with-freetype-include was given.
56951if test "${with_freetype_include+set}" = set; then :
56952  withval=$with_freetype_include;
56953fi
56954
56955
56956# Check whether --with-freetype-lib was given.
56957if test "${with_freetype_lib+set}" = set; then :
56958  withval=$with_freetype_lib;
56959fi
56960
56961
56962# Check whether --with-freetype-src was given.
56963if test "${with_freetype_src+set}" = set; then :
56964  withval=$with_freetype_src;
56965fi
56966
56967  # Check whether --enable-freetype-bundling was given.
56968if test "${enable_freetype_bundling+set}" = set; then :
56969  enableval=$enable_freetype_bundling;
56970fi
56971
56972
56973  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56974  FREETYPE_BASE_NAME=freetype
56975  FREETYPE_CFLAGS=
56976  FREETYPE_LIBS=
56977  FREETYPE_BUNDLE_LIB_PATH=
56978
56979  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56980    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56981        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56982        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56983        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56984      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56985$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56986    fi
56987    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56988      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56989$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56990    fi
56991  else
56992    # freetype is needed to build; go get it!
56993
56994    BUNDLE_FREETYPE="$enable_freetype_bundling"
56995
56996    if  test "x$with_freetype_src" != x; then
56997      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56998        # Try to build freetype if --with-freetype-src was given on Windows
56999
57000  FREETYPE_SRC_PATH="$with_freetype_src"
57001  BUILD_FREETYPE=yes
57002
57003  # Check if the freetype sources are acessible..
57004  if ! test -d $FREETYPE_SRC_PATH; then
57005    { $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
57006$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57007    BUILD_FREETYPE=no
57008  fi
57009  # ..and contain a vc2010 project file
57010  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57011  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57012    { $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
57013$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57014    BUILD_FREETYPE=no
57015  fi
57016  # Now check if configure found a version of 'msbuild.exe'
57017  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57018    { $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
57019$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;}
57020    BUILD_FREETYPE=no
57021  fi
57022
57023  # Ready to go..
57024  if test "x$BUILD_FREETYPE" = xyes; then
57025    # msbuild requires trailing slashes for output directories
57026    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57027    freetype_lib_path_unix="$freetype_lib_path"
57028    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57029
57030  unix_path="$vcxproj_path"
57031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57032    windows_path=`$CYGPATH -m "$unix_path"`
57033    vcxproj_path="$windows_path"
57034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57035    windows_path=`cmd //c echo $unix_path`
57036    vcxproj_path="$windows_path"
57037  fi
57038
57039
57040  unix_path="$freetype_lib_path"
57041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57042    windows_path=`$CYGPATH -m "$unix_path"`
57043    freetype_lib_path="$windows_path"
57044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57045    windows_path=`cmd //c echo $unix_path`
57046    freetype_lib_path="$windows_path"
57047  fi
57048
57049
57050  unix_path="$freetype_obj_path"
57051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57052    windows_path=`$CYGPATH -m "$unix_path"`
57053    freetype_obj_path="$windows_path"
57054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57055    windows_path=`cmd //c echo $unix_path`
57056    freetype_obj_path="$windows_path"
57057  fi
57058
57059    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57060      freetype_platform=x64
57061    else
57062      freetype_platform=win32
57063    fi
57064
57065    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57066    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57067    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57068    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57069    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57070$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57071
57072    # First we try to build the freetype.dll
57073    $ECHO -e "@echo off\n"\
57074        "$MSBUILD $vcxproj_path "\
57075        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57076        "/p:Configuration=\"Release Multithreaded\" "\
57077        "/p:Platform=$freetype_platform "\
57078        "/p:ConfigurationType=DynamicLibrary "\
57079        "/p:TargetName=freetype "\
57080        "/p:OutDir=\"$freetype_lib_path\" "\
57081        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57082    cmd /c freetype.bat
57083
57084    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57085      # If that succeeds we also build freetype.lib
57086      $ECHO -e "@echo off\n"\
57087          "$MSBUILD $vcxproj_path "\
57088          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57089          "/p:Configuration=\"Release Multithreaded\" "\
57090          "/p:Platform=$freetype_platform "\
57091          "/p:ConfigurationType=StaticLibrary "\
57092          "/p:TargetName=freetype "\
57093          "/p:OutDir=\"$freetype_lib_path\" "\
57094          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57095      cmd /c freetype.bat
57096
57097      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57098        # Once we build both, lib and dll, set freetype lib and include path appropriately
57099        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57100        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57101        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57102$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57103      else
57104        BUILD_FREETYPE=no
57105      fi
57106    else
57107      BUILD_FREETYPE=no
57108    fi
57109  fi
57110
57111        if test "x$BUILD_FREETYPE" = xyes; then
57112          # Okay, we built it. Check that it works.
57113
57114  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57115  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57116  METHOD="--with-freetype-src"
57117
57118  # Let's start with an optimistic view of the world :-)
57119  FOUND_FREETYPE=yes
57120
57121  # First look for the canonical freetype main include file ft2build.h.
57122  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57123    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57124    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57125    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57126      # Fail.
57127      FOUND_FREETYPE=no
57128    fi
57129  fi
57130
57131  if test "x$FOUND_FREETYPE" = xyes; then
57132    # Include file found, let's continue the sanity check.
57133    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57134$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57135
57136    # Reset to default value
57137    FREETYPE_BASE_NAME=freetype
57138    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57139    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57140      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57141          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57142        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57143        # for the .6 version explicitly.
57144        FREETYPE_BASE_NAME=freetype.6
57145        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57146        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57147$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57148      else
57149        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57150$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57151        FOUND_FREETYPE=no
57152      fi
57153    else
57154      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57155        # On Windows, we will need both .lib and .dll file.
57156        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57157          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57158$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57159          FOUND_FREETYPE=no
57160        fi
57161      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57162          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57163        # Found lib in isa dir, use that instead.
57164        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57165        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57166$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57167      fi
57168    fi
57169  fi
57170
57171  if test "x$FOUND_FREETYPE" = xyes; then
57172
57173  # Only process if variable expands to non-empty
57174
57175  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57177
57178  # Input might be given as Windows format, start by converting to
57179  # unix format.
57180  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57181  new_path=`$CYGPATH -u "$path"`
57182
57183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57186  # "foo.exe" is OK but "foo" is an error.
57187  #
57188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57189  # It is also a way to make sure we got the proper file name for the real test later on.
57190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57191  if test "x$test_shortpath" = x; then
57192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57193$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57194    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57195  fi
57196
57197  # Call helper function which possibly converts this using DOS-style short mode.
57198  # If so, the updated path is stored in $new_path.
57199
57200  input_path="$new_path"
57201  # Check if we need to convert this using DOS-style short mode. If the path
57202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57203  # take no chances and rewrite it.
57204  # Note: m4 eats our [], so we need to use [ and ] instead.
57205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57206  if test "x$has_forbidden_chars" != x; then
57207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57211      # Going to short mode and back again did indeed matter. Since short mode is
57212      # case insensitive, let's make it lowercase to improve readability.
57213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57214      # Now convert it back to Unix-style (cygpath)
57215      input_path=`$CYGPATH -u "$shortmode_path"`
57216      new_path="$input_path"
57217    fi
57218  fi
57219
57220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57221  if test "x$test_cygdrive_prefix" = x; then
57222    # As a simple fix, exclude /usr/bin since it's not a real path.
57223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57225      # a path prefixed by /cygdrive for fixpath to work.
57226      new_path="$CYGWIN_ROOT_PATH$input_path"
57227    fi
57228  fi
57229
57230
57231  if test "x$path" != "x$new_path"; then
57232    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57234$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57235  fi
57236
57237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57238
57239  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57240  has_colon=`$ECHO $path | $GREP ^.:`
57241  new_path="$path"
57242  if test "x$has_colon" = x; then
57243    # Not in mixed or Windows style, start by that.
57244    new_path=`cmd //c echo $path`
57245  fi
57246
57247
57248  input_path="$new_path"
57249  # Check if we need to convert this using DOS-style short mode. If the path
57250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57251  # take no chances and rewrite it.
57252  # Note: m4 eats our [], so we need to use [ and ] instead.
57253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57254  if test "x$has_forbidden_chars" != x; then
57255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57257  fi
57258
57259
57260  windows_path="$new_path"
57261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57262    unix_path=`$CYGPATH -u "$windows_path"`
57263    new_path="$unix_path"
57264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57266    new_path="$unix_path"
57267  fi
57268
57269  if test "x$path" != "x$new_path"; then
57270    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57273  fi
57274
57275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57277
57278    else
57279      # We're on a unix platform. Hooray! :)
57280      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57281      has_space=`$ECHO "$path" | $GREP " "`
57282      if test "x$has_space" != x; then
57283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57286      fi
57287
57288      # Use eval to expand a potential ~
57289      eval path="$path"
57290      if test ! -f "$path" && test ! -d "$path"; then
57291        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57292      fi
57293
57294      if test -d "$path"; then
57295        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57296      else
57297        dir="`$DIRNAME "$path"`"
57298        base="`$BASENAME "$path"`"
57299        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57300      fi
57301    fi
57302  fi
57303
57304
57305  # Only process if variable expands to non-empty
57306
57307  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57309
57310  # Input might be given as Windows format, start by converting to
57311  # unix format.
57312  path="$POTENTIAL_FREETYPE_LIB_PATH"
57313  new_path=`$CYGPATH -u "$path"`
57314
57315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57318  # "foo.exe" is OK but "foo" is an error.
57319  #
57320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57321  # It is also a way to make sure we got the proper file name for the real test later on.
57322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57323  if test "x$test_shortpath" = x; then
57324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57326    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57327  fi
57328
57329  # Call helper function which possibly converts this using DOS-style short mode.
57330  # If so, the updated path is stored in $new_path.
57331
57332  input_path="$new_path"
57333  # Check if we need to convert this using DOS-style short mode. If the path
57334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57335  # take no chances and rewrite it.
57336  # Note: m4 eats our [], so we need to use [ and ] instead.
57337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57338  if test "x$has_forbidden_chars" != x; then
57339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57343      # Going to short mode and back again did indeed matter. Since short mode is
57344      # case insensitive, let's make it lowercase to improve readability.
57345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57346      # Now convert it back to Unix-style (cygpath)
57347      input_path=`$CYGPATH -u "$shortmode_path"`
57348      new_path="$input_path"
57349    fi
57350  fi
57351
57352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57353  if test "x$test_cygdrive_prefix" = x; then
57354    # As a simple fix, exclude /usr/bin since it's not a real path.
57355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57357      # a path prefixed by /cygdrive for fixpath to work.
57358      new_path="$CYGWIN_ROOT_PATH$input_path"
57359    fi
57360  fi
57361
57362
57363  if test "x$path" != "x$new_path"; then
57364    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57367  fi
57368
57369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57370
57371  path="$POTENTIAL_FREETYPE_LIB_PATH"
57372  has_colon=`$ECHO $path | $GREP ^.:`
57373  new_path="$path"
57374  if test "x$has_colon" = x; then
57375    # Not in mixed or Windows style, start by that.
57376    new_path=`cmd //c echo $path`
57377  fi
57378
57379
57380  input_path="$new_path"
57381  # Check if we need to convert this using DOS-style short mode. If the path
57382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57383  # take no chances and rewrite it.
57384  # Note: m4 eats our [], so we need to use [ and ] instead.
57385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57386  if test "x$has_forbidden_chars" != x; then
57387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57389  fi
57390
57391
57392  windows_path="$new_path"
57393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57394    unix_path=`$CYGPATH -u "$windows_path"`
57395    new_path="$unix_path"
57396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57398    new_path="$unix_path"
57399  fi
57400
57401  if test "x$path" != "x$new_path"; then
57402    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57405  fi
57406
57407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57409
57410    else
57411      # We're on a unix platform. Hooray! :)
57412      path="$POTENTIAL_FREETYPE_LIB_PATH"
57413      has_space=`$ECHO "$path" | $GREP " "`
57414      if test "x$has_space" != x; then
57415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57418      fi
57419
57420      # Use eval to expand a potential ~
57421      eval path="$path"
57422      if test ! -f "$path" && test ! -d "$path"; then
57423        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57424      fi
57425
57426      if test -d "$path"; then
57427        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57428      else
57429        dir="`$DIRNAME "$path"`"
57430        base="`$BASENAME "$path"`"
57431        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57432      fi
57433    fi
57434  fi
57435
57436
57437    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57439$as_echo_n "checking for freetype includes... " >&6; }
57440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57441$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57442    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57444$as_echo_n "checking for freetype libraries... " >&6; }
57445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57446$as_echo "$FREETYPE_LIB_PATH" >&6; }
57447  fi
57448
57449          if test "x$FOUND_FREETYPE" != xyes; then
57450            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57451          fi
57452        else
57453          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57454$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57455          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57456        fi
57457      else
57458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57459$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57460      fi
57461    fi
57462
57463    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57464      # User has specified settings
57465
57466      if test "x$BUNDLE_FREETYPE" = x; then
57467        # If not specified, default is to bundle freetype
57468        BUNDLE_FREETYPE=yes
57469      fi
57470
57471      if test "x$with_freetype" != x; then
57472        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57473        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57474      fi
57475
57476      # Allow --with-freetype-lib and --with-freetype-include to override
57477      if test "x$with_freetype_include" != x; then
57478        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57479      fi
57480      if test "x$with_freetype_lib" != x; then
57481        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57482      fi
57483
57484      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57485        # Okay, we got it. Check that it works.
57486
57487  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57488  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57489  METHOD="--with-freetype"
57490
57491  # Let's start with an optimistic view of the world :-)
57492  FOUND_FREETYPE=yes
57493
57494  # First look for the canonical freetype main include file ft2build.h.
57495  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57496    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57497    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57498    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57499      # Fail.
57500      FOUND_FREETYPE=no
57501    fi
57502  fi
57503
57504  if test "x$FOUND_FREETYPE" = xyes; then
57505    # Include file found, let's continue the sanity check.
57506    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57507$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57508
57509    # Reset to default value
57510    FREETYPE_BASE_NAME=freetype
57511    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57512    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57513      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57514          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57515        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57516        # for the .6 version explicitly.
57517        FREETYPE_BASE_NAME=freetype.6
57518        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57519        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57520$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57521      else
57522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57524        FOUND_FREETYPE=no
57525      fi
57526    else
57527      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57528        # On Windows, we will need both .lib and .dll file.
57529        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57530          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57531$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57532          FOUND_FREETYPE=no
57533        fi
57534      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57535          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57536        # Found lib in isa dir, use that instead.
57537        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57538        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57539$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57540      fi
57541    fi
57542  fi
57543
57544  if test "x$FOUND_FREETYPE" = xyes; then
57545
57546  # Only process if variable expands to non-empty
57547
57548  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57550
57551  # Input might be given as Windows format, start by converting to
57552  # unix format.
57553  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57554  new_path=`$CYGPATH -u "$path"`
57555
57556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57559  # "foo.exe" is OK but "foo" is an error.
57560  #
57561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57562  # It is also a way to make sure we got the proper file name for the real test later on.
57563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57564  if test "x$test_shortpath" = x; then
57565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57566$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57567    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57568  fi
57569
57570  # Call helper function which possibly converts this using DOS-style short mode.
57571  # If so, the updated path is stored in $new_path.
57572
57573  input_path="$new_path"
57574  # Check if we need to convert this using DOS-style short mode. If the path
57575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57576  # take no chances and rewrite it.
57577  # Note: m4 eats our [], so we need to use [ and ] instead.
57578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57579  if test "x$has_forbidden_chars" != x; then
57580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57584      # Going to short mode and back again did indeed matter. Since short mode is
57585      # case insensitive, let's make it lowercase to improve readability.
57586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57587      # Now convert it back to Unix-style (cygpath)
57588      input_path=`$CYGPATH -u "$shortmode_path"`
57589      new_path="$input_path"
57590    fi
57591  fi
57592
57593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57594  if test "x$test_cygdrive_prefix" = x; then
57595    # As a simple fix, exclude /usr/bin since it's not a real path.
57596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57598      # a path prefixed by /cygdrive for fixpath to work.
57599      new_path="$CYGWIN_ROOT_PATH$input_path"
57600    fi
57601  fi
57602
57603
57604  if test "x$path" != "x$new_path"; then
57605    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57607$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57608  fi
57609
57610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57611
57612  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57613  has_colon=`$ECHO $path | $GREP ^.:`
57614  new_path="$path"
57615  if test "x$has_colon" = x; then
57616    # Not in mixed or Windows style, start by that.
57617    new_path=`cmd //c echo $path`
57618  fi
57619
57620
57621  input_path="$new_path"
57622  # Check if we need to convert this using DOS-style short mode. If the path
57623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57624  # take no chances and rewrite it.
57625  # Note: m4 eats our [], so we need to use [ and ] instead.
57626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57627  if test "x$has_forbidden_chars" != x; then
57628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57630  fi
57631
57632
57633  windows_path="$new_path"
57634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57635    unix_path=`$CYGPATH -u "$windows_path"`
57636    new_path="$unix_path"
57637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57639    new_path="$unix_path"
57640  fi
57641
57642  if test "x$path" != "x$new_path"; then
57643    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57646  fi
57647
57648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57650
57651    else
57652      # We're on a unix platform. Hooray! :)
57653      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57654      has_space=`$ECHO "$path" | $GREP " "`
57655      if test "x$has_space" != x; then
57656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57659      fi
57660
57661      # Use eval to expand a potential ~
57662      eval path="$path"
57663      if test ! -f "$path" && test ! -d "$path"; then
57664        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57665      fi
57666
57667      if test -d "$path"; then
57668        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57669      else
57670        dir="`$DIRNAME "$path"`"
57671        base="`$BASENAME "$path"`"
57672        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57673      fi
57674    fi
57675  fi
57676
57677
57678  # Only process if variable expands to non-empty
57679
57680  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57682
57683  # Input might be given as Windows format, start by converting to
57684  # unix format.
57685  path="$POTENTIAL_FREETYPE_LIB_PATH"
57686  new_path=`$CYGPATH -u "$path"`
57687
57688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57691  # "foo.exe" is OK but "foo" is an error.
57692  #
57693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57694  # It is also a way to make sure we got the proper file name for the real test later on.
57695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57696  if test "x$test_shortpath" = x; then
57697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57699    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57700  fi
57701
57702  # Call helper function which possibly converts this using DOS-style short mode.
57703  # If so, the updated path is stored in $new_path.
57704
57705  input_path="$new_path"
57706  # Check if we need to convert this using DOS-style short mode. If the path
57707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57708  # take no chances and rewrite it.
57709  # Note: m4 eats our [], so we need to use [ and ] instead.
57710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57711  if test "x$has_forbidden_chars" != x; then
57712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57716      # Going to short mode and back again did indeed matter. Since short mode is
57717      # case insensitive, let's make it lowercase to improve readability.
57718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57719      # Now convert it back to Unix-style (cygpath)
57720      input_path=`$CYGPATH -u "$shortmode_path"`
57721      new_path="$input_path"
57722    fi
57723  fi
57724
57725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57726  if test "x$test_cygdrive_prefix" = x; then
57727    # As a simple fix, exclude /usr/bin since it's not a real path.
57728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57730      # a path prefixed by /cygdrive for fixpath to work.
57731      new_path="$CYGWIN_ROOT_PATH$input_path"
57732    fi
57733  fi
57734
57735
57736  if test "x$path" != "x$new_path"; then
57737    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57740  fi
57741
57742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57743
57744  path="$POTENTIAL_FREETYPE_LIB_PATH"
57745  has_colon=`$ECHO $path | $GREP ^.:`
57746  new_path="$path"
57747  if test "x$has_colon" = x; then
57748    # Not in mixed or Windows style, start by that.
57749    new_path=`cmd //c echo $path`
57750  fi
57751
57752
57753  input_path="$new_path"
57754  # Check if we need to convert this using DOS-style short mode. If the path
57755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57756  # take no chances and rewrite it.
57757  # Note: m4 eats our [], so we need to use [ and ] instead.
57758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57759  if test "x$has_forbidden_chars" != x; then
57760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57762  fi
57763
57764
57765  windows_path="$new_path"
57766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57767    unix_path=`$CYGPATH -u "$windows_path"`
57768    new_path="$unix_path"
57769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57771    new_path="$unix_path"
57772  fi
57773
57774  if test "x$path" != "x$new_path"; then
57775    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57778  fi
57779
57780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57782
57783    else
57784      # We're on a unix platform. Hooray! :)
57785      path="$POTENTIAL_FREETYPE_LIB_PATH"
57786      has_space=`$ECHO "$path" | $GREP " "`
57787      if test "x$has_space" != x; then
57788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57791      fi
57792
57793      # Use eval to expand a potential ~
57794      eval path="$path"
57795      if test ! -f "$path" && test ! -d "$path"; then
57796        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57797      fi
57798
57799      if test -d "$path"; then
57800        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57801      else
57802        dir="`$DIRNAME "$path"`"
57803        base="`$BASENAME "$path"`"
57804        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57805      fi
57806    fi
57807  fi
57808
57809
57810    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57812$as_echo_n "checking for freetype includes... " >&6; }
57813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57814$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57815    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57817$as_echo_n "checking for freetype libraries... " >&6; }
57818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57819$as_echo "$FREETYPE_LIB_PATH" >&6; }
57820  fi
57821
57822        if test "x$FOUND_FREETYPE" != xyes; then
57823          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57824        fi
57825      else
57826        # User specified only one of lib or include. This is an error.
57827        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57828          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57829$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57830          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57831        else
57832          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57833$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57834          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57835        fi
57836      fi
57837    else
57838      # User did not specify settings, but we need freetype. Try to locate it.
57839
57840      if test "x$BUNDLE_FREETYPE" = x; then
57841        # If not specified, default is to bundle freetype only on windows
57842        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57843          BUNDLE_FREETYPE=yes
57844        else
57845          BUNDLE_FREETYPE=no
57846        fi
57847      fi
57848
57849      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57850      if test "x$SYSROOT" = x; then
57851        if test "x$FOUND_FREETYPE" != xyes; then
57852          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57853          if test "x$PKG_CONFIG" != x; then
57854
57855pkg_failed=no
57856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57857$as_echo_n "checking for FREETYPE... " >&6; }
57858
57859if test -n "$FREETYPE_CFLAGS"; then
57860    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57861 elif test -n "$PKG_CONFIG"; then
57862    if test -n "$PKG_CONFIG" && \
57863    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57864  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57865  ac_status=$?
57866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57867  test $ac_status = 0; }; then
57868  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57869else
57870  pkg_failed=yes
57871fi
57872 else
57873    pkg_failed=untried
57874fi
57875if test -n "$FREETYPE_LIBS"; then
57876    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57877 elif test -n "$PKG_CONFIG"; then
57878    if test -n "$PKG_CONFIG" && \
57879    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57880  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57881  ac_status=$?
57882  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57883  test $ac_status = 0; }; then
57884  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57885else
57886  pkg_failed=yes
57887fi
57888 else
57889    pkg_failed=untried
57890fi
57891
57892
57893
57894if test $pkg_failed = yes; then
57895
57896if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57897        _pkg_short_errors_supported=yes
57898else
57899        _pkg_short_errors_supported=no
57900fi
57901        if test $_pkg_short_errors_supported = yes; then
57902	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57903        else
57904	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57905        fi
57906	# Put the nasty error message in config.log where it belongs
57907	echo "$FREETYPE_PKG_ERRORS" >&5
57908
57909	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57910$as_echo "no" >&6; }
57911                FOUND_FREETYPE=no
57912elif test $pkg_failed = untried; then
57913	FOUND_FREETYPE=no
57914else
57915	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57916	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57918$as_echo "yes" >&6; }
57919	FOUND_FREETYPE=yes
57920fi
57921            if test "x$FOUND_FREETYPE" = xyes; then
57922              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57923              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57924              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57925              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57926                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57927              fi
57928              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57929              if test "x$BUNDLE_FREETYPE" = xyes; then
57930                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57931$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57932                FOUND_FREETYPE=no
57933              else
57934                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57935$as_echo_n "checking for freetype... " >&6; }
57936                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57937$as_echo "yes (using pkg-config)" >&6; }
57938              fi
57939            fi
57940          fi
57941        fi
57942      fi
57943
57944      if test "x$FOUND_FREETYPE" != xyes; then
57945        # Check in well-known locations
57946        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57947          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57948
57949  windows_path="$FREETYPE_BASE_DIR"
57950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57951    unix_path=`$CYGPATH -u "$windows_path"`
57952    FREETYPE_BASE_DIR="$unix_path"
57953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57955    FREETYPE_BASE_DIR="$unix_path"
57956  fi
57957
57958
57959  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57960  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57961  METHOD="well-known location"
57962
57963  # Let's start with an optimistic view of the world :-)
57964  FOUND_FREETYPE=yes
57965
57966  # First look for the canonical freetype main include file ft2build.h.
57967  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57968    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57969    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57970    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57971      # Fail.
57972      FOUND_FREETYPE=no
57973    fi
57974  fi
57975
57976  if test "x$FOUND_FREETYPE" = xyes; then
57977    # Include file found, let's continue the sanity check.
57978    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57979$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57980
57981    # Reset to default value
57982    FREETYPE_BASE_NAME=freetype
57983    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57984    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57985      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57986          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57987        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57988        # for the .6 version explicitly.
57989        FREETYPE_BASE_NAME=freetype.6
57990        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57991        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57992$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57993      else
57994        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57995$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57996        FOUND_FREETYPE=no
57997      fi
57998    else
57999      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58000        # On Windows, we will need both .lib and .dll file.
58001        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58002          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58003$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58004          FOUND_FREETYPE=no
58005        fi
58006      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58007          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58008        # Found lib in isa dir, use that instead.
58009        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58010        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58011$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58012      fi
58013    fi
58014  fi
58015
58016  if test "x$FOUND_FREETYPE" = xyes; then
58017
58018  # Only process if variable expands to non-empty
58019
58020  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58022
58023  # Input might be given as Windows format, start by converting to
58024  # unix format.
58025  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58026  new_path=`$CYGPATH -u "$path"`
58027
58028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58031  # "foo.exe" is OK but "foo" is an error.
58032  #
58033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58034  # It is also a way to make sure we got the proper file name for the real test later on.
58035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58036  if test "x$test_shortpath" = x; then
58037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58038$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58039    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58040  fi
58041
58042  # Call helper function which possibly converts this using DOS-style short mode.
58043  # If so, the updated path is stored in $new_path.
58044
58045  input_path="$new_path"
58046  # Check if we need to convert this using DOS-style short mode. If the path
58047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58048  # take no chances and rewrite it.
58049  # Note: m4 eats our [], so we need to use [ and ] instead.
58050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58051  if test "x$has_forbidden_chars" != x; then
58052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58056      # Going to short mode and back again did indeed matter. Since short mode is
58057      # case insensitive, let's make it lowercase to improve readability.
58058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58059      # Now convert it back to Unix-style (cygpath)
58060      input_path=`$CYGPATH -u "$shortmode_path"`
58061      new_path="$input_path"
58062    fi
58063  fi
58064
58065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58066  if test "x$test_cygdrive_prefix" = x; then
58067    # As a simple fix, exclude /usr/bin since it's not a real path.
58068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58070      # a path prefixed by /cygdrive for fixpath to work.
58071      new_path="$CYGWIN_ROOT_PATH$input_path"
58072    fi
58073  fi
58074
58075
58076  if test "x$path" != "x$new_path"; then
58077    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58080  fi
58081
58082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58083
58084  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58085  has_colon=`$ECHO $path | $GREP ^.:`
58086  new_path="$path"
58087  if test "x$has_colon" = x; then
58088    # Not in mixed or Windows style, start by that.
58089    new_path=`cmd //c echo $path`
58090  fi
58091
58092
58093  input_path="$new_path"
58094  # Check if we need to convert this using DOS-style short mode. If the path
58095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58096  # take no chances and rewrite it.
58097  # Note: m4 eats our [], so we need to use [ and ] instead.
58098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58099  if test "x$has_forbidden_chars" != x; then
58100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58102  fi
58103
58104
58105  windows_path="$new_path"
58106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58107    unix_path=`$CYGPATH -u "$windows_path"`
58108    new_path="$unix_path"
58109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58111    new_path="$unix_path"
58112  fi
58113
58114  if test "x$path" != "x$new_path"; then
58115    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58117$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58118  fi
58119
58120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58122
58123    else
58124      # We're on a unix platform. Hooray! :)
58125      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58126      has_space=`$ECHO "$path" | $GREP " "`
58127      if test "x$has_space" != x; then
58128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58129$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58131      fi
58132
58133      # Use eval to expand a potential ~
58134      eval path="$path"
58135      if test ! -f "$path" && test ! -d "$path"; then
58136        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58137      fi
58138
58139      if test -d "$path"; then
58140        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58141      else
58142        dir="`$DIRNAME "$path"`"
58143        base="`$BASENAME "$path"`"
58144        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58145      fi
58146    fi
58147  fi
58148
58149
58150  # Only process if variable expands to non-empty
58151
58152  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58154
58155  # Input might be given as Windows format, start by converting to
58156  # unix format.
58157  path="$POTENTIAL_FREETYPE_LIB_PATH"
58158  new_path=`$CYGPATH -u "$path"`
58159
58160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58163  # "foo.exe" is OK but "foo" is an error.
58164  #
58165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58166  # It is also a way to make sure we got the proper file name for the real test later on.
58167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58168  if test "x$test_shortpath" = x; then
58169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58171    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58172  fi
58173
58174  # Call helper function which possibly converts this using DOS-style short mode.
58175  # If so, the updated path is stored in $new_path.
58176
58177  input_path="$new_path"
58178  # Check if we need to convert this using DOS-style short mode. If the path
58179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58180  # take no chances and rewrite it.
58181  # Note: m4 eats our [], so we need to use [ and ] instead.
58182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58183  if test "x$has_forbidden_chars" != x; then
58184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58188      # Going to short mode and back again did indeed matter. Since short mode is
58189      # case insensitive, let's make it lowercase to improve readability.
58190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58191      # Now convert it back to Unix-style (cygpath)
58192      input_path=`$CYGPATH -u "$shortmode_path"`
58193      new_path="$input_path"
58194    fi
58195  fi
58196
58197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58198  if test "x$test_cygdrive_prefix" = x; then
58199    # As a simple fix, exclude /usr/bin since it's not a real path.
58200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58202      # a path prefixed by /cygdrive for fixpath to work.
58203      new_path="$CYGWIN_ROOT_PATH$input_path"
58204    fi
58205  fi
58206
58207
58208  if test "x$path" != "x$new_path"; then
58209    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58212  fi
58213
58214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58215
58216  path="$POTENTIAL_FREETYPE_LIB_PATH"
58217  has_colon=`$ECHO $path | $GREP ^.:`
58218  new_path="$path"
58219  if test "x$has_colon" = x; then
58220    # Not in mixed or Windows style, start by that.
58221    new_path=`cmd //c echo $path`
58222  fi
58223
58224
58225  input_path="$new_path"
58226  # Check if we need to convert this using DOS-style short mode. If the path
58227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58228  # take no chances and rewrite it.
58229  # Note: m4 eats our [], so we need to use [ and ] instead.
58230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58231  if test "x$has_forbidden_chars" != x; then
58232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58234  fi
58235
58236
58237  windows_path="$new_path"
58238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58239    unix_path=`$CYGPATH -u "$windows_path"`
58240    new_path="$unix_path"
58241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58243    new_path="$unix_path"
58244  fi
58245
58246  if test "x$path" != "x$new_path"; then
58247    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58250  fi
58251
58252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58254
58255    else
58256      # We're on a unix platform. Hooray! :)
58257      path="$POTENTIAL_FREETYPE_LIB_PATH"
58258      has_space=`$ECHO "$path" | $GREP " "`
58259      if test "x$has_space" != x; then
58260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58263      fi
58264
58265      # Use eval to expand a potential ~
58266      eval path="$path"
58267      if test ! -f "$path" && test ! -d "$path"; then
58268        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58269      fi
58270
58271      if test -d "$path"; then
58272        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58273      else
58274        dir="`$DIRNAME "$path"`"
58275        base="`$BASENAME "$path"`"
58276        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58277      fi
58278    fi
58279  fi
58280
58281
58282    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58284$as_echo_n "checking for freetype includes... " >&6; }
58285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58286$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58287    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58288    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58289$as_echo_n "checking for freetype libraries... " >&6; }
58290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58291$as_echo "$FREETYPE_LIB_PATH" >&6; }
58292  fi
58293
58294          if test "x$FOUND_FREETYPE" != xyes; then
58295            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58296
58297  windows_path="$FREETYPE_BASE_DIR"
58298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58299    unix_path=`$CYGPATH -u "$windows_path"`
58300    FREETYPE_BASE_DIR="$unix_path"
58301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58303    FREETYPE_BASE_DIR="$unix_path"
58304  fi
58305
58306
58307  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58308  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58309  METHOD="well-known location"
58310
58311  # Let's start with an optimistic view of the world :-)
58312  FOUND_FREETYPE=yes
58313
58314  # First look for the canonical freetype main include file ft2build.h.
58315  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58316    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58317    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58318    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58319      # Fail.
58320      FOUND_FREETYPE=no
58321    fi
58322  fi
58323
58324  if test "x$FOUND_FREETYPE" = xyes; then
58325    # Include file found, let's continue the sanity check.
58326    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58327$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58328
58329    # Reset to default value
58330    FREETYPE_BASE_NAME=freetype
58331    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58332    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58333      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58334          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58335        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58336        # for the .6 version explicitly.
58337        FREETYPE_BASE_NAME=freetype.6
58338        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58339        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58340$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58341      else
58342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58343$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58344        FOUND_FREETYPE=no
58345      fi
58346    else
58347      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58348        # On Windows, we will need both .lib and .dll file.
58349        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58350          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58351$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58352          FOUND_FREETYPE=no
58353        fi
58354      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58355          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58356        # Found lib in isa dir, use that instead.
58357        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58358        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58359$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58360      fi
58361    fi
58362  fi
58363
58364  if test "x$FOUND_FREETYPE" = xyes; then
58365
58366  # Only process if variable expands to non-empty
58367
58368  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58370
58371  # Input might be given as Windows format, start by converting to
58372  # unix format.
58373  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58374  new_path=`$CYGPATH -u "$path"`
58375
58376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58379  # "foo.exe" is OK but "foo" is an error.
58380  #
58381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58382  # It is also a way to make sure we got the proper file name for the real test later on.
58383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58384  if test "x$test_shortpath" = x; then
58385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58386$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58387    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58388  fi
58389
58390  # Call helper function which possibly converts this using DOS-style short mode.
58391  # If so, the updated path is stored in $new_path.
58392
58393  input_path="$new_path"
58394  # Check if we need to convert this using DOS-style short mode. If the path
58395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58396  # take no chances and rewrite it.
58397  # Note: m4 eats our [], so we need to use [ and ] instead.
58398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58399  if test "x$has_forbidden_chars" != x; then
58400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58404      # Going to short mode and back again did indeed matter. Since short mode is
58405      # case insensitive, let's make it lowercase to improve readability.
58406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58407      # Now convert it back to Unix-style (cygpath)
58408      input_path=`$CYGPATH -u "$shortmode_path"`
58409      new_path="$input_path"
58410    fi
58411  fi
58412
58413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58414  if test "x$test_cygdrive_prefix" = x; then
58415    # As a simple fix, exclude /usr/bin since it's not a real path.
58416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58418      # a path prefixed by /cygdrive for fixpath to work.
58419      new_path="$CYGWIN_ROOT_PATH$input_path"
58420    fi
58421  fi
58422
58423
58424  if test "x$path" != "x$new_path"; then
58425    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58427$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58428  fi
58429
58430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58431
58432  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58433  has_colon=`$ECHO $path | $GREP ^.:`
58434  new_path="$path"
58435  if test "x$has_colon" = x; then
58436    # Not in mixed or Windows style, start by that.
58437    new_path=`cmd //c echo $path`
58438  fi
58439
58440
58441  input_path="$new_path"
58442  # Check if we need to convert this using DOS-style short mode. If the path
58443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58444  # take no chances and rewrite it.
58445  # Note: m4 eats our [], so we need to use [ and ] instead.
58446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58447  if test "x$has_forbidden_chars" != x; then
58448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58450  fi
58451
58452
58453  windows_path="$new_path"
58454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58455    unix_path=`$CYGPATH -u "$windows_path"`
58456    new_path="$unix_path"
58457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58459    new_path="$unix_path"
58460  fi
58461
58462  if test "x$path" != "x$new_path"; then
58463    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58466  fi
58467
58468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58470
58471    else
58472      # We're on a unix platform. Hooray! :)
58473      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58474      has_space=`$ECHO "$path" | $GREP " "`
58475      if test "x$has_space" != x; then
58476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58477$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58478        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58479      fi
58480
58481      # Use eval to expand a potential ~
58482      eval path="$path"
58483      if test ! -f "$path" && test ! -d "$path"; then
58484        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58485      fi
58486
58487      if test -d "$path"; then
58488        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58489      else
58490        dir="`$DIRNAME "$path"`"
58491        base="`$BASENAME "$path"`"
58492        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58493      fi
58494    fi
58495  fi
58496
58497
58498  # Only process if variable expands to non-empty
58499
58500  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58502
58503  # Input might be given as Windows format, start by converting to
58504  # unix format.
58505  path="$POTENTIAL_FREETYPE_LIB_PATH"
58506  new_path=`$CYGPATH -u "$path"`
58507
58508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58511  # "foo.exe" is OK but "foo" is an error.
58512  #
58513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58514  # It is also a way to make sure we got the proper file name for the real test later on.
58515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58516  if test "x$test_shortpath" = x; then
58517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58519    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58520  fi
58521
58522  # Call helper function which possibly converts this using DOS-style short mode.
58523  # If so, the updated path is stored in $new_path.
58524
58525  input_path="$new_path"
58526  # Check if we need to convert this using DOS-style short mode. If the path
58527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58528  # take no chances and rewrite it.
58529  # Note: m4 eats our [], so we need to use [ and ] instead.
58530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58531  if test "x$has_forbidden_chars" != x; then
58532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58536      # Going to short mode and back again did indeed matter. Since short mode is
58537      # case insensitive, let's make it lowercase to improve readability.
58538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58539      # Now convert it back to Unix-style (cygpath)
58540      input_path=`$CYGPATH -u "$shortmode_path"`
58541      new_path="$input_path"
58542    fi
58543  fi
58544
58545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58546  if test "x$test_cygdrive_prefix" = x; then
58547    # As a simple fix, exclude /usr/bin since it's not a real path.
58548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58550      # a path prefixed by /cygdrive for fixpath to work.
58551      new_path="$CYGWIN_ROOT_PATH$input_path"
58552    fi
58553  fi
58554
58555
58556  if test "x$path" != "x$new_path"; then
58557    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58560  fi
58561
58562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58563
58564  path="$POTENTIAL_FREETYPE_LIB_PATH"
58565  has_colon=`$ECHO $path | $GREP ^.:`
58566  new_path="$path"
58567  if test "x$has_colon" = x; then
58568    # Not in mixed or Windows style, start by that.
58569    new_path=`cmd //c echo $path`
58570  fi
58571
58572
58573  input_path="$new_path"
58574  # Check if we need to convert this using DOS-style short mode. If the path
58575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58576  # take no chances and rewrite it.
58577  # Note: m4 eats our [], so we need to use [ and ] instead.
58578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58579  if test "x$has_forbidden_chars" != x; then
58580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58582  fi
58583
58584
58585  windows_path="$new_path"
58586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58587    unix_path=`$CYGPATH -u "$windows_path"`
58588    new_path="$unix_path"
58589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58591    new_path="$unix_path"
58592  fi
58593
58594  if test "x$path" != "x$new_path"; then
58595    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58598  fi
58599
58600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58602
58603    else
58604      # We're on a unix platform. Hooray! :)
58605      path="$POTENTIAL_FREETYPE_LIB_PATH"
58606      has_space=`$ECHO "$path" | $GREP " "`
58607      if test "x$has_space" != x; then
58608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58611      fi
58612
58613      # Use eval to expand a potential ~
58614      eval path="$path"
58615      if test ! -f "$path" && test ! -d "$path"; then
58616        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58617      fi
58618
58619      if test -d "$path"; then
58620        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58621      else
58622        dir="`$DIRNAME "$path"`"
58623        base="`$BASENAME "$path"`"
58624        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58625      fi
58626    fi
58627  fi
58628
58629
58630    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58632$as_echo_n "checking for freetype includes... " >&6; }
58633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58634$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58635    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58637$as_echo_n "checking for freetype libraries... " >&6; }
58638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58639$as_echo "$FREETYPE_LIB_PATH" >&6; }
58640  fi
58641
58642          fi
58643          if test "x$FOUND_FREETYPE" != xyes; then
58644            FREETYPE_BASE_DIR="$HOME/freetype"
58645
58646  windows_path="$FREETYPE_BASE_DIR"
58647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58648    unix_path=`$CYGPATH -u "$windows_path"`
58649    FREETYPE_BASE_DIR="$unix_path"
58650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58652    FREETYPE_BASE_DIR="$unix_path"
58653  fi
58654
58655            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58656
58657  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58658  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58659  METHOD="well-known location"
58660
58661  # Let's start with an optimistic view of the world :-)
58662  FOUND_FREETYPE=yes
58663
58664  # First look for the canonical freetype main include file ft2build.h.
58665  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58666    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58667    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58668    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58669      # Fail.
58670      FOUND_FREETYPE=no
58671    fi
58672  fi
58673
58674  if test "x$FOUND_FREETYPE" = xyes; then
58675    # Include file found, let's continue the sanity check.
58676    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58677$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58678
58679    # Reset to default value
58680    FREETYPE_BASE_NAME=freetype
58681    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58682    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58683      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58684          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58685        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58686        # for the .6 version explicitly.
58687        FREETYPE_BASE_NAME=freetype.6
58688        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58689        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58690$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58691      else
58692        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58693$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58694        FOUND_FREETYPE=no
58695      fi
58696    else
58697      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58698        # On Windows, we will need both .lib and .dll file.
58699        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58700          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58701$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58702          FOUND_FREETYPE=no
58703        fi
58704      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58705          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58706        # Found lib in isa dir, use that instead.
58707        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58708        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58709$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58710      fi
58711    fi
58712  fi
58713
58714  if test "x$FOUND_FREETYPE" = xyes; then
58715
58716  # Only process if variable expands to non-empty
58717
58718  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58720
58721  # Input might be given as Windows format, start by converting to
58722  # unix format.
58723  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58724  new_path=`$CYGPATH -u "$path"`
58725
58726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58729  # "foo.exe" is OK but "foo" is an error.
58730  #
58731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58732  # It is also a way to make sure we got the proper file name for the real test later on.
58733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58734  if test "x$test_shortpath" = x; then
58735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58736$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58737    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58738  fi
58739
58740  # Call helper function which possibly converts this using DOS-style short mode.
58741  # If so, the updated path is stored in $new_path.
58742
58743  input_path="$new_path"
58744  # Check if we need to convert this using DOS-style short mode. If the path
58745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58746  # take no chances and rewrite it.
58747  # Note: m4 eats our [], so we need to use [ and ] instead.
58748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58749  if test "x$has_forbidden_chars" != x; then
58750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58754      # Going to short mode and back again did indeed matter. Since short mode is
58755      # case insensitive, let's make it lowercase to improve readability.
58756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58757      # Now convert it back to Unix-style (cygpath)
58758      input_path=`$CYGPATH -u "$shortmode_path"`
58759      new_path="$input_path"
58760    fi
58761  fi
58762
58763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58764  if test "x$test_cygdrive_prefix" = x; then
58765    # As a simple fix, exclude /usr/bin since it's not a real path.
58766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58768      # a path prefixed by /cygdrive for fixpath to work.
58769      new_path="$CYGWIN_ROOT_PATH$input_path"
58770    fi
58771  fi
58772
58773
58774  if test "x$path" != "x$new_path"; then
58775    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58778  fi
58779
58780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58781
58782  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58783  has_colon=`$ECHO $path | $GREP ^.:`
58784  new_path="$path"
58785  if test "x$has_colon" = x; then
58786    # Not in mixed or Windows style, start by that.
58787    new_path=`cmd //c echo $path`
58788  fi
58789
58790
58791  input_path="$new_path"
58792  # Check if we need to convert this using DOS-style short mode. If the path
58793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58794  # take no chances and rewrite it.
58795  # Note: m4 eats our [], so we need to use [ and ] instead.
58796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58797  if test "x$has_forbidden_chars" != x; then
58798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58800  fi
58801
58802
58803  windows_path="$new_path"
58804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58805    unix_path=`$CYGPATH -u "$windows_path"`
58806    new_path="$unix_path"
58807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58809    new_path="$unix_path"
58810  fi
58811
58812  if test "x$path" != "x$new_path"; then
58813    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58815$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58816  fi
58817
58818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58820
58821    else
58822      # We're on a unix platform. Hooray! :)
58823      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58824      has_space=`$ECHO "$path" | $GREP " "`
58825      if test "x$has_space" != x; then
58826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58827$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58829      fi
58830
58831      # Use eval to expand a potential ~
58832      eval path="$path"
58833      if test ! -f "$path" && test ! -d "$path"; then
58834        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58835      fi
58836
58837      if test -d "$path"; then
58838        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58839      else
58840        dir="`$DIRNAME "$path"`"
58841        base="`$BASENAME "$path"`"
58842        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58843      fi
58844    fi
58845  fi
58846
58847
58848  # Only process if variable expands to non-empty
58849
58850  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58852
58853  # Input might be given as Windows format, start by converting to
58854  # unix format.
58855  path="$POTENTIAL_FREETYPE_LIB_PATH"
58856  new_path=`$CYGPATH -u "$path"`
58857
58858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58861  # "foo.exe" is OK but "foo" is an error.
58862  #
58863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58864  # It is also a way to make sure we got the proper file name for the real test later on.
58865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58866  if test "x$test_shortpath" = x; then
58867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58869    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58870  fi
58871
58872  # Call helper function which possibly converts this using DOS-style short mode.
58873  # If so, the updated path is stored in $new_path.
58874
58875  input_path="$new_path"
58876  # Check if we need to convert this using DOS-style short mode. If the path
58877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58878  # take no chances and rewrite it.
58879  # Note: m4 eats our [], so we need to use [ and ] instead.
58880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58881  if test "x$has_forbidden_chars" != x; then
58882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58886      # Going to short mode and back again did indeed matter. Since short mode is
58887      # case insensitive, let's make it lowercase to improve readability.
58888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58889      # Now convert it back to Unix-style (cygpath)
58890      input_path=`$CYGPATH -u "$shortmode_path"`
58891      new_path="$input_path"
58892    fi
58893  fi
58894
58895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58896  if test "x$test_cygdrive_prefix" = x; then
58897    # As a simple fix, exclude /usr/bin since it's not a real path.
58898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58900      # a path prefixed by /cygdrive for fixpath to work.
58901      new_path="$CYGWIN_ROOT_PATH$input_path"
58902    fi
58903  fi
58904
58905
58906  if test "x$path" != "x$new_path"; then
58907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58910  fi
58911
58912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58913
58914  path="$POTENTIAL_FREETYPE_LIB_PATH"
58915  has_colon=`$ECHO $path | $GREP ^.:`
58916  new_path="$path"
58917  if test "x$has_colon" = x; then
58918    # Not in mixed or Windows style, start by that.
58919    new_path=`cmd //c echo $path`
58920  fi
58921
58922
58923  input_path="$new_path"
58924  # Check if we need to convert this using DOS-style short mode. If the path
58925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58926  # take no chances and rewrite it.
58927  # Note: m4 eats our [], so we need to use [ and ] instead.
58928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58929  if test "x$has_forbidden_chars" != x; then
58930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58932  fi
58933
58934
58935  windows_path="$new_path"
58936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58937    unix_path=`$CYGPATH -u "$windows_path"`
58938    new_path="$unix_path"
58939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58941    new_path="$unix_path"
58942  fi
58943
58944  if test "x$path" != "x$new_path"; then
58945    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58948  fi
58949
58950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58952
58953    else
58954      # We're on a unix platform. Hooray! :)
58955      path="$POTENTIAL_FREETYPE_LIB_PATH"
58956      has_space=`$ECHO "$path" | $GREP " "`
58957      if test "x$has_space" != x; then
58958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58961      fi
58962
58963      # Use eval to expand a potential ~
58964      eval path="$path"
58965      if test ! -f "$path" && test ! -d "$path"; then
58966        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58967      fi
58968
58969      if test -d "$path"; then
58970        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58971      else
58972        dir="`$DIRNAME "$path"`"
58973        base="`$BASENAME "$path"`"
58974        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58975      fi
58976    fi
58977  fi
58978
58979
58980    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58982$as_echo_n "checking for freetype includes... " >&6; }
58983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58984$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58985    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58987$as_echo_n "checking for freetype libraries... " >&6; }
58988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58989$as_echo "$FREETYPE_LIB_PATH" >&6; }
58990  fi
58991
58992            else
58993
58994  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58995  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58996  METHOD="well-known location"
58997
58998  # Let's start with an optimistic view of the world :-)
58999  FOUND_FREETYPE=yes
59000
59001  # First look for the canonical freetype main include file ft2build.h.
59002  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59003    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59004    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59005    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59006      # Fail.
59007      FOUND_FREETYPE=no
59008    fi
59009  fi
59010
59011  if test "x$FOUND_FREETYPE" = xyes; then
59012    # Include file found, let's continue the sanity check.
59013    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59014$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59015
59016    # Reset to default value
59017    FREETYPE_BASE_NAME=freetype
59018    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59019    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59020      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59021          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59022        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59023        # for the .6 version explicitly.
59024        FREETYPE_BASE_NAME=freetype.6
59025        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59026        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59027$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59028      else
59029        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59030$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59031        FOUND_FREETYPE=no
59032      fi
59033    else
59034      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59035        # On Windows, we will need both .lib and .dll file.
59036        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59037          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59038$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59039          FOUND_FREETYPE=no
59040        fi
59041      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59042          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59043        # Found lib in isa dir, use that instead.
59044        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59045        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59046$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59047      fi
59048    fi
59049  fi
59050
59051  if test "x$FOUND_FREETYPE" = xyes; then
59052
59053  # Only process if variable expands to non-empty
59054
59055  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59056    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59057
59058  # Input might be given as Windows format, start by converting to
59059  # unix format.
59060  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59061  new_path=`$CYGPATH -u "$path"`
59062
59063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59066  # "foo.exe" is OK but "foo" is an error.
59067  #
59068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59069  # It is also a way to make sure we got the proper file name for the real test later on.
59070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59071  if test "x$test_shortpath" = x; then
59072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59073$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59074    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59075  fi
59076
59077  # Call helper function which possibly converts this using DOS-style short mode.
59078  # If so, the updated path is stored in $new_path.
59079
59080  input_path="$new_path"
59081  # Check if we need to convert this using DOS-style short mode. If the path
59082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59083  # take no chances and rewrite it.
59084  # Note: m4 eats our [], so we need to use [ and ] instead.
59085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59086  if test "x$has_forbidden_chars" != x; then
59087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59091      # Going to short mode and back again did indeed matter. Since short mode is
59092      # case insensitive, let's make it lowercase to improve readability.
59093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59094      # Now convert it back to Unix-style (cygpath)
59095      input_path=`$CYGPATH -u "$shortmode_path"`
59096      new_path="$input_path"
59097    fi
59098  fi
59099
59100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59101  if test "x$test_cygdrive_prefix" = x; then
59102    # As a simple fix, exclude /usr/bin since it's not a real path.
59103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59105      # a path prefixed by /cygdrive for fixpath to work.
59106      new_path="$CYGWIN_ROOT_PATH$input_path"
59107    fi
59108  fi
59109
59110
59111  if test "x$path" != "x$new_path"; then
59112    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59114$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59115  fi
59116
59117    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59118
59119  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59120  has_colon=`$ECHO $path | $GREP ^.:`
59121  new_path="$path"
59122  if test "x$has_colon" = x; then
59123    # Not in mixed or Windows style, start by that.
59124    new_path=`cmd //c echo $path`
59125  fi
59126
59127
59128  input_path="$new_path"
59129  # Check if we need to convert this using DOS-style short mode. If the path
59130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59131  # take no chances and rewrite it.
59132  # Note: m4 eats our [], so we need to use [ and ] instead.
59133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59134  if test "x$has_forbidden_chars" != x; then
59135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59137  fi
59138
59139
59140  windows_path="$new_path"
59141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59142    unix_path=`$CYGPATH -u "$windows_path"`
59143    new_path="$unix_path"
59144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59146    new_path="$unix_path"
59147  fi
59148
59149  if test "x$path" != "x$new_path"; then
59150    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59152$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59153  fi
59154
59155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59157
59158    else
59159      # We're on a unix platform. Hooray! :)
59160      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59161      has_space=`$ECHO "$path" | $GREP " "`
59162      if test "x$has_space" != x; then
59163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59164$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59165        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59166      fi
59167
59168      # Use eval to expand a potential ~
59169      eval path="$path"
59170      if test ! -f "$path" && test ! -d "$path"; then
59171        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59172      fi
59173
59174      if test -d "$path"; then
59175        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59176      else
59177        dir="`$DIRNAME "$path"`"
59178        base="`$BASENAME "$path"`"
59179        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59180      fi
59181    fi
59182  fi
59183
59184
59185  # Only process if variable expands to non-empty
59186
59187  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59189
59190  # Input might be given as Windows format, start by converting to
59191  # unix format.
59192  path="$POTENTIAL_FREETYPE_LIB_PATH"
59193  new_path=`$CYGPATH -u "$path"`
59194
59195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59198  # "foo.exe" is OK but "foo" is an error.
59199  #
59200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59201  # It is also a way to make sure we got the proper file name for the real test later on.
59202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59203  if test "x$test_shortpath" = x; then
59204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59206    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59207  fi
59208
59209  # Call helper function which possibly converts this using DOS-style short mode.
59210  # If so, the updated path is stored in $new_path.
59211
59212  input_path="$new_path"
59213  # Check if we need to convert this using DOS-style short mode. If the path
59214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59215  # take no chances and rewrite it.
59216  # Note: m4 eats our [], so we need to use [ and ] instead.
59217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59218  if test "x$has_forbidden_chars" != x; then
59219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59223      # Going to short mode and back again did indeed matter. Since short mode is
59224      # case insensitive, let's make it lowercase to improve readability.
59225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59226      # Now convert it back to Unix-style (cygpath)
59227      input_path=`$CYGPATH -u "$shortmode_path"`
59228      new_path="$input_path"
59229    fi
59230  fi
59231
59232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59233  if test "x$test_cygdrive_prefix" = x; then
59234    # As a simple fix, exclude /usr/bin since it's not a real path.
59235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59237      # a path prefixed by /cygdrive for fixpath to work.
59238      new_path="$CYGWIN_ROOT_PATH$input_path"
59239    fi
59240  fi
59241
59242
59243  if test "x$path" != "x$new_path"; then
59244    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59247  fi
59248
59249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59250
59251  path="$POTENTIAL_FREETYPE_LIB_PATH"
59252  has_colon=`$ECHO $path | $GREP ^.:`
59253  new_path="$path"
59254  if test "x$has_colon" = x; then
59255    # Not in mixed or Windows style, start by that.
59256    new_path=`cmd //c echo $path`
59257  fi
59258
59259
59260  input_path="$new_path"
59261  # Check if we need to convert this using DOS-style short mode. If the path
59262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59263  # take no chances and rewrite it.
59264  # Note: m4 eats our [], so we need to use [ and ] instead.
59265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59266  if test "x$has_forbidden_chars" != x; then
59267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59269  fi
59270
59271
59272  windows_path="$new_path"
59273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59274    unix_path=`$CYGPATH -u "$windows_path"`
59275    new_path="$unix_path"
59276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59278    new_path="$unix_path"
59279  fi
59280
59281  if test "x$path" != "x$new_path"; then
59282    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59285  fi
59286
59287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59289
59290    else
59291      # We're on a unix platform. Hooray! :)
59292      path="$POTENTIAL_FREETYPE_LIB_PATH"
59293      has_space=`$ECHO "$path" | $GREP " "`
59294      if test "x$has_space" != x; then
59295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59298      fi
59299
59300      # Use eval to expand a potential ~
59301      eval path="$path"
59302      if test ! -f "$path" && test ! -d "$path"; then
59303        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59304      fi
59305
59306      if test -d "$path"; then
59307        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59308      else
59309        dir="`$DIRNAME "$path"`"
59310        base="`$BASENAME "$path"`"
59311        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59312      fi
59313    fi
59314  fi
59315
59316
59317    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59319$as_echo_n "checking for freetype includes... " >&6; }
59320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59321$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59322    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59324$as_echo_n "checking for freetype libraries... " >&6; }
59325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59326$as_echo "$FREETYPE_LIB_PATH" >&6; }
59327  fi
59328
59329            fi
59330            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59331                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59332              # Source is available, as a last resort try to build freetype in default location
59333
59334  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59335  BUILD_FREETYPE=yes
59336
59337  # Check if the freetype sources are acessible..
59338  if ! test -d $FREETYPE_SRC_PATH; then
59339    { $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
59340$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59341    BUILD_FREETYPE=no
59342  fi
59343  # ..and contain a vc2010 project file
59344  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59345  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59346    { $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
59347$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59348    BUILD_FREETYPE=no
59349  fi
59350  # Now check if configure found a version of 'msbuild.exe'
59351  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59352    { $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
59353$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;}
59354    BUILD_FREETYPE=no
59355  fi
59356
59357  # Ready to go..
59358  if test "x$BUILD_FREETYPE" = xyes; then
59359    # msbuild requires trailing slashes for output directories
59360    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59361    freetype_lib_path_unix="$freetype_lib_path"
59362    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59363
59364  unix_path="$vcxproj_path"
59365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59366    windows_path=`$CYGPATH -m "$unix_path"`
59367    vcxproj_path="$windows_path"
59368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59369    windows_path=`cmd //c echo $unix_path`
59370    vcxproj_path="$windows_path"
59371  fi
59372
59373
59374  unix_path="$freetype_lib_path"
59375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59376    windows_path=`$CYGPATH -m "$unix_path"`
59377    freetype_lib_path="$windows_path"
59378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59379    windows_path=`cmd //c echo $unix_path`
59380    freetype_lib_path="$windows_path"
59381  fi
59382
59383
59384  unix_path="$freetype_obj_path"
59385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59386    windows_path=`$CYGPATH -m "$unix_path"`
59387    freetype_obj_path="$windows_path"
59388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59389    windows_path=`cmd //c echo $unix_path`
59390    freetype_obj_path="$windows_path"
59391  fi
59392
59393    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59394      freetype_platform=x64
59395    else
59396      freetype_platform=win32
59397    fi
59398
59399    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59400    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59401    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59402    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59403    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59404$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59405
59406    # First we try to build the freetype.dll
59407    $ECHO -e "@echo off\n"\
59408        "$MSBUILD $vcxproj_path "\
59409        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59410        "/p:Configuration=\"Release Multithreaded\" "\
59411        "/p:Platform=$freetype_platform "\
59412        "/p:ConfigurationType=DynamicLibrary "\
59413        "/p:TargetName=freetype "\
59414        "/p:OutDir=\"$freetype_lib_path\" "\
59415        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59416    cmd /c freetype.bat
59417
59418    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59419      # If that succeeds we also build freetype.lib
59420      $ECHO -e "@echo off\n"\
59421          "$MSBUILD $vcxproj_path "\
59422          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59423          "/p:Configuration=\"Release Multithreaded\" "\
59424          "/p:Platform=$freetype_platform "\
59425          "/p:ConfigurationType=StaticLibrary "\
59426          "/p:TargetName=freetype "\
59427          "/p:OutDir=\"$freetype_lib_path\" "\
59428          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59429      cmd /c freetype.bat
59430
59431      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59432        # Once we build both, lib and dll, set freetype lib and include path appropriately
59433        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59434        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59435        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59436$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59437      else
59438        BUILD_FREETYPE=no
59439      fi
59440    else
59441      BUILD_FREETYPE=no
59442    fi
59443  fi
59444
59445              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59446
59447  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59448  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59449  METHOD="well-known location"
59450
59451  # Let's start with an optimistic view of the world :-)
59452  FOUND_FREETYPE=yes
59453
59454  # First look for the canonical freetype main include file ft2build.h.
59455  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59456    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59457    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59458    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59459      # Fail.
59460      FOUND_FREETYPE=no
59461    fi
59462  fi
59463
59464  if test "x$FOUND_FREETYPE" = xyes; then
59465    # Include file found, let's continue the sanity check.
59466    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59467$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59468
59469    # Reset to default value
59470    FREETYPE_BASE_NAME=freetype
59471    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59472    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59473      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59474          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59475        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59476        # for the .6 version explicitly.
59477        FREETYPE_BASE_NAME=freetype.6
59478        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59479        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59480$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59481      else
59482        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59484        FOUND_FREETYPE=no
59485      fi
59486    else
59487      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59488        # On Windows, we will need both .lib and .dll file.
59489        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59490          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59492          FOUND_FREETYPE=no
59493        fi
59494      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59495          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59496        # Found lib in isa dir, use that instead.
59497        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59498        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59499$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59500      fi
59501    fi
59502  fi
59503
59504  if test "x$FOUND_FREETYPE" = xyes; then
59505
59506  # Only process if variable expands to non-empty
59507
59508  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59510
59511  # Input might be given as Windows format, start by converting to
59512  # unix format.
59513  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59514  new_path=`$CYGPATH -u "$path"`
59515
59516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59519  # "foo.exe" is OK but "foo" is an error.
59520  #
59521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59522  # It is also a way to make sure we got the proper file name for the real test later on.
59523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59524  if test "x$test_shortpath" = x; then
59525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59527    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59528  fi
59529
59530  # Call helper function which possibly converts this using DOS-style short mode.
59531  # If so, the updated path is stored in $new_path.
59532
59533  input_path="$new_path"
59534  # Check if we need to convert this using DOS-style short mode. If the path
59535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59536  # take no chances and rewrite it.
59537  # Note: m4 eats our [], so we need to use [ and ] instead.
59538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59539  if test "x$has_forbidden_chars" != x; then
59540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59544      # Going to short mode and back again did indeed matter. Since short mode is
59545      # case insensitive, let's make it lowercase to improve readability.
59546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59547      # Now convert it back to Unix-style (cygpath)
59548      input_path=`$CYGPATH -u "$shortmode_path"`
59549      new_path="$input_path"
59550    fi
59551  fi
59552
59553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59554  if test "x$test_cygdrive_prefix" = x; then
59555    # As a simple fix, exclude /usr/bin since it's not a real path.
59556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59558      # a path prefixed by /cygdrive for fixpath to work.
59559      new_path="$CYGWIN_ROOT_PATH$input_path"
59560    fi
59561  fi
59562
59563
59564  if test "x$path" != "x$new_path"; then
59565    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59568  fi
59569
59570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59571
59572  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59573  has_colon=`$ECHO $path | $GREP ^.:`
59574  new_path="$path"
59575  if test "x$has_colon" = x; then
59576    # Not in mixed or Windows style, start by that.
59577    new_path=`cmd //c echo $path`
59578  fi
59579
59580
59581  input_path="$new_path"
59582  # Check if we need to convert this using DOS-style short mode. If the path
59583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59584  # take no chances and rewrite it.
59585  # Note: m4 eats our [], so we need to use [ and ] instead.
59586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59587  if test "x$has_forbidden_chars" != x; then
59588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59590  fi
59591
59592
59593  windows_path="$new_path"
59594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59595    unix_path=`$CYGPATH -u "$windows_path"`
59596    new_path="$unix_path"
59597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59599    new_path="$unix_path"
59600  fi
59601
59602  if test "x$path" != "x$new_path"; then
59603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59606  fi
59607
59608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59610
59611    else
59612      # We're on a unix platform. Hooray! :)
59613      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59614      has_space=`$ECHO "$path" | $GREP " "`
59615      if test "x$has_space" != x; then
59616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59619      fi
59620
59621      # Use eval to expand a potential ~
59622      eval path="$path"
59623      if test ! -f "$path" && test ! -d "$path"; then
59624        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59625      fi
59626
59627      if test -d "$path"; then
59628        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59629      else
59630        dir="`$DIRNAME "$path"`"
59631        base="`$BASENAME "$path"`"
59632        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59633      fi
59634    fi
59635  fi
59636
59637
59638  # Only process if variable expands to non-empty
59639
59640  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59642
59643  # Input might be given as Windows format, start by converting to
59644  # unix format.
59645  path="$POTENTIAL_FREETYPE_LIB_PATH"
59646  new_path=`$CYGPATH -u "$path"`
59647
59648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59651  # "foo.exe" is OK but "foo" is an error.
59652  #
59653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59654  # It is also a way to make sure we got the proper file name for the real test later on.
59655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59656  if test "x$test_shortpath" = x; then
59657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59658$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59659    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59660  fi
59661
59662  # Call helper function which possibly converts this using DOS-style short mode.
59663  # If so, the updated path is stored in $new_path.
59664
59665  input_path="$new_path"
59666  # Check if we need to convert this using DOS-style short mode. If the path
59667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59668  # take no chances and rewrite it.
59669  # Note: m4 eats our [], so we need to use [ and ] instead.
59670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59671  if test "x$has_forbidden_chars" != x; then
59672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59676      # Going to short mode and back again did indeed matter. Since short mode is
59677      # case insensitive, let's make it lowercase to improve readability.
59678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59679      # Now convert it back to Unix-style (cygpath)
59680      input_path=`$CYGPATH -u "$shortmode_path"`
59681      new_path="$input_path"
59682    fi
59683  fi
59684
59685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59686  if test "x$test_cygdrive_prefix" = x; then
59687    # As a simple fix, exclude /usr/bin since it's not a real path.
59688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59690      # a path prefixed by /cygdrive for fixpath to work.
59691      new_path="$CYGWIN_ROOT_PATH$input_path"
59692    fi
59693  fi
59694
59695
59696  if test "x$path" != "x$new_path"; then
59697    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59699$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59700  fi
59701
59702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59703
59704  path="$POTENTIAL_FREETYPE_LIB_PATH"
59705  has_colon=`$ECHO $path | $GREP ^.:`
59706  new_path="$path"
59707  if test "x$has_colon" = x; then
59708    # Not in mixed or Windows style, start by that.
59709    new_path=`cmd //c echo $path`
59710  fi
59711
59712
59713  input_path="$new_path"
59714  # Check if we need to convert this using DOS-style short mode. If the path
59715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59716  # take no chances and rewrite it.
59717  # Note: m4 eats our [], so we need to use [ and ] instead.
59718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59719  if test "x$has_forbidden_chars" != x; then
59720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59722  fi
59723
59724
59725  windows_path="$new_path"
59726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59727    unix_path=`$CYGPATH -u "$windows_path"`
59728    new_path="$unix_path"
59729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59731    new_path="$unix_path"
59732  fi
59733
59734  if test "x$path" != "x$new_path"; then
59735    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59738  fi
59739
59740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59742
59743    else
59744      # We're on a unix platform. Hooray! :)
59745      path="$POTENTIAL_FREETYPE_LIB_PATH"
59746      has_space=`$ECHO "$path" | $GREP " "`
59747      if test "x$has_space" != x; then
59748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59751      fi
59752
59753      # Use eval to expand a potential ~
59754      eval path="$path"
59755      if test ! -f "$path" && test ! -d "$path"; then
59756        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59757      fi
59758
59759      if test -d "$path"; then
59760        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59761      else
59762        dir="`$DIRNAME "$path"`"
59763        base="`$BASENAME "$path"`"
59764        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59765      fi
59766    fi
59767  fi
59768
59769
59770    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59772$as_echo_n "checking for freetype includes... " >&6; }
59773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59774$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59775    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59777$as_echo_n "checking for freetype libraries... " >&6; }
59778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59779$as_echo "$FREETYPE_LIB_PATH" >&6; }
59780  fi
59781
59782              else
59783
59784  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59785  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59786  METHOD="well-known location"
59787
59788  # Let's start with an optimistic view of the world :-)
59789  FOUND_FREETYPE=yes
59790
59791  # First look for the canonical freetype main include file ft2build.h.
59792  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59793    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59794    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59795    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59796      # Fail.
59797      FOUND_FREETYPE=no
59798    fi
59799  fi
59800
59801  if test "x$FOUND_FREETYPE" = xyes; then
59802    # Include file found, let's continue the sanity check.
59803    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59804$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59805
59806    # Reset to default value
59807    FREETYPE_BASE_NAME=freetype
59808    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59809    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59810      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59811          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59812        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59813        # for the .6 version explicitly.
59814        FREETYPE_BASE_NAME=freetype.6
59815        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59816        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59817$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59818      else
59819        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59820$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59821        FOUND_FREETYPE=no
59822      fi
59823    else
59824      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59825        # On Windows, we will need both .lib and .dll file.
59826        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59827          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59828$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59829          FOUND_FREETYPE=no
59830        fi
59831      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59832          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59833        # Found lib in isa dir, use that instead.
59834        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59835        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59836$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59837      fi
59838    fi
59839  fi
59840
59841  if test "x$FOUND_FREETYPE" = xyes; then
59842
59843  # Only process if variable expands to non-empty
59844
59845  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59847
59848  # Input might be given as Windows format, start by converting to
59849  # unix format.
59850  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59851  new_path=`$CYGPATH -u "$path"`
59852
59853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59856  # "foo.exe" is OK but "foo" is an error.
59857  #
59858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59859  # It is also a way to make sure we got the proper file name for the real test later on.
59860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59861  if test "x$test_shortpath" = x; then
59862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59864    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59865  fi
59866
59867  # Call helper function which possibly converts this using DOS-style short mode.
59868  # If so, the updated path is stored in $new_path.
59869
59870  input_path="$new_path"
59871  # Check if we need to convert this using DOS-style short mode. If the path
59872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59873  # take no chances and rewrite it.
59874  # Note: m4 eats our [], so we need to use [ and ] instead.
59875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59876  if test "x$has_forbidden_chars" != x; then
59877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59881      # Going to short mode and back again did indeed matter. Since short mode is
59882      # case insensitive, let's make it lowercase to improve readability.
59883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59884      # Now convert it back to Unix-style (cygpath)
59885      input_path=`$CYGPATH -u "$shortmode_path"`
59886      new_path="$input_path"
59887    fi
59888  fi
59889
59890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59891  if test "x$test_cygdrive_prefix" = x; then
59892    # As a simple fix, exclude /usr/bin since it's not a real path.
59893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59895      # a path prefixed by /cygdrive for fixpath to work.
59896      new_path="$CYGWIN_ROOT_PATH$input_path"
59897    fi
59898  fi
59899
59900
59901  if test "x$path" != "x$new_path"; then
59902    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59904$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59905  fi
59906
59907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59908
59909  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59910  has_colon=`$ECHO $path | $GREP ^.:`
59911  new_path="$path"
59912  if test "x$has_colon" = x; then
59913    # Not in mixed or Windows style, start by that.
59914    new_path=`cmd //c echo $path`
59915  fi
59916
59917
59918  input_path="$new_path"
59919  # Check if we need to convert this using DOS-style short mode. If the path
59920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59921  # take no chances and rewrite it.
59922  # Note: m4 eats our [], so we need to use [ and ] instead.
59923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59924  if test "x$has_forbidden_chars" != x; then
59925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59927  fi
59928
59929
59930  windows_path="$new_path"
59931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59932    unix_path=`$CYGPATH -u "$windows_path"`
59933    new_path="$unix_path"
59934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59936    new_path="$unix_path"
59937  fi
59938
59939  if test "x$path" != "x$new_path"; then
59940    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59943  fi
59944
59945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59947
59948    else
59949      # We're on a unix platform. Hooray! :)
59950      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59951      has_space=`$ECHO "$path" | $GREP " "`
59952      if test "x$has_space" != x; then
59953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59954$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59956      fi
59957
59958      # Use eval to expand a potential ~
59959      eval path="$path"
59960      if test ! -f "$path" && test ! -d "$path"; then
59961        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59962      fi
59963
59964      if test -d "$path"; then
59965        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59966      else
59967        dir="`$DIRNAME "$path"`"
59968        base="`$BASENAME "$path"`"
59969        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59970      fi
59971    fi
59972  fi
59973
59974
59975  # Only process if variable expands to non-empty
59976
59977  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59979
59980  # Input might be given as Windows format, start by converting to
59981  # unix format.
59982  path="$POTENTIAL_FREETYPE_LIB_PATH"
59983  new_path=`$CYGPATH -u "$path"`
59984
59985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59988  # "foo.exe" is OK but "foo" is an error.
59989  #
59990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59991  # It is also a way to make sure we got the proper file name for the real test later on.
59992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59993  if test "x$test_shortpath" = x; then
59994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59996    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59997  fi
59998
59999  # Call helper function which possibly converts this using DOS-style short mode.
60000  # If so, the updated path is stored in $new_path.
60001
60002  input_path="$new_path"
60003  # Check if we need to convert this using DOS-style short mode. If the path
60004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60005  # take no chances and rewrite it.
60006  # Note: m4 eats our [], so we need to use [ and ] instead.
60007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60008  if test "x$has_forbidden_chars" != x; then
60009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60013      # Going to short mode and back again did indeed matter. Since short mode is
60014      # case insensitive, let's make it lowercase to improve readability.
60015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60016      # Now convert it back to Unix-style (cygpath)
60017      input_path=`$CYGPATH -u "$shortmode_path"`
60018      new_path="$input_path"
60019    fi
60020  fi
60021
60022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60023  if test "x$test_cygdrive_prefix" = x; then
60024    # As a simple fix, exclude /usr/bin since it's not a real path.
60025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60027      # a path prefixed by /cygdrive for fixpath to work.
60028      new_path="$CYGWIN_ROOT_PATH$input_path"
60029    fi
60030  fi
60031
60032
60033  if test "x$path" != "x$new_path"; then
60034    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60036$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60037  fi
60038
60039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60040
60041  path="$POTENTIAL_FREETYPE_LIB_PATH"
60042  has_colon=`$ECHO $path | $GREP ^.:`
60043  new_path="$path"
60044  if test "x$has_colon" = x; then
60045    # Not in mixed or Windows style, start by that.
60046    new_path=`cmd //c echo $path`
60047  fi
60048
60049
60050  input_path="$new_path"
60051  # Check if we need to convert this using DOS-style short mode. If the path
60052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60053  # take no chances and rewrite it.
60054  # Note: m4 eats our [], so we need to use [ and ] instead.
60055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60056  if test "x$has_forbidden_chars" != x; then
60057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60059  fi
60060
60061
60062  windows_path="$new_path"
60063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60064    unix_path=`$CYGPATH -u "$windows_path"`
60065    new_path="$unix_path"
60066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60068    new_path="$unix_path"
60069  fi
60070
60071  if test "x$path" != "x$new_path"; then
60072    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60075  fi
60076
60077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60079
60080    else
60081      # We're on a unix platform. Hooray! :)
60082      path="$POTENTIAL_FREETYPE_LIB_PATH"
60083      has_space=`$ECHO "$path" | $GREP " "`
60084      if test "x$has_space" != x; then
60085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60088      fi
60089
60090      # Use eval to expand a potential ~
60091      eval path="$path"
60092      if test ! -f "$path" && test ! -d "$path"; then
60093        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60094      fi
60095
60096      if test -d "$path"; then
60097        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60098      else
60099        dir="`$DIRNAME "$path"`"
60100        base="`$BASENAME "$path"`"
60101        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60102      fi
60103    fi
60104  fi
60105
60106
60107    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60109$as_echo_n "checking for freetype includes... " >&6; }
60110    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60111$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60112    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60114$as_echo_n "checking for freetype libraries... " >&6; }
60115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60116$as_echo "$FREETYPE_LIB_PATH" >&6; }
60117  fi
60118
60119              fi
60120            fi
60121          fi
60122        else
60123          FREETYPE_BASE_DIR="$SYSROOT/usr"
60124
60125  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60126  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60127  METHOD="well-known location"
60128
60129  # Let's start with an optimistic view of the world :-)
60130  FOUND_FREETYPE=yes
60131
60132  # First look for the canonical freetype main include file ft2build.h.
60133  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60134    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60135    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60136    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60137      # Fail.
60138      FOUND_FREETYPE=no
60139    fi
60140  fi
60141
60142  if test "x$FOUND_FREETYPE" = xyes; then
60143    # Include file found, let's continue the sanity check.
60144    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60145$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60146
60147    # Reset to default value
60148    FREETYPE_BASE_NAME=freetype
60149    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60150    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60151      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60152          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60153        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60154        # for the .6 version explicitly.
60155        FREETYPE_BASE_NAME=freetype.6
60156        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60157        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60158$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60159      else
60160        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60161$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60162        FOUND_FREETYPE=no
60163      fi
60164    else
60165      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60166        # On Windows, we will need both .lib and .dll file.
60167        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60168          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60169$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60170          FOUND_FREETYPE=no
60171        fi
60172      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60173          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60174        # Found lib in isa dir, use that instead.
60175        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60176        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60177$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60178      fi
60179    fi
60180  fi
60181
60182  if test "x$FOUND_FREETYPE" = xyes; then
60183
60184  # Only process if variable expands to non-empty
60185
60186  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60188
60189  # Input might be given as Windows format, start by converting to
60190  # unix format.
60191  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60192  new_path=`$CYGPATH -u "$path"`
60193
60194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60197  # "foo.exe" is OK but "foo" is an error.
60198  #
60199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60200  # It is also a way to make sure we got the proper file name for the real test later on.
60201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60202  if test "x$test_shortpath" = x; then
60203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60205    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60206  fi
60207
60208  # Call helper function which possibly converts this using DOS-style short mode.
60209  # If so, the updated path is stored in $new_path.
60210
60211  input_path="$new_path"
60212  # Check if we need to convert this using DOS-style short mode. If the path
60213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60214  # take no chances and rewrite it.
60215  # Note: m4 eats our [], so we need to use [ and ] instead.
60216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60217  if test "x$has_forbidden_chars" != x; then
60218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60222      # Going to short mode and back again did indeed matter. Since short mode is
60223      # case insensitive, let's make it lowercase to improve readability.
60224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60225      # Now convert it back to Unix-style (cygpath)
60226      input_path=`$CYGPATH -u "$shortmode_path"`
60227      new_path="$input_path"
60228    fi
60229  fi
60230
60231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60232  if test "x$test_cygdrive_prefix" = x; then
60233    # As a simple fix, exclude /usr/bin since it's not a real path.
60234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60236      # a path prefixed by /cygdrive for fixpath to work.
60237      new_path="$CYGWIN_ROOT_PATH$input_path"
60238    fi
60239  fi
60240
60241
60242  if test "x$path" != "x$new_path"; then
60243    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60246  fi
60247
60248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60249
60250  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60251  has_colon=`$ECHO $path | $GREP ^.:`
60252  new_path="$path"
60253  if test "x$has_colon" = x; then
60254    # Not in mixed or Windows style, start by that.
60255    new_path=`cmd //c echo $path`
60256  fi
60257
60258
60259  input_path="$new_path"
60260  # Check if we need to convert this using DOS-style short mode. If the path
60261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60262  # take no chances and rewrite it.
60263  # Note: m4 eats our [], so we need to use [ and ] instead.
60264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60265  if test "x$has_forbidden_chars" != x; then
60266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60268  fi
60269
60270
60271  windows_path="$new_path"
60272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60273    unix_path=`$CYGPATH -u "$windows_path"`
60274    new_path="$unix_path"
60275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60277    new_path="$unix_path"
60278  fi
60279
60280  if test "x$path" != "x$new_path"; then
60281    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60284  fi
60285
60286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60288
60289    else
60290      # We're on a unix platform. Hooray! :)
60291      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60292      has_space=`$ECHO "$path" | $GREP " "`
60293      if test "x$has_space" != x; then
60294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60297      fi
60298
60299      # Use eval to expand a potential ~
60300      eval path="$path"
60301      if test ! -f "$path" && test ! -d "$path"; then
60302        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60303      fi
60304
60305      if test -d "$path"; then
60306        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60307      else
60308        dir="`$DIRNAME "$path"`"
60309        base="`$BASENAME "$path"`"
60310        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60311      fi
60312    fi
60313  fi
60314
60315
60316  # Only process if variable expands to non-empty
60317
60318  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60320
60321  # Input might be given as Windows format, start by converting to
60322  # unix format.
60323  path="$POTENTIAL_FREETYPE_LIB_PATH"
60324  new_path=`$CYGPATH -u "$path"`
60325
60326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60329  # "foo.exe" is OK but "foo" is an error.
60330  #
60331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60332  # It is also a way to make sure we got the proper file name for the real test later on.
60333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60334  if test "x$test_shortpath" = x; then
60335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60337    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60338  fi
60339
60340  # Call helper function which possibly converts this using DOS-style short mode.
60341  # If so, the updated path is stored in $new_path.
60342
60343  input_path="$new_path"
60344  # Check if we need to convert this using DOS-style short mode. If the path
60345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60346  # take no chances and rewrite it.
60347  # Note: m4 eats our [], so we need to use [ and ] instead.
60348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60349  if test "x$has_forbidden_chars" != x; then
60350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60354      # Going to short mode and back again did indeed matter. Since short mode is
60355      # case insensitive, let's make it lowercase to improve readability.
60356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60357      # Now convert it back to Unix-style (cygpath)
60358      input_path=`$CYGPATH -u "$shortmode_path"`
60359      new_path="$input_path"
60360    fi
60361  fi
60362
60363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60364  if test "x$test_cygdrive_prefix" = x; then
60365    # As a simple fix, exclude /usr/bin since it's not a real path.
60366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60368      # a path prefixed by /cygdrive for fixpath to work.
60369      new_path="$CYGWIN_ROOT_PATH$input_path"
60370    fi
60371  fi
60372
60373
60374  if test "x$path" != "x$new_path"; then
60375    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60378  fi
60379
60380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60381
60382  path="$POTENTIAL_FREETYPE_LIB_PATH"
60383  has_colon=`$ECHO $path | $GREP ^.:`
60384  new_path="$path"
60385  if test "x$has_colon" = x; then
60386    # Not in mixed or Windows style, start by that.
60387    new_path=`cmd //c echo $path`
60388  fi
60389
60390
60391  input_path="$new_path"
60392  # Check if we need to convert this using DOS-style short mode. If the path
60393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60394  # take no chances and rewrite it.
60395  # Note: m4 eats our [], so we need to use [ and ] instead.
60396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60397  if test "x$has_forbidden_chars" != x; then
60398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60400  fi
60401
60402
60403  windows_path="$new_path"
60404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60405    unix_path=`$CYGPATH -u "$windows_path"`
60406    new_path="$unix_path"
60407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60409    new_path="$unix_path"
60410  fi
60411
60412  if test "x$path" != "x$new_path"; then
60413    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60416  fi
60417
60418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60420
60421    else
60422      # We're on a unix platform. Hooray! :)
60423      path="$POTENTIAL_FREETYPE_LIB_PATH"
60424      has_space=`$ECHO "$path" | $GREP " "`
60425      if test "x$has_space" != x; then
60426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60429      fi
60430
60431      # Use eval to expand a potential ~
60432      eval path="$path"
60433      if test ! -f "$path" && test ! -d "$path"; then
60434        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60435      fi
60436
60437      if test -d "$path"; then
60438        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60439      else
60440        dir="`$DIRNAME "$path"`"
60441        base="`$BASENAME "$path"`"
60442        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60443      fi
60444    fi
60445  fi
60446
60447
60448    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60450$as_echo_n "checking for freetype includes... " >&6; }
60451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60452$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60453    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60455$as_echo_n "checking for freetype libraries... " >&6; }
60456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60457$as_echo "$FREETYPE_LIB_PATH" >&6; }
60458  fi
60459
60460
60461          if test "x$FOUND_FREETYPE" != xyes; then
60462            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60463
60464  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60465  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60466  METHOD="well-known location"
60467
60468  # Let's start with an optimistic view of the world :-)
60469  FOUND_FREETYPE=yes
60470
60471  # First look for the canonical freetype main include file ft2build.h.
60472  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60473    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60474    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60475    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60476      # Fail.
60477      FOUND_FREETYPE=no
60478    fi
60479  fi
60480
60481  if test "x$FOUND_FREETYPE" = xyes; then
60482    # Include file found, let's continue the sanity check.
60483    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60484$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60485
60486    # Reset to default value
60487    FREETYPE_BASE_NAME=freetype
60488    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60489    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60490      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60491          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60492        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60493        # for the .6 version explicitly.
60494        FREETYPE_BASE_NAME=freetype.6
60495        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60496        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60497$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60498      else
60499        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60500$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60501        FOUND_FREETYPE=no
60502      fi
60503    else
60504      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60505        # On Windows, we will need both .lib and .dll file.
60506        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60507          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60508$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60509          FOUND_FREETYPE=no
60510        fi
60511      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60512          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60513        # Found lib in isa dir, use that instead.
60514        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60515        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60516$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60517      fi
60518    fi
60519  fi
60520
60521  if test "x$FOUND_FREETYPE" = xyes; then
60522
60523  # Only process if variable expands to non-empty
60524
60525  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60526    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60527
60528  # Input might be given as Windows format, start by converting to
60529  # unix format.
60530  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60531  new_path=`$CYGPATH -u "$path"`
60532
60533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60536  # "foo.exe" is OK but "foo" is an error.
60537  #
60538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60539  # It is also a way to make sure we got the proper file name for the real test later on.
60540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60541  if test "x$test_shortpath" = x; then
60542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60544    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60545  fi
60546
60547  # Call helper function which possibly converts this using DOS-style short mode.
60548  # If so, the updated path is stored in $new_path.
60549
60550  input_path="$new_path"
60551  # Check if we need to convert this using DOS-style short mode. If the path
60552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60553  # take no chances and rewrite it.
60554  # Note: m4 eats our [], so we need to use [ and ] instead.
60555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60556  if test "x$has_forbidden_chars" != x; then
60557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60561      # Going to short mode and back again did indeed matter. Since short mode is
60562      # case insensitive, let's make it lowercase to improve readability.
60563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60564      # Now convert it back to Unix-style (cygpath)
60565      input_path=`$CYGPATH -u "$shortmode_path"`
60566      new_path="$input_path"
60567    fi
60568  fi
60569
60570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60571  if test "x$test_cygdrive_prefix" = x; then
60572    # As a simple fix, exclude /usr/bin since it's not a real path.
60573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60575      # a path prefixed by /cygdrive for fixpath to work.
60576      new_path="$CYGWIN_ROOT_PATH$input_path"
60577    fi
60578  fi
60579
60580
60581  if test "x$path" != "x$new_path"; then
60582    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60585  fi
60586
60587    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60588
60589  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60590  has_colon=`$ECHO $path | $GREP ^.:`
60591  new_path="$path"
60592  if test "x$has_colon" = x; then
60593    # Not in mixed or Windows style, start by that.
60594    new_path=`cmd //c echo $path`
60595  fi
60596
60597
60598  input_path="$new_path"
60599  # Check if we need to convert this using DOS-style short mode. If the path
60600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60601  # take no chances and rewrite it.
60602  # Note: m4 eats our [], so we need to use [ and ] instead.
60603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60604  if test "x$has_forbidden_chars" != x; then
60605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60607  fi
60608
60609
60610  windows_path="$new_path"
60611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60612    unix_path=`$CYGPATH -u "$windows_path"`
60613    new_path="$unix_path"
60614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60616    new_path="$unix_path"
60617  fi
60618
60619  if test "x$path" != "x$new_path"; then
60620    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60623  fi
60624
60625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60627
60628    else
60629      # We're on a unix platform. Hooray! :)
60630      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60631      has_space=`$ECHO "$path" | $GREP " "`
60632      if test "x$has_space" != x; then
60633        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60635        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60636      fi
60637
60638      # Use eval to expand a potential ~
60639      eval path="$path"
60640      if test ! -f "$path" && test ! -d "$path"; then
60641        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60642      fi
60643
60644      if test -d "$path"; then
60645        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60646      else
60647        dir="`$DIRNAME "$path"`"
60648        base="`$BASENAME "$path"`"
60649        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60650      fi
60651    fi
60652  fi
60653
60654
60655  # Only process if variable expands to non-empty
60656
60657  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60659
60660  # Input might be given as Windows format, start by converting to
60661  # unix format.
60662  path="$POTENTIAL_FREETYPE_LIB_PATH"
60663  new_path=`$CYGPATH -u "$path"`
60664
60665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60668  # "foo.exe" is OK but "foo" is an error.
60669  #
60670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60671  # It is also a way to make sure we got the proper file name for the real test later on.
60672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60673  if test "x$test_shortpath" = x; then
60674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60675$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60676    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60677  fi
60678
60679  # Call helper function which possibly converts this using DOS-style short mode.
60680  # If so, the updated path is stored in $new_path.
60681
60682  input_path="$new_path"
60683  # Check if we need to convert this using DOS-style short mode. If the path
60684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60685  # take no chances and rewrite it.
60686  # Note: m4 eats our [], so we need to use [ and ] instead.
60687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60688  if test "x$has_forbidden_chars" != x; then
60689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60693      # Going to short mode and back again did indeed matter. Since short mode is
60694      # case insensitive, let's make it lowercase to improve readability.
60695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60696      # Now convert it back to Unix-style (cygpath)
60697      input_path=`$CYGPATH -u "$shortmode_path"`
60698      new_path="$input_path"
60699    fi
60700  fi
60701
60702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60703  if test "x$test_cygdrive_prefix" = x; then
60704    # As a simple fix, exclude /usr/bin since it's not a real path.
60705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60707      # a path prefixed by /cygdrive for fixpath to work.
60708      new_path="$CYGWIN_ROOT_PATH$input_path"
60709    fi
60710  fi
60711
60712
60713  if test "x$path" != "x$new_path"; then
60714    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60717  fi
60718
60719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60720
60721  path="$POTENTIAL_FREETYPE_LIB_PATH"
60722  has_colon=`$ECHO $path | $GREP ^.:`
60723  new_path="$path"
60724  if test "x$has_colon" = x; then
60725    # Not in mixed or Windows style, start by that.
60726    new_path=`cmd //c echo $path`
60727  fi
60728
60729
60730  input_path="$new_path"
60731  # Check if we need to convert this using DOS-style short mode. If the path
60732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60733  # take no chances and rewrite it.
60734  # Note: m4 eats our [], so we need to use [ and ] instead.
60735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60736  if test "x$has_forbidden_chars" != x; then
60737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60739  fi
60740
60741
60742  windows_path="$new_path"
60743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60744    unix_path=`$CYGPATH -u "$windows_path"`
60745    new_path="$unix_path"
60746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60748    new_path="$unix_path"
60749  fi
60750
60751  if test "x$path" != "x$new_path"; then
60752    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60755  fi
60756
60757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60759
60760    else
60761      # We're on a unix platform. Hooray! :)
60762      path="$POTENTIAL_FREETYPE_LIB_PATH"
60763      has_space=`$ECHO "$path" | $GREP " "`
60764      if test "x$has_space" != x; then
60765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60768      fi
60769
60770      # Use eval to expand a potential ~
60771      eval path="$path"
60772      if test ! -f "$path" && test ! -d "$path"; then
60773        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60774      fi
60775
60776      if test -d "$path"; then
60777        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60778      else
60779        dir="`$DIRNAME "$path"`"
60780        base="`$BASENAME "$path"`"
60781        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60782      fi
60783    fi
60784  fi
60785
60786
60787    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60789$as_echo_n "checking for freetype includes... " >&6; }
60790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60791$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60792    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60794$as_echo_n "checking for freetype libraries... " >&6; }
60795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60796$as_echo "$FREETYPE_LIB_PATH" >&6; }
60797  fi
60798
60799          fi
60800          if test "x$FOUND_FREETYPE" != xyes; then
60801            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60802
60803  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60804  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60805  METHOD="well-known location"
60806
60807  # Let's start with an optimistic view of the world :-)
60808  FOUND_FREETYPE=yes
60809
60810  # First look for the canonical freetype main include file ft2build.h.
60811  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60812    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60813    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60814    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60815      # Fail.
60816      FOUND_FREETYPE=no
60817    fi
60818  fi
60819
60820  if test "x$FOUND_FREETYPE" = xyes; then
60821    # Include file found, let's continue the sanity check.
60822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60823$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60824
60825    # Reset to default value
60826    FREETYPE_BASE_NAME=freetype
60827    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60828    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60829      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60830          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60831        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60832        # for the .6 version explicitly.
60833        FREETYPE_BASE_NAME=freetype.6
60834        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60835        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60836$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60837      else
60838        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60839$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60840        FOUND_FREETYPE=no
60841      fi
60842    else
60843      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60844        # On Windows, we will need both .lib and .dll file.
60845        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60846          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60847$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60848          FOUND_FREETYPE=no
60849        fi
60850      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60851          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60852        # Found lib in isa dir, use that instead.
60853        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60854        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60855$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60856      fi
60857    fi
60858  fi
60859
60860  if test "x$FOUND_FREETYPE" = xyes; then
60861
60862  # Only process if variable expands to non-empty
60863
60864  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60866
60867  # Input might be given as Windows format, start by converting to
60868  # unix format.
60869  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60870  new_path=`$CYGPATH -u "$path"`
60871
60872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60875  # "foo.exe" is OK but "foo" is an error.
60876  #
60877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60878  # It is also a way to make sure we got the proper file name for the real test later on.
60879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60880  if test "x$test_shortpath" = x; then
60881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60882$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60883    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60884  fi
60885
60886  # Call helper function which possibly converts this using DOS-style short mode.
60887  # If so, the updated path is stored in $new_path.
60888
60889  input_path="$new_path"
60890  # Check if we need to convert this using DOS-style short mode. If the path
60891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60892  # take no chances and rewrite it.
60893  # Note: m4 eats our [], so we need to use [ and ] instead.
60894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60895  if test "x$has_forbidden_chars" != x; then
60896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60900      # Going to short mode and back again did indeed matter. Since short mode is
60901      # case insensitive, let's make it lowercase to improve readability.
60902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60903      # Now convert it back to Unix-style (cygpath)
60904      input_path=`$CYGPATH -u "$shortmode_path"`
60905      new_path="$input_path"
60906    fi
60907  fi
60908
60909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60910  if test "x$test_cygdrive_prefix" = x; then
60911    # As a simple fix, exclude /usr/bin since it's not a real path.
60912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60914      # a path prefixed by /cygdrive for fixpath to work.
60915      new_path="$CYGWIN_ROOT_PATH$input_path"
60916    fi
60917  fi
60918
60919
60920  if test "x$path" != "x$new_path"; then
60921    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60924  fi
60925
60926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60927
60928  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60929  has_colon=`$ECHO $path | $GREP ^.:`
60930  new_path="$path"
60931  if test "x$has_colon" = x; then
60932    # Not in mixed or Windows style, start by that.
60933    new_path=`cmd //c echo $path`
60934  fi
60935
60936
60937  input_path="$new_path"
60938  # Check if we need to convert this using DOS-style short mode. If the path
60939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60940  # take no chances and rewrite it.
60941  # Note: m4 eats our [], so we need to use [ and ] instead.
60942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60943  if test "x$has_forbidden_chars" != x; then
60944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60946  fi
60947
60948
60949  windows_path="$new_path"
60950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60951    unix_path=`$CYGPATH -u "$windows_path"`
60952    new_path="$unix_path"
60953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60955    new_path="$unix_path"
60956  fi
60957
60958  if test "x$path" != "x$new_path"; then
60959    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60962  fi
60963
60964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60966
60967    else
60968      # We're on a unix platform. Hooray! :)
60969      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60970      has_space=`$ECHO "$path" | $GREP " "`
60971      if test "x$has_space" != x; then
60972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60973$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60975      fi
60976
60977      # Use eval to expand a potential ~
60978      eval path="$path"
60979      if test ! -f "$path" && test ! -d "$path"; then
60980        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60981      fi
60982
60983      if test -d "$path"; then
60984        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60985      else
60986        dir="`$DIRNAME "$path"`"
60987        base="`$BASENAME "$path"`"
60988        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60989      fi
60990    fi
60991  fi
60992
60993
60994  # Only process if variable expands to non-empty
60995
60996  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60998
60999  # Input might be given as Windows format, start by converting to
61000  # unix format.
61001  path="$POTENTIAL_FREETYPE_LIB_PATH"
61002  new_path=`$CYGPATH -u "$path"`
61003
61004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61007  # "foo.exe" is OK but "foo" is an error.
61008  #
61009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61010  # It is also a way to make sure we got the proper file name for the real test later on.
61011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61012  if test "x$test_shortpath" = x; then
61013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61014$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61015    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61016  fi
61017
61018  # Call helper function which possibly converts this using DOS-style short mode.
61019  # If so, the updated path is stored in $new_path.
61020
61021  input_path="$new_path"
61022  # Check if we need to convert this using DOS-style short mode. If the path
61023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61024  # take no chances and rewrite it.
61025  # Note: m4 eats our [], so we need to use [ and ] instead.
61026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61027  if test "x$has_forbidden_chars" != x; then
61028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61032      # Going to short mode and back again did indeed matter. Since short mode is
61033      # case insensitive, let's make it lowercase to improve readability.
61034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61035      # Now convert it back to Unix-style (cygpath)
61036      input_path=`$CYGPATH -u "$shortmode_path"`
61037      new_path="$input_path"
61038    fi
61039  fi
61040
61041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61042  if test "x$test_cygdrive_prefix" = x; then
61043    # As a simple fix, exclude /usr/bin since it's not a real path.
61044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61046      # a path prefixed by /cygdrive for fixpath to work.
61047      new_path="$CYGWIN_ROOT_PATH$input_path"
61048    fi
61049  fi
61050
61051
61052  if test "x$path" != "x$new_path"; then
61053    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61056  fi
61057
61058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61059
61060  path="$POTENTIAL_FREETYPE_LIB_PATH"
61061  has_colon=`$ECHO $path | $GREP ^.:`
61062  new_path="$path"
61063  if test "x$has_colon" = x; then
61064    # Not in mixed or Windows style, start by that.
61065    new_path=`cmd //c echo $path`
61066  fi
61067
61068
61069  input_path="$new_path"
61070  # Check if we need to convert this using DOS-style short mode. If the path
61071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61072  # take no chances and rewrite it.
61073  # Note: m4 eats our [], so we need to use [ and ] instead.
61074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61075  if test "x$has_forbidden_chars" != x; then
61076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61078  fi
61079
61080
61081  windows_path="$new_path"
61082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61083    unix_path=`$CYGPATH -u "$windows_path"`
61084    new_path="$unix_path"
61085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61087    new_path="$unix_path"
61088  fi
61089
61090  if test "x$path" != "x$new_path"; then
61091    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61093$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61094  fi
61095
61096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61098
61099    else
61100      # We're on a unix platform. Hooray! :)
61101      path="$POTENTIAL_FREETYPE_LIB_PATH"
61102      has_space=`$ECHO "$path" | $GREP " "`
61103      if test "x$has_space" != x; then
61104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61105$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61107      fi
61108
61109      # Use eval to expand a potential ~
61110      eval path="$path"
61111      if test ! -f "$path" && test ! -d "$path"; then
61112        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61113      fi
61114
61115      if test -d "$path"; then
61116        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61117      else
61118        dir="`$DIRNAME "$path"`"
61119        base="`$BASENAME "$path"`"
61120        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61121      fi
61122    fi
61123  fi
61124
61125
61126    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61128$as_echo_n "checking for freetype includes... " >&6; }
61129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61130$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61131    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61133$as_echo_n "checking for freetype libraries... " >&6; }
61134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61135$as_echo "$FREETYPE_LIB_PATH" >&6; }
61136  fi
61137
61138          fi
61139
61140          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61141            if test "x$FOUND_FREETYPE" != xyes; then
61142              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61143              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61144
61145  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61146  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61147  METHOD="well-known location"
61148
61149  # Let's start with an optimistic view of the world :-)
61150  FOUND_FREETYPE=yes
61151
61152  # First look for the canonical freetype main include file ft2build.h.
61153  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61154    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61155    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61156    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61157      # Fail.
61158      FOUND_FREETYPE=no
61159    fi
61160  fi
61161
61162  if test "x$FOUND_FREETYPE" = xyes; then
61163    # Include file found, let's continue the sanity check.
61164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61165$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61166
61167    # Reset to default value
61168    FREETYPE_BASE_NAME=freetype
61169    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61170    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61171      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61172          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61173        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61174        # for the .6 version explicitly.
61175        FREETYPE_BASE_NAME=freetype.6
61176        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61177        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61178$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61179      else
61180        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61181$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61182        FOUND_FREETYPE=no
61183      fi
61184    else
61185      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61186        # On Windows, we will need both .lib and .dll file.
61187        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61188          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61189$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61190          FOUND_FREETYPE=no
61191        fi
61192      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61193          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61194        # Found lib in isa dir, use that instead.
61195        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61196        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61197$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61198      fi
61199    fi
61200  fi
61201
61202  if test "x$FOUND_FREETYPE" = xyes; then
61203
61204  # Only process if variable expands to non-empty
61205
61206  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61208
61209  # Input might be given as Windows format, start by converting to
61210  # unix format.
61211  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61212  new_path=`$CYGPATH -u "$path"`
61213
61214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61217  # "foo.exe" is OK but "foo" is an error.
61218  #
61219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61220  # It is also a way to make sure we got the proper file name for the real test later on.
61221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61222  if test "x$test_shortpath" = x; then
61223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61225    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61226  fi
61227
61228  # Call helper function which possibly converts this using DOS-style short mode.
61229  # If so, the updated path is stored in $new_path.
61230
61231  input_path="$new_path"
61232  # Check if we need to convert this using DOS-style short mode. If the path
61233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61234  # take no chances and rewrite it.
61235  # Note: m4 eats our [], so we need to use [ and ] instead.
61236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61237  if test "x$has_forbidden_chars" != x; then
61238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61242      # Going to short mode and back again did indeed matter. Since short mode is
61243      # case insensitive, let's make it lowercase to improve readability.
61244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61245      # Now convert it back to Unix-style (cygpath)
61246      input_path=`$CYGPATH -u "$shortmode_path"`
61247      new_path="$input_path"
61248    fi
61249  fi
61250
61251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61252  if test "x$test_cygdrive_prefix" = x; then
61253    # As a simple fix, exclude /usr/bin since it's not a real path.
61254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61256      # a path prefixed by /cygdrive for fixpath to work.
61257      new_path="$CYGWIN_ROOT_PATH$input_path"
61258    fi
61259  fi
61260
61261
61262  if test "x$path" != "x$new_path"; then
61263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61266  fi
61267
61268    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61269
61270  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61271  has_colon=`$ECHO $path | $GREP ^.:`
61272  new_path="$path"
61273  if test "x$has_colon" = x; then
61274    # Not in mixed or Windows style, start by that.
61275    new_path=`cmd //c echo $path`
61276  fi
61277
61278
61279  input_path="$new_path"
61280  # Check if we need to convert this using DOS-style short mode. If the path
61281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61282  # take no chances and rewrite it.
61283  # Note: m4 eats our [], so we need to use [ and ] instead.
61284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61285  if test "x$has_forbidden_chars" != x; then
61286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61288  fi
61289
61290
61291  windows_path="$new_path"
61292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61293    unix_path=`$CYGPATH -u "$windows_path"`
61294    new_path="$unix_path"
61295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61297    new_path="$unix_path"
61298  fi
61299
61300  if test "x$path" != "x$new_path"; then
61301    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61304  fi
61305
61306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61308
61309    else
61310      # We're on a unix platform. Hooray! :)
61311      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61312      has_space=`$ECHO "$path" | $GREP " "`
61313      if test "x$has_space" != x; then
61314        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61316        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61317      fi
61318
61319      # Use eval to expand a potential ~
61320      eval path="$path"
61321      if test ! -f "$path" && test ! -d "$path"; then
61322        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61323      fi
61324
61325      if test -d "$path"; then
61326        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61327      else
61328        dir="`$DIRNAME "$path"`"
61329        base="`$BASENAME "$path"`"
61330        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61331      fi
61332    fi
61333  fi
61334
61335
61336  # Only process if variable expands to non-empty
61337
61338  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61340
61341  # Input might be given as Windows format, start by converting to
61342  # unix format.
61343  path="$POTENTIAL_FREETYPE_LIB_PATH"
61344  new_path=`$CYGPATH -u "$path"`
61345
61346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61349  # "foo.exe" is OK but "foo" is an error.
61350  #
61351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61352  # It is also a way to make sure we got the proper file name for the real test later on.
61353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61354  if test "x$test_shortpath" = x; then
61355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61357    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61358  fi
61359
61360  # Call helper function which possibly converts this using DOS-style short mode.
61361  # If so, the updated path is stored in $new_path.
61362
61363  input_path="$new_path"
61364  # Check if we need to convert this using DOS-style short mode. If the path
61365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61366  # take no chances and rewrite it.
61367  # Note: m4 eats our [], so we need to use [ and ] instead.
61368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61369  if test "x$has_forbidden_chars" != x; then
61370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61374      # Going to short mode and back again did indeed matter. Since short mode is
61375      # case insensitive, let's make it lowercase to improve readability.
61376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61377      # Now convert it back to Unix-style (cygpath)
61378      input_path=`$CYGPATH -u "$shortmode_path"`
61379      new_path="$input_path"
61380    fi
61381  fi
61382
61383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61384  if test "x$test_cygdrive_prefix" = x; then
61385    # As a simple fix, exclude /usr/bin since it's not a real path.
61386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61388      # a path prefixed by /cygdrive for fixpath to work.
61389      new_path="$CYGWIN_ROOT_PATH$input_path"
61390    fi
61391  fi
61392
61393
61394  if test "x$path" != "x$new_path"; then
61395    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61398  fi
61399
61400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61401
61402  path="$POTENTIAL_FREETYPE_LIB_PATH"
61403  has_colon=`$ECHO $path | $GREP ^.:`
61404  new_path="$path"
61405  if test "x$has_colon" = x; then
61406    # Not in mixed or Windows style, start by that.
61407    new_path=`cmd //c echo $path`
61408  fi
61409
61410
61411  input_path="$new_path"
61412  # Check if we need to convert this using DOS-style short mode. If the path
61413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61414  # take no chances and rewrite it.
61415  # Note: m4 eats our [], so we need to use [ and ] instead.
61416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61417  if test "x$has_forbidden_chars" != x; then
61418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61420  fi
61421
61422
61423  windows_path="$new_path"
61424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61425    unix_path=`$CYGPATH -u "$windows_path"`
61426    new_path="$unix_path"
61427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61429    new_path="$unix_path"
61430  fi
61431
61432  if test "x$path" != "x$new_path"; then
61433    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61436  fi
61437
61438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61440
61441    else
61442      # We're on a unix platform. Hooray! :)
61443      path="$POTENTIAL_FREETYPE_LIB_PATH"
61444      has_space=`$ECHO "$path" | $GREP " "`
61445      if test "x$has_space" != x; then
61446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61449      fi
61450
61451      # Use eval to expand a potential ~
61452      eval path="$path"
61453      if test ! -f "$path" && test ! -d "$path"; then
61454        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61455      fi
61456
61457      if test -d "$path"; then
61458        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61459      else
61460        dir="`$DIRNAME "$path"`"
61461        base="`$BASENAME "$path"`"
61462        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61463      fi
61464    fi
61465  fi
61466
61467
61468    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61470$as_echo_n "checking for freetype includes... " >&6; }
61471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61472$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61473    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61475$as_echo_n "checking for freetype libraries... " >&6; }
61476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61477$as_echo "$FREETYPE_LIB_PATH" >&6; }
61478  fi
61479
61480            fi
61481          fi
61482
61483          if test "x$FOUND_FREETYPE" != xyes; then
61484            FREETYPE_BASE_DIR="$SYSROOT/usr"
61485            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61486
61487  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61488  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61489  METHOD="well-known location"
61490
61491  # Let's start with an optimistic view of the world :-)
61492  FOUND_FREETYPE=yes
61493
61494  # First look for the canonical freetype main include file ft2build.h.
61495  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61496    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61497    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61498    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61499      # Fail.
61500      FOUND_FREETYPE=no
61501    fi
61502  fi
61503
61504  if test "x$FOUND_FREETYPE" = xyes; then
61505    # Include file found, let's continue the sanity check.
61506    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61507$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61508
61509    # Reset to default value
61510    FREETYPE_BASE_NAME=freetype
61511    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61512    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61513      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61514          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61515        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61516        # for the .6 version explicitly.
61517        FREETYPE_BASE_NAME=freetype.6
61518        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61519        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61520$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61521      else
61522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61524        FOUND_FREETYPE=no
61525      fi
61526    else
61527      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61528        # On Windows, we will need both .lib and .dll file.
61529        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61530          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61531$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61532          FOUND_FREETYPE=no
61533        fi
61534      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61535          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61536        # Found lib in isa dir, use that instead.
61537        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61538        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61539$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61540      fi
61541    fi
61542  fi
61543
61544  if test "x$FOUND_FREETYPE" = xyes; then
61545
61546  # Only process if variable expands to non-empty
61547
61548  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61550
61551  # Input might be given as Windows format, start by converting to
61552  # unix format.
61553  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61554  new_path=`$CYGPATH -u "$path"`
61555
61556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61559  # "foo.exe" is OK but "foo" is an error.
61560  #
61561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61562  # It is also a way to make sure we got the proper file name for the real test later on.
61563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61564  if test "x$test_shortpath" = x; then
61565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61566$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61567    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61568  fi
61569
61570  # Call helper function which possibly converts this using DOS-style short mode.
61571  # If so, the updated path is stored in $new_path.
61572
61573  input_path="$new_path"
61574  # Check if we need to convert this using DOS-style short mode. If the path
61575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61576  # take no chances and rewrite it.
61577  # Note: m4 eats our [], so we need to use [ and ] instead.
61578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61579  if test "x$has_forbidden_chars" != x; then
61580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61584      # Going to short mode and back again did indeed matter. Since short mode is
61585      # case insensitive, let's make it lowercase to improve readability.
61586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61587      # Now convert it back to Unix-style (cygpath)
61588      input_path=`$CYGPATH -u "$shortmode_path"`
61589      new_path="$input_path"
61590    fi
61591  fi
61592
61593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61594  if test "x$test_cygdrive_prefix" = x; then
61595    # As a simple fix, exclude /usr/bin since it's not a real path.
61596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61598      # a path prefixed by /cygdrive for fixpath to work.
61599      new_path="$CYGWIN_ROOT_PATH$input_path"
61600    fi
61601  fi
61602
61603
61604  if test "x$path" != "x$new_path"; then
61605    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61607$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61608  fi
61609
61610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61611
61612  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61613  has_colon=`$ECHO $path | $GREP ^.:`
61614  new_path="$path"
61615  if test "x$has_colon" = x; then
61616    # Not in mixed or Windows style, start by that.
61617    new_path=`cmd //c echo $path`
61618  fi
61619
61620
61621  input_path="$new_path"
61622  # Check if we need to convert this using DOS-style short mode. If the path
61623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61624  # take no chances and rewrite it.
61625  # Note: m4 eats our [], so we need to use [ and ] instead.
61626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61627  if test "x$has_forbidden_chars" != x; then
61628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61630  fi
61631
61632
61633  windows_path="$new_path"
61634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61635    unix_path=`$CYGPATH -u "$windows_path"`
61636    new_path="$unix_path"
61637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61639    new_path="$unix_path"
61640  fi
61641
61642  if test "x$path" != "x$new_path"; then
61643    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61646  fi
61647
61648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61650
61651    else
61652      # We're on a unix platform. Hooray! :)
61653      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61654      has_space=`$ECHO "$path" | $GREP " "`
61655      if test "x$has_space" != x; then
61656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61659      fi
61660
61661      # Use eval to expand a potential ~
61662      eval path="$path"
61663      if test ! -f "$path" && test ! -d "$path"; then
61664        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61665      fi
61666
61667      if test -d "$path"; then
61668        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61669      else
61670        dir="`$DIRNAME "$path"`"
61671        base="`$BASENAME "$path"`"
61672        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61673      fi
61674    fi
61675  fi
61676
61677
61678  # Only process if variable expands to non-empty
61679
61680  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61682
61683  # Input might be given as Windows format, start by converting to
61684  # unix format.
61685  path="$POTENTIAL_FREETYPE_LIB_PATH"
61686  new_path=`$CYGPATH -u "$path"`
61687
61688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61691  # "foo.exe" is OK but "foo" is an error.
61692  #
61693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61694  # It is also a way to make sure we got the proper file name for the real test later on.
61695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61696  if test "x$test_shortpath" = x; then
61697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61699    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61700  fi
61701
61702  # Call helper function which possibly converts this using DOS-style short mode.
61703  # If so, the updated path is stored in $new_path.
61704
61705  input_path="$new_path"
61706  # Check if we need to convert this using DOS-style short mode. If the path
61707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61708  # take no chances and rewrite it.
61709  # Note: m4 eats our [], so we need to use [ and ] instead.
61710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61711  if test "x$has_forbidden_chars" != x; then
61712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61716      # Going to short mode and back again did indeed matter. Since short mode is
61717      # case insensitive, let's make it lowercase to improve readability.
61718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61719      # Now convert it back to Unix-style (cygpath)
61720      input_path=`$CYGPATH -u "$shortmode_path"`
61721      new_path="$input_path"
61722    fi
61723  fi
61724
61725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61726  if test "x$test_cygdrive_prefix" = x; then
61727    # As a simple fix, exclude /usr/bin since it's not a real path.
61728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61730      # a path prefixed by /cygdrive for fixpath to work.
61731      new_path="$CYGWIN_ROOT_PATH$input_path"
61732    fi
61733  fi
61734
61735
61736  if test "x$path" != "x$new_path"; then
61737    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61740  fi
61741
61742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61743
61744  path="$POTENTIAL_FREETYPE_LIB_PATH"
61745  has_colon=`$ECHO $path | $GREP ^.:`
61746  new_path="$path"
61747  if test "x$has_colon" = x; then
61748    # Not in mixed or Windows style, start by that.
61749    new_path=`cmd //c echo $path`
61750  fi
61751
61752
61753  input_path="$new_path"
61754  # Check if we need to convert this using DOS-style short mode. If the path
61755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61756  # take no chances and rewrite it.
61757  # Note: m4 eats our [], so we need to use [ and ] instead.
61758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61759  if test "x$has_forbidden_chars" != x; then
61760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61762  fi
61763
61764
61765  windows_path="$new_path"
61766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61767    unix_path=`$CYGPATH -u "$windows_path"`
61768    new_path="$unix_path"
61769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61771    new_path="$unix_path"
61772  fi
61773
61774  if test "x$path" != "x$new_path"; then
61775    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61778  fi
61779
61780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61782
61783    else
61784      # We're on a unix platform. Hooray! :)
61785      path="$POTENTIAL_FREETYPE_LIB_PATH"
61786      has_space=`$ECHO "$path" | $GREP " "`
61787      if test "x$has_space" != x; then
61788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61791      fi
61792
61793      # Use eval to expand a potential ~
61794      eval path="$path"
61795      if test ! -f "$path" && test ! -d "$path"; then
61796        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61797      fi
61798
61799      if test -d "$path"; then
61800        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61801      else
61802        dir="`$DIRNAME "$path"`"
61803        base="`$BASENAME "$path"`"
61804        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61805      fi
61806    fi
61807  fi
61808
61809
61810    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61812$as_echo_n "checking for freetype includes... " >&6; }
61813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61814$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61815    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61816    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61817$as_echo_n "checking for freetype libraries... " >&6; }
61818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61819$as_echo "$FREETYPE_LIB_PATH" >&6; }
61820  fi
61821
61822            else
61823
61824  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61825  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61826  METHOD="well-known location"
61827
61828  # Let's start with an optimistic view of the world :-)
61829  FOUND_FREETYPE=yes
61830
61831  # First look for the canonical freetype main include file ft2build.h.
61832  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61833    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61834    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61835    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61836      # Fail.
61837      FOUND_FREETYPE=no
61838    fi
61839  fi
61840
61841  if test "x$FOUND_FREETYPE" = xyes; then
61842    # Include file found, let's continue the sanity check.
61843    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61844$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61845
61846    # Reset to default value
61847    FREETYPE_BASE_NAME=freetype
61848    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61849    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61850      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61851          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61852        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61853        # for the .6 version explicitly.
61854        FREETYPE_BASE_NAME=freetype.6
61855        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61856        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61857$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61858      else
61859        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61860$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61861        FOUND_FREETYPE=no
61862      fi
61863    else
61864      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61865        # On Windows, we will need both .lib and .dll file.
61866        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61867          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61868$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61869          FOUND_FREETYPE=no
61870        fi
61871      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61872          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61873        # Found lib in isa dir, use that instead.
61874        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61875        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61876$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61877      fi
61878    fi
61879  fi
61880
61881  if test "x$FOUND_FREETYPE" = xyes; then
61882
61883  # Only process if variable expands to non-empty
61884
61885  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61887
61888  # Input might be given as Windows format, start by converting to
61889  # unix format.
61890  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61891  new_path=`$CYGPATH -u "$path"`
61892
61893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61896  # "foo.exe" is OK but "foo" is an error.
61897  #
61898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61899  # It is also a way to make sure we got the proper file name for the real test later on.
61900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61901  if test "x$test_shortpath" = x; then
61902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61904    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61905  fi
61906
61907  # Call helper function which possibly converts this using DOS-style short mode.
61908  # If so, the updated path is stored in $new_path.
61909
61910  input_path="$new_path"
61911  # Check if we need to convert this using DOS-style short mode. If the path
61912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61913  # take no chances and rewrite it.
61914  # Note: m4 eats our [], so we need to use [ and ] instead.
61915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61916  if test "x$has_forbidden_chars" != x; then
61917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61921      # Going to short mode and back again did indeed matter. Since short mode is
61922      # case insensitive, let's make it lowercase to improve readability.
61923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61924      # Now convert it back to Unix-style (cygpath)
61925      input_path=`$CYGPATH -u "$shortmode_path"`
61926      new_path="$input_path"
61927    fi
61928  fi
61929
61930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61931  if test "x$test_cygdrive_prefix" = x; then
61932    # As a simple fix, exclude /usr/bin since it's not a real path.
61933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61935      # a path prefixed by /cygdrive for fixpath to work.
61936      new_path="$CYGWIN_ROOT_PATH$input_path"
61937    fi
61938  fi
61939
61940
61941  if test "x$path" != "x$new_path"; then
61942    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61945  fi
61946
61947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61948
61949  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61950  has_colon=`$ECHO $path | $GREP ^.:`
61951  new_path="$path"
61952  if test "x$has_colon" = x; then
61953    # Not in mixed or Windows style, start by that.
61954    new_path=`cmd //c echo $path`
61955  fi
61956
61957
61958  input_path="$new_path"
61959  # Check if we need to convert this using DOS-style short mode. If the path
61960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61961  # take no chances and rewrite it.
61962  # Note: m4 eats our [], so we need to use [ and ] instead.
61963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61964  if test "x$has_forbidden_chars" != x; then
61965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61967  fi
61968
61969
61970  windows_path="$new_path"
61971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61972    unix_path=`$CYGPATH -u "$windows_path"`
61973    new_path="$unix_path"
61974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61976    new_path="$unix_path"
61977  fi
61978
61979  if test "x$path" != "x$new_path"; then
61980    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61982$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61983  fi
61984
61985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61987
61988    else
61989      # We're on a unix platform. Hooray! :)
61990      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61991      has_space=`$ECHO "$path" | $GREP " "`
61992      if test "x$has_space" != x; then
61993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61994$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61996      fi
61997
61998      # Use eval to expand a potential ~
61999      eval path="$path"
62000      if test ! -f "$path" && test ! -d "$path"; then
62001        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62002      fi
62003
62004      if test -d "$path"; then
62005        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62006      else
62007        dir="`$DIRNAME "$path"`"
62008        base="`$BASENAME "$path"`"
62009        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62010      fi
62011    fi
62012  fi
62013
62014
62015  # Only process if variable expands to non-empty
62016
62017  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62019
62020  # Input might be given as Windows format, start by converting to
62021  # unix format.
62022  path="$POTENTIAL_FREETYPE_LIB_PATH"
62023  new_path=`$CYGPATH -u "$path"`
62024
62025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62028  # "foo.exe" is OK but "foo" is an error.
62029  #
62030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62031  # It is also a way to make sure we got the proper file name for the real test later on.
62032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62033  if test "x$test_shortpath" = x; then
62034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62035$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62036    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62037  fi
62038
62039  # Call helper function which possibly converts this using DOS-style short mode.
62040  # If so, the updated path is stored in $new_path.
62041
62042  input_path="$new_path"
62043  # Check if we need to convert this using DOS-style short mode. If the path
62044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62045  # take no chances and rewrite it.
62046  # Note: m4 eats our [], so we need to use [ and ] instead.
62047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62048  if test "x$has_forbidden_chars" != x; then
62049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62053      # Going to short mode and back again did indeed matter. Since short mode is
62054      # case insensitive, let's make it lowercase to improve readability.
62055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62056      # Now convert it back to Unix-style (cygpath)
62057      input_path=`$CYGPATH -u "$shortmode_path"`
62058      new_path="$input_path"
62059    fi
62060  fi
62061
62062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62063  if test "x$test_cygdrive_prefix" = x; then
62064    # As a simple fix, exclude /usr/bin since it's not a real path.
62065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62067      # a path prefixed by /cygdrive for fixpath to work.
62068      new_path="$CYGWIN_ROOT_PATH$input_path"
62069    fi
62070  fi
62071
62072
62073  if test "x$path" != "x$new_path"; then
62074    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62077  fi
62078
62079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62080
62081  path="$POTENTIAL_FREETYPE_LIB_PATH"
62082  has_colon=`$ECHO $path | $GREP ^.:`
62083  new_path="$path"
62084  if test "x$has_colon" = x; then
62085    # Not in mixed or Windows style, start by that.
62086    new_path=`cmd //c echo $path`
62087  fi
62088
62089
62090  input_path="$new_path"
62091  # Check if we need to convert this using DOS-style short mode. If the path
62092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62093  # take no chances and rewrite it.
62094  # Note: m4 eats our [], so we need to use [ and ] instead.
62095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62096  if test "x$has_forbidden_chars" != x; then
62097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62099  fi
62100
62101
62102  windows_path="$new_path"
62103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62104    unix_path=`$CYGPATH -u "$windows_path"`
62105    new_path="$unix_path"
62106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62108    new_path="$unix_path"
62109  fi
62110
62111  if test "x$path" != "x$new_path"; then
62112    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62114$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62115  fi
62116
62117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62119
62120    else
62121      # We're on a unix platform. Hooray! :)
62122      path="$POTENTIAL_FREETYPE_LIB_PATH"
62123      has_space=`$ECHO "$path" | $GREP " "`
62124      if test "x$has_space" != x; then
62125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62128      fi
62129
62130      # Use eval to expand a potential ~
62131      eval path="$path"
62132      if test ! -f "$path" && test ! -d "$path"; then
62133        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62134      fi
62135
62136      if test -d "$path"; then
62137        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62138      else
62139        dir="`$DIRNAME "$path"`"
62140        base="`$BASENAME "$path"`"
62141        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62142      fi
62143    fi
62144  fi
62145
62146
62147    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62149$as_echo_n "checking for freetype includes... " >&6; }
62150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62151$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62152    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62154$as_echo_n "checking for freetype libraries... " >&6; }
62155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62156$as_echo "$FREETYPE_LIB_PATH" >&6; }
62157  fi
62158
62159              if test "x$FOUND_FREETYPE" != xyes; then
62160
62161  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62162  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62163  METHOD="well-known location"
62164
62165  # Let's start with an optimistic view of the world :-)
62166  FOUND_FREETYPE=yes
62167
62168  # First look for the canonical freetype main include file ft2build.h.
62169  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62170    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62171    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62172    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62173      # Fail.
62174      FOUND_FREETYPE=no
62175    fi
62176  fi
62177
62178  if test "x$FOUND_FREETYPE" = xyes; then
62179    # Include file found, let's continue the sanity check.
62180    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62181$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62182
62183    # Reset to default value
62184    FREETYPE_BASE_NAME=freetype
62185    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62186    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62187      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62188          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62189        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62190        # for the .6 version explicitly.
62191        FREETYPE_BASE_NAME=freetype.6
62192        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62193        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62194$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62195      else
62196        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62197$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62198        FOUND_FREETYPE=no
62199      fi
62200    else
62201      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62202        # On Windows, we will need both .lib and .dll file.
62203        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62204          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62205$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62206          FOUND_FREETYPE=no
62207        fi
62208      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62209          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62210        # Found lib in isa dir, use that instead.
62211        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62212        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62213$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62214      fi
62215    fi
62216  fi
62217
62218  if test "x$FOUND_FREETYPE" = xyes; then
62219
62220  # Only process if variable expands to non-empty
62221
62222  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62224
62225  # Input might be given as Windows format, start by converting to
62226  # unix format.
62227  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62228  new_path=`$CYGPATH -u "$path"`
62229
62230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62233  # "foo.exe" is OK but "foo" is an error.
62234  #
62235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62236  # It is also a way to make sure we got the proper file name for the real test later on.
62237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62238  if test "x$test_shortpath" = x; then
62239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62240$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62241    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62242  fi
62243
62244  # Call helper function which possibly converts this using DOS-style short mode.
62245  # If so, the updated path is stored in $new_path.
62246
62247  input_path="$new_path"
62248  # Check if we need to convert this using DOS-style short mode. If the path
62249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62250  # take no chances and rewrite it.
62251  # Note: m4 eats our [], so we need to use [ and ] instead.
62252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62253  if test "x$has_forbidden_chars" != x; then
62254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62258      # Going to short mode and back again did indeed matter. Since short mode is
62259      # case insensitive, let's make it lowercase to improve readability.
62260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62261      # Now convert it back to Unix-style (cygpath)
62262      input_path=`$CYGPATH -u "$shortmode_path"`
62263      new_path="$input_path"
62264    fi
62265  fi
62266
62267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62268  if test "x$test_cygdrive_prefix" = x; then
62269    # As a simple fix, exclude /usr/bin since it's not a real path.
62270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62272      # a path prefixed by /cygdrive for fixpath to work.
62273      new_path="$CYGWIN_ROOT_PATH$input_path"
62274    fi
62275  fi
62276
62277
62278  if test "x$path" != "x$new_path"; then
62279    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62281$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62282  fi
62283
62284    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62285
62286  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62287  has_colon=`$ECHO $path | $GREP ^.:`
62288  new_path="$path"
62289  if test "x$has_colon" = x; then
62290    # Not in mixed or Windows style, start by that.
62291    new_path=`cmd //c echo $path`
62292  fi
62293
62294
62295  input_path="$new_path"
62296  # Check if we need to convert this using DOS-style short mode. If the path
62297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62298  # take no chances and rewrite it.
62299  # Note: m4 eats our [], so we need to use [ and ] instead.
62300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62301  if test "x$has_forbidden_chars" != x; then
62302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62304  fi
62305
62306
62307  windows_path="$new_path"
62308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62309    unix_path=`$CYGPATH -u "$windows_path"`
62310    new_path="$unix_path"
62311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62313    new_path="$unix_path"
62314  fi
62315
62316  if test "x$path" != "x$new_path"; then
62317    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62319$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62320  fi
62321
62322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62324
62325    else
62326      # We're on a unix platform. Hooray! :)
62327      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62328      has_space=`$ECHO "$path" | $GREP " "`
62329      if test "x$has_space" != x; then
62330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62332        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62333      fi
62334
62335      # Use eval to expand a potential ~
62336      eval path="$path"
62337      if test ! -f "$path" && test ! -d "$path"; then
62338        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62339      fi
62340
62341      if test -d "$path"; then
62342        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62343      else
62344        dir="`$DIRNAME "$path"`"
62345        base="`$BASENAME "$path"`"
62346        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62347      fi
62348    fi
62349  fi
62350
62351
62352  # Only process if variable expands to non-empty
62353
62354  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62356
62357  # Input might be given as Windows format, start by converting to
62358  # unix format.
62359  path="$POTENTIAL_FREETYPE_LIB_PATH"
62360  new_path=`$CYGPATH -u "$path"`
62361
62362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62365  # "foo.exe" is OK but "foo" is an error.
62366  #
62367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62368  # It is also a way to make sure we got the proper file name for the real test later on.
62369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62370  if test "x$test_shortpath" = x; then
62371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62373    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62374  fi
62375
62376  # Call helper function which possibly converts this using DOS-style short mode.
62377  # If so, the updated path is stored in $new_path.
62378
62379  input_path="$new_path"
62380  # Check if we need to convert this using DOS-style short mode. If the path
62381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62382  # take no chances and rewrite it.
62383  # Note: m4 eats our [], so we need to use [ and ] instead.
62384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62385  if test "x$has_forbidden_chars" != x; then
62386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62390      # Going to short mode and back again did indeed matter. Since short mode is
62391      # case insensitive, let's make it lowercase to improve readability.
62392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62393      # Now convert it back to Unix-style (cygpath)
62394      input_path=`$CYGPATH -u "$shortmode_path"`
62395      new_path="$input_path"
62396    fi
62397  fi
62398
62399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62400  if test "x$test_cygdrive_prefix" = x; then
62401    # As a simple fix, exclude /usr/bin since it's not a real path.
62402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62404      # a path prefixed by /cygdrive for fixpath to work.
62405      new_path="$CYGWIN_ROOT_PATH$input_path"
62406    fi
62407  fi
62408
62409
62410  if test "x$path" != "x$new_path"; then
62411    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62413$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62414  fi
62415
62416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62417
62418  path="$POTENTIAL_FREETYPE_LIB_PATH"
62419  has_colon=`$ECHO $path | $GREP ^.:`
62420  new_path="$path"
62421  if test "x$has_colon" = x; then
62422    # Not in mixed or Windows style, start by that.
62423    new_path=`cmd //c echo $path`
62424  fi
62425
62426
62427  input_path="$new_path"
62428  # Check if we need to convert this using DOS-style short mode. If the path
62429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62430  # take no chances and rewrite it.
62431  # Note: m4 eats our [], so we need to use [ and ] instead.
62432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62433  if test "x$has_forbidden_chars" != x; then
62434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62436  fi
62437
62438
62439  windows_path="$new_path"
62440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62441    unix_path=`$CYGPATH -u "$windows_path"`
62442    new_path="$unix_path"
62443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62445    new_path="$unix_path"
62446  fi
62447
62448  if test "x$path" != "x$new_path"; then
62449    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62451$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62452  fi
62453
62454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62456
62457    else
62458      # We're on a unix platform. Hooray! :)
62459      path="$POTENTIAL_FREETYPE_LIB_PATH"
62460      has_space=`$ECHO "$path" | $GREP " "`
62461      if test "x$has_space" != x; then
62462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62463$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62465      fi
62466
62467      # Use eval to expand a potential ~
62468      eval path="$path"
62469      if test ! -f "$path" && test ! -d "$path"; then
62470        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62471      fi
62472
62473      if test -d "$path"; then
62474        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62475      else
62476        dir="`$DIRNAME "$path"`"
62477        base="`$BASENAME "$path"`"
62478        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62479      fi
62480    fi
62481  fi
62482
62483
62484    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62486$as_echo_n "checking for freetype includes... " >&6; }
62487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62488$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62489    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62490    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62491$as_echo_n "checking for freetype libraries... " >&6; }
62492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62493$as_echo "$FREETYPE_LIB_PATH" >&6; }
62494  fi
62495
62496              fi
62497            fi
62498          fi
62499        fi
62500      fi # end check in well-known locations
62501
62502      if test "x$FOUND_FREETYPE" != xyes; then
62503
62504  # Print a helpful message on how to acquire the necessary build dependency.
62505  # freetype is the help tag: freetype, cups, alsa etc
62506  MISSING_DEPENDENCY=freetype
62507
62508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62509    cygwin_help $MISSING_DEPENDENCY
62510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62511    msys_help $MISSING_DEPENDENCY
62512  else
62513    PKGHANDLER_COMMAND=
62514
62515    case $PKGHANDLER in
62516      apt-get)
62517        apt_help     $MISSING_DEPENDENCY ;;
62518      yum)
62519        yum_help     $MISSING_DEPENDENCY ;;
62520      brew)
62521        brew_help    $MISSING_DEPENDENCY ;;
62522      port)
62523        port_help    $MISSING_DEPENDENCY ;;
62524      pkgutil)
62525        pkgutil_help $MISSING_DEPENDENCY ;;
62526      pkgadd)
62527        pkgadd_help  $MISSING_DEPENDENCY ;;
62528    esac
62529
62530    if test "x$PKGHANDLER_COMMAND" != x; then
62531      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62532    fi
62533  fi
62534
62535        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62536      fi
62537    fi # end user specified settings
62538
62539    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62540    if test "x$FREETYPE_CFLAGS" = x; then
62541
62542  # Only process if variable expands to non-empty
62543
62544  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62546
62547  # Input might be given as Windows format, start by converting to
62548  # unix format.
62549  path="$FREETYPE_INCLUDE_PATH"
62550  new_path=`$CYGPATH -u "$path"`
62551
62552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62555  # "foo.exe" is OK but "foo" is an error.
62556  #
62557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62558  # It is also a way to make sure we got the proper file name for the real test later on.
62559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62560  if test "x$test_shortpath" = x; then
62561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62562$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62563    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62564  fi
62565
62566  # Call helper function which possibly converts this using DOS-style short mode.
62567  # If so, the updated path is stored in $new_path.
62568
62569  input_path="$new_path"
62570  # Check if we need to convert this using DOS-style short mode. If the path
62571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62572  # take no chances and rewrite it.
62573  # Note: m4 eats our [], so we need to use [ and ] instead.
62574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62575  if test "x$has_forbidden_chars" != x; then
62576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62580      # Going to short mode and back again did indeed matter. Since short mode is
62581      # case insensitive, let's make it lowercase to improve readability.
62582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62583      # Now convert it back to Unix-style (cygpath)
62584      input_path=`$CYGPATH -u "$shortmode_path"`
62585      new_path="$input_path"
62586    fi
62587  fi
62588
62589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62590  if test "x$test_cygdrive_prefix" = x; then
62591    # As a simple fix, exclude /usr/bin since it's not a real path.
62592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62594      # a path prefixed by /cygdrive for fixpath to work.
62595      new_path="$CYGWIN_ROOT_PATH$input_path"
62596    fi
62597  fi
62598
62599
62600  if test "x$path" != "x$new_path"; then
62601    FREETYPE_INCLUDE_PATH="$new_path"
62602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62603$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62604  fi
62605
62606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62607
62608  path="$FREETYPE_INCLUDE_PATH"
62609  has_colon=`$ECHO $path | $GREP ^.:`
62610  new_path="$path"
62611  if test "x$has_colon" = x; then
62612    # Not in mixed or Windows style, start by that.
62613    new_path=`cmd //c echo $path`
62614  fi
62615
62616
62617  input_path="$new_path"
62618  # Check if we need to convert this using DOS-style short mode. If the path
62619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62620  # take no chances and rewrite it.
62621  # Note: m4 eats our [], so we need to use [ and ] instead.
62622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62623  if test "x$has_forbidden_chars" != x; then
62624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62626  fi
62627
62628
62629  windows_path="$new_path"
62630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62631    unix_path=`$CYGPATH -u "$windows_path"`
62632    new_path="$unix_path"
62633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62635    new_path="$unix_path"
62636  fi
62637
62638  if test "x$path" != "x$new_path"; then
62639    FREETYPE_INCLUDE_PATH="$new_path"
62640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62641$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62642  fi
62643
62644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62646
62647    else
62648      # We're on a unix platform. Hooray! :)
62649      path="$FREETYPE_INCLUDE_PATH"
62650      has_space=`$ECHO "$path" | $GREP " "`
62651      if test "x$has_space" != x; then
62652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62653$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62655      fi
62656
62657      # Use eval to expand a potential ~
62658      eval path="$path"
62659      if test ! -f "$path" && test ! -d "$path"; then
62660        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62661      fi
62662
62663      if test -d "$path"; then
62664        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62665      else
62666        dir="`$DIRNAME "$path"`"
62667        base="`$BASENAME "$path"`"
62668        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62669      fi
62670    fi
62671  fi
62672
62673      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62674        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62675      else
62676        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62677      fi
62678    fi
62679
62680    if test "x$FREETYPE_LIBS" = x; then
62681
62682  # Only process if variable expands to non-empty
62683
62684  if test "x$FREETYPE_LIB_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="$FREETYPE_LIB_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 FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62702$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62703    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_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    FREETYPE_LIB_PATH="$new_path"
62742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62743$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62744  fi
62745
62746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62747
62748  path="$FREETYPE_LIB_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    FREETYPE_LIB_PATH="$new_path"
62780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62781$as_echo "$as_me: Rewriting FREETYPE_LIB_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="$FREETYPE_LIB_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 FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62793$as_echo "$as_me: The path of FREETYPE_LIB_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 FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62801      fi
62802
62803      if test -d "$path"; then
62804        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62805      else
62806        dir="`$DIRNAME "$path"`"
62807        base="`$BASENAME "$path"`"
62808        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62809      fi
62810    fi
62811  fi
62812
62813      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62814        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62815      else
62816        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62817      fi
62818    fi
62819
62820    # Try to compile it
62821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62822$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62823    ac_ext=cpp
62824ac_cpp='$CXXCPP $CPPFLAGS'
62825ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62826ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62827ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62828
62829    PREV_CXXCFLAGS="$CXXFLAGS"
62830    PREV_LIBS="$LIBS"
62831    PREV_CXX="$CXX"
62832    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62833    LIBS="$LIBS $FREETYPE_LIBS"
62834    CXX="$FIXPATH $CXX"
62835    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62836/* end confdefs.h.  */
62837
62838          #include<ft2build.h>
62839          #include FT_FREETYPE_H
62840          int main () {
62841            FT_Init_FreeType(NULL);
62842            return 0;
62843          }
62844
62845_ACEOF
62846if ac_fn_cxx_try_link "$LINENO"; then :
62847
62848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62849$as_echo "yes" >&6; }
62850
62851else
62852
62853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62854$as_echo "no" >&6; }
62855          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62856$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62857          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62858$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62859
62860
62861  # Print a helpful message on how to acquire the necessary build dependency.
62862  # freetype is the help tag: freetype, cups, alsa etc
62863  MISSING_DEPENDENCY=freetype
62864
62865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62866    cygwin_help $MISSING_DEPENDENCY
62867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62868    msys_help $MISSING_DEPENDENCY
62869  else
62870    PKGHANDLER_COMMAND=
62871
62872    case $PKGHANDLER in
62873      apt-get)
62874        apt_help     $MISSING_DEPENDENCY ;;
62875      yum)
62876        yum_help     $MISSING_DEPENDENCY ;;
62877      brew)
62878        brew_help    $MISSING_DEPENDENCY ;;
62879      port)
62880        port_help    $MISSING_DEPENDENCY ;;
62881      pkgutil)
62882        pkgutil_help $MISSING_DEPENDENCY ;;
62883      pkgadd)
62884        pkgadd_help  $MISSING_DEPENDENCY ;;
62885    esac
62886
62887    if test "x$PKGHANDLER_COMMAND" != x; then
62888      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62889    fi
62890  fi
62891
62892
62893          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62894
62895
62896fi
62897rm -f core conftest.err conftest.$ac_objext \
62898    conftest$ac_exeext conftest.$ac_ext
62899    CXXCFLAGS="$PREV_CXXFLAGS"
62900    LIBS="$PREV_LIBS"
62901    CXX="$PREV_CXX"
62902    ac_ext=cpp
62903ac_cpp='$CXXCPP $CPPFLAGS'
62904ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62905ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62906ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62907
62908
62909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62910$as_echo_n "checking if we should bundle freetype... " >&6; }
62911    if test "x$BUNDLE_FREETYPE" = xyes; then
62912      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62913    fi
62914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62915$as_echo "$BUNDLE_FREETYPE" >&6; }
62916
62917  fi # end freetype needed
62918
62919
62920
62921
62922
62923
62924
62925# Check whether --with-alsa was given.
62926if test "${with_alsa+set}" = set; then :
62927  withval=$with_alsa;
62928fi
62929
62930
62931# Check whether --with-alsa-include was given.
62932if test "${with_alsa_include+set}" = set; then :
62933  withval=$with_alsa_include;
62934fi
62935
62936
62937# Check whether --with-alsa-lib was given.
62938if test "${with_alsa_lib+set}" = set; then :
62939  withval=$with_alsa_lib;
62940fi
62941
62942
62943  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62944    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62945        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62946        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62947      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62948$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62949    fi
62950    ALSA_CFLAGS=
62951    ALSA_LIBS=
62952  else
62953    ALSA_FOUND=no
62954
62955    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62956      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62957    fi
62958
62959    if test "x${with_alsa}" != x; then
62960      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62961      ALSA_CFLAGS="-I${with_alsa}/include"
62962      ALSA_FOUND=yes
62963    fi
62964    if test "x${with_alsa_include}" != x; then
62965      ALSA_CFLAGS="-I${with_alsa_include}"
62966      ALSA_FOUND=yes
62967    fi
62968    if test "x${with_alsa_lib}" != x; then
62969      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62970      ALSA_FOUND=yes
62971    fi
62972    # Do not try pkg-config if we have a sysroot set.
62973    if test "x$SYSROOT" = x; then
62974      if test "x$ALSA_FOUND" = xno; then
62975
62976pkg_failed=no
62977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62978$as_echo_n "checking for ALSA... " >&6; }
62979
62980if test -n "$ALSA_CFLAGS"; then
62981    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62982 elif test -n "$PKG_CONFIG"; then
62983    if test -n "$PKG_CONFIG" && \
62984    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62985  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62986  ac_status=$?
62987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62988  test $ac_status = 0; }; then
62989  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62990else
62991  pkg_failed=yes
62992fi
62993 else
62994    pkg_failed=untried
62995fi
62996if test -n "$ALSA_LIBS"; then
62997    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62998 elif test -n "$PKG_CONFIG"; then
62999    if test -n "$PKG_CONFIG" && \
63000    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63001  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63002  ac_status=$?
63003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63004  test $ac_status = 0; }; then
63005  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63006else
63007  pkg_failed=yes
63008fi
63009 else
63010    pkg_failed=untried
63011fi
63012
63013
63014
63015if test $pkg_failed = yes; then
63016
63017if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63018        _pkg_short_errors_supported=yes
63019else
63020        _pkg_short_errors_supported=no
63021fi
63022        if test $_pkg_short_errors_supported = yes; then
63023	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63024        else
63025	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63026        fi
63027	# Put the nasty error message in config.log where it belongs
63028	echo "$ALSA_PKG_ERRORS" >&5
63029
63030	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63031$as_echo "no" >&6; }
63032                ALSA_FOUND=no
63033elif test $pkg_failed = untried; then
63034	ALSA_FOUND=no
63035else
63036	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63037	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63039$as_echo "yes" >&6; }
63040	ALSA_FOUND=yes
63041fi
63042      fi
63043    fi
63044    if test "x$ALSA_FOUND" = xno; then
63045      for ac_header in alsa/asoundlib.h
63046do :
63047  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63048if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63049  cat >>confdefs.h <<_ACEOF
63050#define HAVE_ALSA_ASOUNDLIB_H 1
63051_ACEOF
63052
63053            ALSA_FOUND=yes
63054            ALSA_CFLAGS=-Iignoreme
63055            ALSA_LIBS=-lasound
63056            DEFAULT_ALSA=yes
63057
63058else
63059  ALSA_FOUND=no
63060
63061fi
63062
63063done
63064
63065    fi
63066    if test "x$ALSA_FOUND" = xno; then
63067
63068  # Print a helpful message on how to acquire the necessary build dependency.
63069  # alsa is the help tag: freetype, cups, alsa etc
63070  MISSING_DEPENDENCY=alsa
63071
63072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63073    cygwin_help $MISSING_DEPENDENCY
63074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63075    msys_help $MISSING_DEPENDENCY
63076  else
63077    PKGHANDLER_COMMAND=
63078
63079    case $PKGHANDLER in
63080      apt-get)
63081        apt_help     $MISSING_DEPENDENCY ;;
63082      yum)
63083        yum_help     $MISSING_DEPENDENCY ;;
63084      brew)
63085        brew_help    $MISSING_DEPENDENCY ;;
63086      port)
63087        port_help    $MISSING_DEPENDENCY ;;
63088      pkgutil)
63089        pkgutil_help $MISSING_DEPENDENCY ;;
63090      pkgadd)
63091        pkgadd_help  $MISSING_DEPENDENCY ;;
63092    esac
63093
63094    if test "x$PKGHANDLER_COMMAND" != x; then
63095      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63096    fi
63097  fi
63098
63099      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63100    fi
63101  fi
63102
63103
63104
63105
63106
63107
63108# Check whether --with-libffi was given.
63109if test "${with_libffi+set}" = set; then :
63110  withval=$with_libffi;
63111fi
63112
63113
63114# Check whether --with-libffi-include was given.
63115if test "${with_libffi_include+set}" = set; then :
63116  withval=$with_libffi_include;
63117fi
63118
63119
63120# Check whether --with-libffi-lib was given.
63121if test "${with_libffi_lib+set}" = set; then :
63122  withval=$with_libffi_lib;
63123fi
63124
63125  # Check whether --enable-libffi-bundling was given.
63126if test "${enable_libffi_bundling+set}" = set; then :
63127  enableval=$enable_libffi_bundling;
63128fi
63129
63130
63131  if test "x$NEEDS_LIB_FFI" = xfalse; then
63132    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63133        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63134        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63135      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63136$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63137    fi
63138    LIBFFI_CFLAGS=
63139    LIBFFI_LIBS=
63140  else
63141    LIBFFI_FOUND=no
63142
63143    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63144      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63145    fi
63146
63147    if test "x${with_libffi}" != x; then
63148      LIBFFI_LIB_PATH="${with_libffi}/lib"
63149      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63150      LIBFFI_CFLAGS="-I${with_libffi}/include"
63151      LIBFFI_FOUND=yes
63152    fi
63153    if test "x${with_libffi_include}" != x; then
63154      LIBFFI_CFLAGS="-I${with_libffi_include}"
63155      LIBFFI_FOUND=yes
63156    fi
63157    if test "x${with_libffi_lib}" != x; then
63158      LIBFFI_LIB_PATH="${with_libffi_lib}"
63159      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63160      LIBFFI_FOUND=yes
63161    fi
63162    # Do not try pkg-config if we have a sysroot set.
63163    if test "x$SYSROOT" = x; then
63164      if test "x$LIBFFI_FOUND" = xno; then
63165        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63166
63167pkg_failed=no
63168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63169$as_echo_n "checking for LIBFFI... " >&6; }
63170
63171if test -n "$LIBFFI_CFLAGS"; then
63172    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63173 elif test -n "$PKG_CONFIG"; then
63174    if test -n "$PKG_CONFIG" && \
63175    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63176  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63177  ac_status=$?
63178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63179  test $ac_status = 0; }; then
63180  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63181else
63182  pkg_failed=yes
63183fi
63184 else
63185    pkg_failed=untried
63186fi
63187if test -n "$LIBFFI_LIBS"; then
63188    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63189 elif test -n "$PKG_CONFIG"; then
63190    if test -n "$PKG_CONFIG" && \
63191    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63192  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63193  ac_status=$?
63194  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63195  test $ac_status = 0; }; then
63196  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63197else
63198  pkg_failed=yes
63199fi
63200 else
63201    pkg_failed=untried
63202fi
63203
63204
63205
63206if test $pkg_failed = yes; then
63207
63208if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63209        _pkg_short_errors_supported=yes
63210else
63211        _pkg_short_errors_supported=no
63212fi
63213        if test $_pkg_short_errors_supported = yes; then
63214	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63215        else
63216	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63217        fi
63218	# Put the nasty error message in config.log where it belongs
63219	echo "$LIBFFI_PKG_ERRORS" >&5
63220
63221	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63222$as_echo "no" >&6; }
63223                LIBFFI_FOUND=no
63224elif test $pkg_failed = untried; then
63225	LIBFFI_FOUND=no
63226else
63227	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63228	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63230$as_echo "yes" >&6; }
63231	LIBFFI_FOUND=yes
63232fi
63233      fi
63234    fi
63235    if test "x$LIBFFI_FOUND" = xno; then
63236      for ac_header in ffi.h
63237do :
63238  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63239if test "x$ac_cv_header_ffi_h" = xyes; then :
63240  cat >>confdefs.h <<_ACEOF
63241#define HAVE_FFI_H 1
63242_ACEOF
63243
63244            LIBFFI_FOUND=yes
63245            LIBFFI_CFLAGS=
63246            LIBFFI_LIBS=-lffi
63247
63248else
63249  LIBFFI_FOUND=no
63250
63251fi
63252
63253done
63254
63255    fi
63256    if test "x$LIBFFI_FOUND" = xno; then
63257
63258  # Print a helpful message on how to acquire the necessary build dependency.
63259  # ffi is the help tag: freetype, cups, alsa etc
63260  MISSING_DEPENDENCY=ffi
63261
63262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63263    cygwin_help $MISSING_DEPENDENCY
63264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63265    msys_help $MISSING_DEPENDENCY
63266  else
63267    PKGHANDLER_COMMAND=
63268
63269    case $PKGHANDLER in
63270      apt-get)
63271        apt_help     $MISSING_DEPENDENCY ;;
63272      yum)
63273        yum_help     $MISSING_DEPENDENCY ;;
63274      brew)
63275        brew_help    $MISSING_DEPENDENCY ;;
63276      port)
63277        port_help    $MISSING_DEPENDENCY ;;
63278      pkgutil)
63279        pkgutil_help $MISSING_DEPENDENCY ;;
63280      pkgadd)
63281        pkgadd_help  $MISSING_DEPENDENCY ;;
63282    esac
63283
63284    if test "x$PKGHANDLER_COMMAND" != x; then
63285      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63286    fi
63287  fi
63288
63289      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63290    fi
63291
63292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63293$as_echo_n "checking if libffi works... " >&6; }
63294    ac_ext=c
63295ac_cpp='$CPP $CPPFLAGS'
63296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63298ac_compiler_gnu=$ac_cv_c_compiler_gnu
63299
63300    OLD_CFLAGS="$CFLAGS"
63301    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63302    OLD_LIBS="$LIBS"
63303    LIBS="$LIBS $LIBFFI_LIBS"
63304    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63305/* end confdefs.h.  */
63306#include <ffi.h>
63307int
63308main ()
63309{
63310
63311          ffi_call(NULL, NULL, NULL, NULL);
63312          return 0;
63313
63314  ;
63315  return 0;
63316}
63317_ACEOF
63318if ac_fn_c_try_link "$LINENO"; then :
63319  LIBFFI_WORKS=yes
63320else
63321  LIBFFI_WORKS=no
63322
63323fi
63324rm -f core conftest.err conftest.$ac_objext \
63325    conftest$ac_exeext conftest.$ac_ext
63326    CFLAGS="$OLD_CFLAGS"
63327    LIBS="$OLD_LIBS"
63328    ac_ext=cpp
63329ac_cpp='$CXXCPP $CPPFLAGS'
63330ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63331ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63332ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63333
63334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63335$as_echo "$LIBFFI_WORKS" >&6; }
63336
63337    if test "x$LIBFFI_WORKS" = xno; then
63338
63339  # Print a helpful message on how to acquire the necessary build dependency.
63340  # ffi is the help tag: freetype, cups, alsa etc
63341  MISSING_DEPENDENCY=ffi
63342
63343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63344    cygwin_help $MISSING_DEPENDENCY
63345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63346    msys_help $MISSING_DEPENDENCY
63347  else
63348    PKGHANDLER_COMMAND=
63349
63350    case $PKGHANDLER in
63351      apt-get)
63352        apt_help     $MISSING_DEPENDENCY ;;
63353      yum)
63354        yum_help     $MISSING_DEPENDENCY ;;
63355      brew)
63356        brew_help    $MISSING_DEPENDENCY ;;
63357      port)
63358        port_help    $MISSING_DEPENDENCY ;;
63359      pkgutil)
63360        pkgutil_help $MISSING_DEPENDENCY ;;
63361      pkgadd)
63362        pkgadd_help  $MISSING_DEPENDENCY ;;
63363    esac
63364
63365    if test "x$PKGHANDLER_COMMAND" != x; then
63366      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63367    fi
63368  fi
63369
63370      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63371    fi
63372
63373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63374$as_echo_n "checking if libffi should be bundled... " >&6; }
63375    if test "x$enable_libffi_bundling" = "x"; then
63376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63377$as_echo "no" >&6; }
63378      ENABLE_LIBFFI_BUNDLING=false
63379    elif  test "x$enable_libffi_bundling" = "xno"; then
63380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63381$as_echo "no, forced" >&6; }
63382      ENABLE_LIBFFI_BUNDLING=false
63383    elif  test "x$enable_libffi_bundling" = "xyes"; then
63384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63385$as_echo "yes, forced" >&6; }
63386      ENABLE_LIBFFI_BUNDLING=true
63387    else
63388      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63389    fi
63390
63391    # Find the libffi.so.X to bundle
63392    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63394$as_echo_n "checking for libffi lib file location... " >&6; }
63395      if test "x${LIBFFI_LIB_PATH}" != x; then
63396        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63397          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63398        else
63399          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63400        fi
63401      else
63402        # If we don't have an explicit path, look in a few obvious places
63403        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63404          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63405            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63406          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63407            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63408          else
63409            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63410          fi
63411        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63412          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63413            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63414          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63415            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63416          else
63417            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63418          fi
63419        else
63420          # Fallback on the default /usr/lib dir
63421          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63422            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63423          else
63424            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63425          fi
63426        fi
63427      fi
63428      # Make sure the wildcard is evaluated
63429      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63430      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63431$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63432    fi
63433  fi
63434
63435
63436
63437
63438
63439
63440
63441  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63442    # Extract the first word of "llvm-config", so it can be a program name with args.
63443set dummy llvm-config; ac_word=$2
63444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63445$as_echo_n "checking for $ac_word... " >&6; }
63446if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63447  $as_echo_n "(cached) " >&6
63448else
63449  if test -n "$LLVM_CONFIG"; then
63450  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63451else
63452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63453for as_dir in $PATH
63454do
63455  IFS=$as_save_IFS
63456  test -z "$as_dir" && as_dir=.
63457    for ac_exec_ext in '' $ac_executable_extensions; do
63458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63459    ac_cv_prog_LLVM_CONFIG="llvm-config"
63460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63461    break 2
63462  fi
63463done
63464  done
63465IFS=$as_save_IFS
63466
63467fi
63468fi
63469LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63470if test -n "$LLVM_CONFIG"; then
63471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63472$as_echo "$LLVM_CONFIG" >&6; }
63473else
63474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63475$as_echo "no" >&6; }
63476fi
63477
63478
63479
63480    if test "x$LLVM_CONFIG" != xllvm-config; then
63481      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63482    fi
63483
63484    llvm_components="jit mcjit engine nativecodegen native"
63485    unset LLVM_CFLAGS
63486    for flag in $("$LLVM_CONFIG" --cxxflags); do
63487      if echo "${flag}" | grep -q '^-[ID]'; then
63488        if test "${flag}" != "-D_DEBUG" ; then
63489          if test "${LLVM_CFLAGS}" != "" ; then
63490            LLVM_CFLAGS="${LLVM_CFLAGS} "
63491          fi
63492          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63493        fi
63494      fi
63495    done
63496    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63497    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63498
63499    unset LLVM_LDFLAGS
63500    for flag in $("${LLVM_CONFIG}" --ldflags); do
63501      if echo "${flag}" | grep -q '^-L'; then
63502        if test "${LLVM_LDFLAGS}" != ""; then
63503          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63504        fi
63505        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63506      fi
63507    done
63508
63509    unset LLVM_LIBS
63510    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63511      if echo "${flag}" | grep -q '^-l'; then
63512        if test "${LLVM_LIBS}" != ""; then
63513          LLVM_LIBS="${LLVM_LIBS} "
63514        fi
63515        LLVM_LIBS="${LLVM_LIBS}${flag}"
63516      fi
63517    done
63518
63519    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63520    # always properly detect -ltinfo
63521    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63522
63523
63524
63525
63526  fi
63527
63528
63529
63530# Check whether --with-libjpeg was given.
63531if test "${with_libjpeg+set}" = set; then :
63532  withval=$with_libjpeg;
63533fi
63534
63535
63536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63537$as_echo_n "checking for which libjpeg to use... " >&6; }
63538  # default is bundled
63539  DEFAULT_LIBJPEG=bundled
63540  # if user didn't specify, use DEFAULT_LIBJPEG
63541  if test "x${with_libjpeg}" = "x"; then
63542    with_libjpeg=${DEFAULT_LIBJPEG}
63543  fi
63544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63545$as_echo "${with_libjpeg}" >&6; }
63546
63547  if test "x${with_libjpeg}" = "xbundled"; then
63548    USE_EXTERNAL_LIBJPEG=false
63549  elif test "x${with_libjpeg}" = "xsystem"; then
63550    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63551if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63552
63553else
63554   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63555fi
63556
63557
63558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63559$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63560if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63561  $as_echo_n "(cached) " >&6
63562else
63563  ac_check_lib_save_LIBS=$LIBS
63564LIBS="-ljpeg  $LIBS"
63565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63566/* end confdefs.h.  */
63567
63568/* Override any GCC internal prototype to avoid an error.
63569   Use char because int might match the return type of a GCC
63570   builtin and then its argument prototype would still apply.  */
63571#ifdef __cplusplus
63572extern "C"
63573#endif
63574char jpeg_CreateDecompress ();
63575int
63576main ()
63577{
63578return jpeg_CreateDecompress ();
63579  ;
63580  return 0;
63581}
63582_ACEOF
63583if ac_fn_cxx_try_link "$LINENO"; then :
63584  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63585else
63586  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63587fi
63588rm -f core conftest.err conftest.$ac_objext \
63589    conftest$ac_exeext conftest.$ac_ext
63590LIBS=$ac_check_lib_save_LIBS
63591fi
63592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63593$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63594if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63595  cat >>confdefs.h <<_ACEOF
63596#define HAVE_LIBJPEG 1
63597_ACEOF
63598
63599  LIBS="-ljpeg $LIBS"
63600
63601else
63602   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63603fi
63604
63605
63606    USE_EXTERNAL_LIBJPEG=true
63607  else
63608    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63609  fi
63610
63611
63612
63613
63614
63615# Check whether --with-giflib was given.
63616if test "${with_giflib+set}" = set; then :
63617  withval=$with_giflib;
63618fi
63619
63620
63621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63622$as_echo_n "checking for which giflib to use... " >&6; }
63623  # default is bundled
63624  DEFAULT_GIFLIB=bundled
63625  # if user didn't specify, use DEFAULT_GIFLIB
63626  if test "x${with_giflib}" = "x"; then
63627    with_giflib=${DEFAULT_GIFLIB}
63628  fi
63629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63630$as_echo "${with_giflib}" >&6; }
63631
63632  if test "x${with_giflib}" = "xbundled"; then
63633    USE_EXTERNAL_LIBGIF=false
63634  elif test "x${with_giflib}" = "xsystem"; then
63635    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63636if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63637
63638else
63639   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63640fi
63641
63642
63643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63644$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63645if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63646  $as_echo_n "(cached) " >&6
63647else
63648  ac_check_lib_save_LIBS=$LIBS
63649LIBS="-lgif  $LIBS"
63650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63651/* end confdefs.h.  */
63652
63653/* Override any GCC internal prototype to avoid an error.
63654   Use char because int might match the return type of a GCC
63655   builtin and then its argument prototype would still apply.  */
63656#ifdef __cplusplus
63657extern "C"
63658#endif
63659char DGifGetCode ();
63660int
63661main ()
63662{
63663return DGifGetCode ();
63664  ;
63665  return 0;
63666}
63667_ACEOF
63668if ac_fn_cxx_try_link "$LINENO"; then :
63669  ac_cv_lib_gif_DGifGetCode=yes
63670else
63671  ac_cv_lib_gif_DGifGetCode=no
63672fi
63673rm -f core conftest.err conftest.$ac_objext \
63674    conftest$ac_exeext conftest.$ac_ext
63675LIBS=$ac_check_lib_save_LIBS
63676fi
63677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63678$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63679if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63680  cat >>confdefs.h <<_ACEOF
63681#define HAVE_LIBGIF 1
63682_ACEOF
63683
63684  LIBS="-lgif $LIBS"
63685
63686else
63687   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63688fi
63689
63690
63691    USE_EXTERNAL_LIBGIF=true
63692  else
63693    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63694  fi
63695
63696
63697
63698
63699
63700# Check whether --with-libpng was given.
63701if test "${with_libpng+set}" = set; then :
63702  withval=$with_libpng;
63703fi
63704
63705
63706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63707$as_echo_n "checking for which libpng to use... " >&6; }
63708
63709  # default is bundled
63710  DEFAULT_LIBPNG=bundled
63711  # if user didn't specify, use DEFAULT_LIBPNG
63712  if test "x${with_libpng}" = "x"; then
63713      with_libpng=${DEFAULT_LIBPNG}
63714  fi
63715
63716  if test "x${with_libpng}" = "xbundled"; then
63717      USE_EXTERNAL_LIBPNG=false
63718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63719$as_echo "bundled" >&6; }
63720  elif test "x${with_libpng}" = "xsystem"; then
63721
63722pkg_failed=no
63723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63724$as_echo_n "checking for PNG... " >&6; }
63725
63726if test -n "$PNG_CFLAGS"; then
63727    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63728 elif test -n "$PKG_CONFIG"; then
63729    if test -n "$PKG_CONFIG" && \
63730    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63731  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63732  ac_status=$?
63733  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63734  test $ac_status = 0; }; then
63735  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63736else
63737  pkg_failed=yes
63738fi
63739 else
63740    pkg_failed=untried
63741fi
63742if test -n "$PNG_LIBS"; then
63743    pkg_cv_PNG_LIBS="$PNG_LIBS"
63744 elif test -n "$PKG_CONFIG"; then
63745    if test -n "$PKG_CONFIG" && \
63746    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63747  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63748  ac_status=$?
63749  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63750  test $ac_status = 0; }; then
63751  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63752else
63753  pkg_failed=yes
63754fi
63755 else
63756    pkg_failed=untried
63757fi
63758
63759
63760
63761if test $pkg_failed = yes; then
63762
63763if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63764        _pkg_short_errors_supported=yes
63765else
63766        _pkg_short_errors_supported=no
63767fi
63768        if test $_pkg_short_errors_supported = yes; then
63769	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63770        else
63771	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63772        fi
63773	# Put the nasty error message in config.log where it belongs
63774	echo "$PNG_PKG_ERRORS" >&5
63775
63776	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63777$as_echo "no" >&6; }
63778                 LIBPNG_FOUND=no
63779elif test $pkg_failed = untried; then
63780	 LIBPNG_FOUND=no
63781else
63782	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63783	PNG_LIBS=$pkg_cv_PNG_LIBS
63784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63785$as_echo "yes" >&6; }
63786	 LIBPNG_FOUND=yes
63787fi
63788      if test "x${LIBPNG_FOUND}" = "xyes"; then
63789          USE_EXTERNAL_LIBPNG=true
63790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63791$as_echo "system" >&6; }
63792      else
63793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63794$as_echo "system not found" >&6; }
63795          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63796      fi
63797  else
63798      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63799  fi
63800
63801
63802
63803
63804
63805# Check whether --with-zlib was given.
63806if test "${with_zlib+set}" = set; then :
63807  withval=$with_zlib;
63808fi
63809
63810
63811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63812$as_echo_n "checking for compress in -lz... " >&6; }
63813if ${ac_cv_lib_z_compress+:} false; then :
63814  $as_echo_n "(cached) " >&6
63815else
63816  ac_check_lib_save_LIBS=$LIBS
63817LIBS="-lz  $LIBS"
63818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63819/* end confdefs.h.  */
63820
63821/* Override any GCC internal prototype to avoid an error.
63822   Use char because int might match the return type of a GCC
63823   builtin and then its argument prototype would still apply.  */
63824#ifdef __cplusplus
63825extern "C"
63826#endif
63827char compress ();
63828int
63829main ()
63830{
63831return compress ();
63832  ;
63833  return 0;
63834}
63835_ACEOF
63836if ac_fn_cxx_try_link "$LINENO"; then :
63837  ac_cv_lib_z_compress=yes
63838else
63839  ac_cv_lib_z_compress=no
63840fi
63841rm -f core conftest.err conftest.$ac_objext \
63842    conftest$ac_exeext conftest.$ac_ext
63843LIBS=$ac_check_lib_save_LIBS
63844fi
63845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63846$as_echo "$ac_cv_lib_z_compress" >&6; }
63847if test "x$ac_cv_lib_z_compress" = xyes; then :
63848   ZLIB_FOUND=yes
63849else
63850   ZLIB_FOUND=no
63851fi
63852
63853
63854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63855$as_echo_n "checking for which zlib to use... " >&6; }
63856
63857  DEFAULT_ZLIB=system
63858  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63859    # On windows default is bundled...on others default is system
63860    DEFAULT_ZLIB=bundled
63861  fi
63862
63863  if test "x${ZLIB_FOUND}" != "xyes"; then
63864    # If we don't find any system...set default to bundled
63865    DEFAULT_ZLIB=bundled
63866  fi
63867
63868  # If user didn't specify, use DEFAULT_ZLIB
63869  if test "x${with_zlib}" = "x"; then
63870    with_zlib=${DEFAULT_ZLIB}
63871  fi
63872
63873  if test "x${with_zlib}" = "xbundled"; then
63874    USE_EXTERNAL_LIBZ=false
63875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63876$as_echo "bundled" >&6; }
63877  elif test "x${with_zlib}" = "xsystem"; then
63878    if test "x${ZLIB_FOUND}" = "xyes"; then
63879      USE_EXTERNAL_LIBZ=true
63880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63881$as_echo "system" >&6; }
63882    else
63883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63884$as_echo "system not found" >&6; }
63885      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63886    fi
63887  else
63888    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63889  fi
63890
63891
63892
63893
63894
63895# Check whether --with-lcms was given.
63896if test "${with_lcms+set}" = set; then :
63897  withval=$with_lcms;
63898fi
63899
63900
63901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63902$as_echo_n "checking for which lcms to use... " >&6; }
63903
63904  DEFAULT_LCMS=bundled
63905  # If user didn't specify, use DEFAULT_LCMS
63906  if test "x${with_lcms}" = "x"; then
63907      with_lcms=${DEFAULT_LCMS}
63908  fi
63909
63910  if test "x${with_lcms}" = "xbundled"; then
63911    USE_EXTERNAL_LCMS=false
63912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63913$as_echo "bundled" >&6; }
63914  elif test "x${with_lcms}" = "xsystem"; then
63915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63916$as_echo "system" >&6; }
63917
63918pkg_failed=no
63919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63920$as_echo_n "checking for LCMS... " >&6; }
63921
63922if test -n "$LCMS_CFLAGS"; then
63923    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63924 elif test -n "$PKG_CONFIG"; then
63925    if test -n "$PKG_CONFIG" && \
63926    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63927  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63928  ac_status=$?
63929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63930  test $ac_status = 0; }; then
63931  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63932else
63933  pkg_failed=yes
63934fi
63935 else
63936    pkg_failed=untried
63937fi
63938if test -n "$LCMS_LIBS"; then
63939    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63940 elif test -n "$PKG_CONFIG"; then
63941    if test -n "$PKG_CONFIG" && \
63942    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63943  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63944  ac_status=$?
63945  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63946  test $ac_status = 0; }; then
63947  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63948else
63949  pkg_failed=yes
63950fi
63951 else
63952    pkg_failed=untried
63953fi
63954
63955
63956
63957if test $pkg_failed = yes; then
63958
63959if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63960        _pkg_short_errors_supported=yes
63961else
63962        _pkg_short_errors_supported=no
63963fi
63964        if test $_pkg_short_errors_supported = yes; then
63965	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63966        else
63967	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63968        fi
63969	# Put the nasty error message in config.log where it belongs
63970	echo "$LCMS_PKG_ERRORS" >&5
63971
63972	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63973$as_echo "no" >&6; }
63974                LCMS_FOUND=no
63975elif test $pkg_failed = untried; then
63976	LCMS_FOUND=no
63977else
63978	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63979	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63981$as_echo "yes" >&6; }
63982	LCMS_FOUND=yes
63983fi
63984    if test "x${LCMS_FOUND}" = "xyes"; then
63985      USE_EXTERNAL_LCMS=true
63986    else
63987      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63988    fi
63989  else
63990    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63991  fi
63992
63993
63994
63995
63996
63997
63998
63999
64000
64001
64002
64003  # Setup libm (the maths library)
64004  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64006$as_echo_n "checking for cos in -lm... " >&6; }
64007if ${ac_cv_lib_m_cos+:} false; then :
64008  $as_echo_n "(cached) " >&6
64009else
64010  ac_check_lib_save_LIBS=$LIBS
64011LIBS="-lm  $LIBS"
64012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64013/* end confdefs.h.  */
64014
64015/* Override any GCC internal prototype to avoid an error.
64016   Use char because int might match the return type of a GCC
64017   builtin and then its argument prototype would still apply.  */
64018#ifdef __cplusplus
64019extern "C"
64020#endif
64021char cos ();
64022int
64023main ()
64024{
64025return cos ();
64026  ;
64027  return 0;
64028}
64029_ACEOF
64030if ac_fn_cxx_try_link "$LINENO"; then :
64031  ac_cv_lib_m_cos=yes
64032else
64033  ac_cv_lib_m_cos=no
64034fi
64035rm -f core conftest.err conftest.$ac_objext \
64036    conftest$ac_exeext conftest.$ac_ext
64037LIBS=$ac_check_lib_save_LIBS
64038fi
64039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64040$as_echo "$ac_cv_lib_m_cos" >&6; }
64041if test "x$ac_cv_lib_m_cos" = xyes; then :
64042  cat >>confdefs.h <<_ACEOF
64043#define HAVE_LIBM 1
64044_ACEOF
64045
64046  LIBS="-lm $LIBS"
64047
64048else
64049
64050        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64051$as_echo "$as_me: Maths library was not found" >&6;}
64052
64053fi
64054
64055    LIBM="-lm"
64056  else
64057    LIBM=""
64058  fi
64059
64060
64061  # Setup libdl (for dynamic library loading)
64062  save_LIBS="$LIBS"
64063  LIBS=""
64064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64065$as_echo_n "checking for dlopen in -ldl... " >&6; }
64066if ${ac_cv_lib_dl_dlopen+:} false; then :
64067  $as_echo_n "(cached) " >&6
64068else
64069  ac_check_lib_save_LIBS=$LIBS
64070LIBS="-ldl  $LIBS"
64071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64072/* end confdefs.h.  */
64073
64074/* Override any GCC internal prototype to avoid an error.
64075   Use char because int might match the return type of a GCC
64076   builtin and then its argument prototype would still apply.  */
64077#ifdef __cplusplus
64078extern "C"
64079#endif
64080char dlopen ();
64081int
64082main ()
64083{
64084return dlopen ();
64085  ;
64086  return 0;
64087}
64088_ACEOF
64089if ac_fn_cxx_try_link "$LINENO"; then :
64090  ac_cv_lib_dl_dlopen=yes
64091else
64092  ac_cv_lib_dl_dlopen=no
64093fi
64094rm -f core conftest.err conftest.$ac_objext \
64095    conftest$ac_exeext conftest.$ac_ext
64096LIBS=$ac_check_lib_save_LIBS
64097fi
64098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64099$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64100if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64101  cat >>confdefs.h <<_ACEOF
64102#define HAVE_LIBDL 1
64103_ACEOF
64104
64105  LIBS="-ldl $LIBS"
64106
64107fi
64108
64109  LIBDL="$LIBS"
64110
64111  LIBS="$save_LIBS"
64112
64113  # Deprecated libraries, keep the flags for backwards compatibility
64114  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64115
64116
64117# Check whether --with-dxsdk was given.
64118if test "${with_dxsdk+set}" = set; then :
64119  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64120$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64121fi
64122
64123
64124
64125
64126# Check whether --with-dxsdk-lib was given.
64127if test "${with_dxsdk_lib+set}" = set; then :
64128  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64129$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64130fi
64131
64132
64133
64134
64135# Check whether --with-dxsdk-include was given.
64136if test "${with_dxsdk_include+set}" = set; then :
64137  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64138$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64139fi
64140
64141
64142  fi
64143
64144  # Control if libzip can use mmap. Available for purposes of overriding.
64145  LIBZIP_CAN_USE_MMAP=true
64146
64147
64148
64149  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64150    # Find the root of the Solaris Studio installation from the compiler path
64151    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64152    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64154$as_echo_n "checking for libstlport.so.1... " >&6; }
64155    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64156      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64157      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64158    fi
64159    if test -f "$STLPORT_LIB"; then
64160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64161$as_echo "yes, $STLPORT_LIB" >&6; }
64162
64163  # Only process if variable expands to non-empty
64164
64165  if test "x$STLPORT_LIB" != x; then
64166    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64167
64168  # Input might be given as Windows format, start by converting to
64169  # unix format.
64170  path="$STLPORT_LIB"
64171  new_path=`$CYGPATH -u "$path"`
64172
64173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64176  # "foo.exe" is OK but "foo" is an error.
64177  #
64178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64179  # It is also a way to make sure we got the proper file name for the real test later on.
64180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64181  if test "x$test_shortpath" = x; then
64182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64183$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64184    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64185  fi
64186
64187  # Call helper function which possibly converts this using DOS-style short mode.
64188  # If so, the updated path is stored in $new_path.
64189
64190  input_path="$new_path"
64191  # Check if we need to convert this using DOS-style short mode. If the path
64192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64193  # take no chances and rewrite it.
64194  # Note: m4 eats our [], so we need to use [ and ] instead.
64195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64196  if test "x$has_forbidden_chars" != x; then
64197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64201      # Going to short mode and back again did indeed matter. Since short mode is
64202      # case insensitive, let's make it lowercase to improve readability.
64203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64204      # Now convert it back to Unix-style (cygpath)
64205      input_path=`$CYGPATH -u "$shortmode_path"`
64206      new_path="$input_path"
64207    fi
64208  fi
64209
64210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64211  if test "x$test_cygdrive_prefix" = x; then
64212    # As a simple fix, exclude /usr/bin since it's not a real path.
64213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64215      # a path prefixed by /cygdrive for fixpath to work.
64216      new_path="$CYGWIN_ROOT_PATH$input_path"
64217    fi
64218  fi
64219
64220
64221  if test "x$path" != "x$new_path"; then
64222    STLPORT_LIB="$new_path"
64223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64224$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64225  fi
64226
64227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64228
64229  path="$STLPORT_LIB"
64230  has_colon=`$ECHO $path | $GREP ^.:`
64231  new_path="$path"
64232  if test "x$has_colon" = x; then
64233    # Not in mixed or Windows style, start by that.
64234    new_path=`cmd //c echo $path`
64235  fi
64236
64237
64238  input_path="$new_path"
64239  # Check if we need to convert this using DOS-style short mode. If the path
64240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64241  # take no chances and rewrite it.
64242  # Note: m4 eats our [], so we need to use [ and ] instead.
64243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64244  if test "x$has_forbidden_chars" != x; then
64245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64247  fi
64248
64249
64250  windows_path="$new_path"
64251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64252    unix_path=`$CYGPATH -u "$windows_path"`
64253    new_path="$unix_path"
64254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64256    new_path="$unix_path"
64257  fi
64258
64259  if test "x$path" != "x$new_path"; then
64260    STLPORT_LIB="$new_path"
64261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64262$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64263  fi
64264
64265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64267
64268    else
64269      # We're on a unix platform. Hooray! :)
64270      path="$STLPORT_LIB"
64271      has_space=`$ECHO "$path" | $GREP " "`
64272      if test "x$has_space" != x; then
64273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64274$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64275        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64276      fi
64277
64278      # Use eval to expand a potential ~
64279      eval path="$path"
64280      if test ! -f "$path" && test ! -d "$path"; then
64281        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64282      fi
64283
64284      if test -d "$path"; then
64285        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64286      else
64287        dir="`$DIRNAME "$path"`"
64288        base="`$BASENAME "$path"`"
64289        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64290      fi
64291    fi
64292  fi
64293
64294    else
64295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64296$as_echo "no, not found at $STLPORT_LIB" >&6; }
64297      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64298    fi
64299
64300  fi
64301
64302
64303
64304# Check whether --with-libelf was given.
64305if test "${with_libelf+set}" = set; then :
64306  withval=$with_libelf;
64307fi
64308
64309
64310# Check whether --with-libelf-include was given.
64311if test "${with_libelf_include+set}" = set; then :
64312  withval=$with_libelf_include;
64313fi
64314
64315
64316# Check whether --with-libelf-lib was given.
64317if test "${with_libelf_lib+set}" = set; then :
64318  withval=$with_libelf_lib;
64319fi
64320
64321
64322  if test "x$ENABLE_AOT" = xfalse; then
64323    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64324        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64325        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64326      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64327$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64328    fi
64329    LIBELF_CFLAGS=
64330    LIBELF_LIBS=
64331  else
64332    LIBELF_FOUND=no
64333
64334    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64335      ENABLE_AOT="false"
64336      if test "x${enable_aot}" = xyes; then
64337        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64338      fi
64339    else
64340      if test "x${with_libelf}" != x; then
64341        ELF_LIBS="-L${with_libelf}/lib -lelf"
64342        ELF_CFLAGS="-I${with_libelf}/include"
64343        LIBELF_FOUND=yes
64344      fi
64345      if test "x${with_libelf_include}" != x; then
64346        ELF_CFLAGS="-I${with_libelf_include}"
64347        LIBELF_FOUND=yes
64348      fi
64349      if test "x${with_libelf_lib}" != x; then
64350        ELF_LIBS="-L${with_libelf_lib} -lelf"
64351        LIBELF_FOUND=yes
64352      fi
64353      # Do not try pkg-config if we have a sysroot set.
64354      if test "x$SYSROOT" = x; then
64355        if test "x$LIBELF_FOUND" = xno; then
64356          # Figure out ELF_CFLAGS and ELF_LIBS
64357
64358pkg_failed=no
64359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64360$as_echo_n "checking for ELF... " >&6; }
64361
64362if test -n "$ELF_CFLAGS"; then
64363    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64364 elif test -n "$PKG_CONFIG"; then
64365    if test -n "$PKG_CONFIG" && \
64366    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64367  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64368  ac_status=$?
64369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64370  test $ac_status = 0; }; then
64371  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64372else
64373  pkg_failed=yes
64374fi
64375 else
64376    pkg_failed=untried
64377fi
64378if test -n "$ELF_LIBS"; then
64379    pkg_cv_ELF_LIBS="$ELF_LIBS"
64380 elif test -n "$PKG_CONFIG"; then
64381    if test -n "$PKG_CONFIG" && \
64382    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64383  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64384  ac_status=$?
64385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64386  test $ac_status = 0; }; then
64387  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64388else
64389  pkg_failed=yes
64390fi
64391 else
64392    pkg_failed=untried
64393fi
64394
64395
64396
64397if test $pkg_failed = yes; then
64398
64399if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64400        _pkg_short_errors_supported=yes
64401else
64402        _pkg_short_errors_supported=no
64403fi
64404        if test $_pkg_short_errors_supported = yes; then
64405	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64406        else
64407	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64408        fi
64409	# Put the nasty error message in config.log where it belongs
64410	echo "$ELF_PKG_ERRORS" >&5
64411
64412	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64413$as_echo "no" >&6; }
64414                LIBELF_FOUND=no
64415elif test $pkg_failed = untried; then
64416	LIBELF_FOUND=no
64417else
64418	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64419	ELF_LIBS=$pkg_cv_ELF_LIBS
64420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64421$as_echo "yes" >&6; }
64422	LIBELF_FOUND=yes
64423fi
64424        fi
64425      fi
64426      if test "x$LIBELF_FOUND" = xno; then
64427        for ac_header in libelf.h
64428do :
64429  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64430if test "x$ac_cv_header_libelf_h" = xyes; then :
64431  cat >>confdefs.h <<_ACEOF
64432#define HAVE_LIBELF_H 1
64433_ACEOF
64434
64435              LIBELF_FOUND=yes
64436              ELF_CFLAGS=
64437              ELF_LIBS=-lelf
64438
64439else
64440  LIBELF_FOUND=no
64441
64442fi
64443
64444done
64445
64446      fi
64447      if test "x$LIBELF_FOUND" = xno; then
64448        ENABLE_AOT="false"
64449
64450  # Print a helpful message on how to acquire the necessary build dependency.
64451  # elf is the help tag: freetype, cups, alsa etc
64452  MISSING_DEPENDENCY=elf
64453
64454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64455    cygwin_help $MISSING_DEPENDENCY
64456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64457    msys_help $MISSING_DEPENDENCY
64458  else
64459    PKGHANDLER_COMMAND=
64460
64461    case $PKGHANDLER in
64462      apt-get)
64463        apt_help     $MISSING_DEPENDENCY ;;
64464      yum)
64465        yum_help     $MISSING_DEPENDENCY ;;
64466      brew)
64467        brew_help    $MISSING_DEPENDENCY ;;
64468      port)
64469        port_help    $MISSING_DEPENDENCY ;;
64470      pkgutil)
64471        pkgutil_help $MISSING_DEPENDENCY ;;
64472      pkgadd)
64473        pkgadd_help  $MISSING_DEPENDENCY ;;
64474    esac
64475
64476    if test "x$PKGHANDLER_COMMAND" != x; then
64477      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64478    fi
64479  fi
64480
64481        if test "x${enable_aot}" = xyes; then
64482          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64483        else
64484          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64485$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64486        fi
64487      else
64488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64489$as_echo_n "checking if libelf works... " >&6; }
64490        ac_ext=c
64491ac_cpp='$CPP $CPPFLAGS'
64492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64494ac_compiler_gnu=$ac_cv_c_compiler_gnu
64495
64496        OLD_CFLAGS="$CFLAGS"
64497        CFLAGS="$CFLAGS $ELF_CFLAGS"
64498        OLD_LIBS="$LIBS"
64499        LIBS="$LIBS $ELF_LIBS"
64500        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64501/* end confdefs.h.  */
64502#include <libelf.h>
64503int
64504main ()
64505{
64506
64507              elf_version(0);
64508              return 0;
64509
64510  ;
64511  return 0;
64512}
64513_ACEOF
64514if ac_fn_c_try_link "$LINENO"; then :
64515  LIBELF_WORKS=yes
64516else
64517  LIBELF_WORKS=no
64518
64519fi
64520rm -f core conftest.err conftest.$ac_objext \
64521    conftest$ac_exeext conftest.$ac_ext
64522        CFLAGS="$OLD_CFLAGS"
64523        LIBS="$OLD_LIBS"
64524        ac_ext=cpp
64525ac_cpp='$CXXCPP $CPPFLAGS'
64526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64529
64530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64531$as_echo "$LIBELF_WORKS" >&6; }
64532
64533        if test "x$LIBELF_WORKS" = xno; then
64534          ENABLE_AOT="false"
64535
64536  # Print a helpful message on how to acquire the necessary build dependency.
64537  # elf is the help tag: freetype, cups, alsa etc
64538  MISSING_DEPENDENCY=elf
64539
64540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64541    cygwin_help $MISSING_DEPENDENCY
64542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64543    msys_help $MISSING_DEPENDENCY
64544  else
64545    PKGHANDLER_COMMAND=
64546
64547    case $PKGHANDLER in
64548      apt-get)
64549        apt_help     $MISSING_DEPENDENCY ;;
64550      yum)
64551        yum_help     $MISSING_DEPENDENCY ;;
64552      brew)
64553        brew_help    $MISSING_DEPENDENCY ;;
64554      port)
64555        port_help    $MISSING_DEPENDENCY ;;
64556      pkgutil)
64557        pkgutil_help $MISSING_DEPENDENCY ;;
64558      pkgadd)
64559        pkgadd_help  $MISSING_DEPENDENCY ;;
64560    esac
64561
64562    if test "x$PKGHANDLER_COMMAND" != x; then
64563      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64564    fi
64565  fi
64566
64567          if test "x$enable_aot" = "xyes"; then
64568            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64569          else
64570            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64571$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64572          fi
64573        fi
64574      fi
64575    fi
64576  fi
64577
64578
64579
64580
64581
64582
64583
64584
64585
64586
64587
64588
64589
64590
64591
64592
64593
64594
64595# Hotspot setup depends on lib checks (AOT needs libelf).
64596
64597
64598  # The user can in some cases supply additional jvm features. For the custom
64599  # variant, this defines the entire variant.
64600
64601# Check whether --with-jvm-features was given.
64602if test "${with_jvm_features+set}" = set; then :
64603  withval=$with_jvm_features;
64604fi
64605
64606  if test "x$with_jvm_features" != x; then
64607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64608$as_echo_n "checking additional JVM features... " >&6; }
64609    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64611$as_echo "$JVM_FEATURES" >&6; }
64612  fi
64613
64614  # Override hotspot cpu definitions for ARM platforms
64615  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64616    HOTSPOT_TARGET_CPU=arm_32
64617    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64618    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64619    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64620  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64621    HOTSPOT_TARGET_CPU=arm_64
64622    HOTSPOT_TARGET_CPU_ARCH=arm
64623    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64624    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64625  fi
64626
64627  # Verify that dependencies are met for explicitly set features.
64628  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64629    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64630  fi
64631
64632  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64633    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64634  fi
64635
64636  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64637    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64638  fi
64639
64640  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64641    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64642  fi
64643
64644  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64645    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64646  fi
64647
64648  # Turn on additional features based on other parts of configure
64649  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64650    JVM_FEATURES="$JVM_FEATURES dtrace"
64651  else
64652    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64653      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64654    fi
64655  fi
64656
64657  if test "x$STATIC_BUILD" = "xtrue"; then
64658    JVM_FEATURES="$JVM_FEATURES static-build"
64659  else
64660    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64661      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64662    fi
64663  fi
64664
64665  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64666    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64667      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64668    fi
64669  fi
64670
64671  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64672    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64673      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64674    fi
64675  fi
64676
64677  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64678  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64679     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64680     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64681    JVM_FEATURES_jvmci="jvmci"
64682  else
64683    JVM_FEATURES_jvmci=""
64684  fi
64685
64686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64687$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64688  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64690$as_echo "yes, forced" >&6; }
64691    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64692      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64693    fi
64694    INCLUDE_GRAAL="true"
64695  else
64696    # By default enable graal build where AOT is available
64697    if test "x$ENABLE_AOT" = "xtrue"; then
64698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64699$as_echo "yes" >&6; }
64700      JVM_FEATURES_graal="graal"
64701      INCLUDE_GRAAL="true"
64702    else
64703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64704$as_echo "no" >&6; }
64705      JVM_FEATURES_graal=""
64706      INCLUDE_GRAAL="false"
64707    fi
64708  fi
64709
64710
64711
64712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64713$as_echo_n "checking if aot should be enabled... " >&6; }
64714  if test "x$ENABLE_AOT" = "xtrue"; then
64715    if test "x$enable_aot" = "xyes"; then
64716      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64717$as_echo "yes, forced" >&6; }
64718    else
64719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64720$as_echo "yes" >&6; }
64721    fi
64722    JVM_FEATURES_aot="aot"
64723  else
64724    if test "x$enable_aot" = "xno"; then
64725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64726$as_echo "no, forced" >&6; }
64727    else
64728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64729$as_echo "no" >&6; }
64730    fi
64731    JVM_FEATURES_aot=""
64732  fi
64733
64734  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64735    # Default to use link time optimizations on minimal on arm
64736    JVM_FEATURES_link_time_opt="link-time-opt"
64737  else
64738    JVM_FEATURES_link_time_opt=""
64739  fi
64740
64741  # All variants but minimal (and custom) get these features
64742  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64743
64744  # Enable features depending on variant.
64745  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64746  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64747  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64748  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64749  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64750  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64751  JVM_FEATURES_custom="$JVM_FEATURES"
64752
64753
64754
64755
64756
64757
64758
64759
64760
64761  # Used for verification of Makefiles by check-jvm-feature
64762
64763
64764  # We don't support --with-jvm-interpreter anymore, use zero instead.
64765
64766
64767# Check whether --with-jvm-interpreter was given.
64768if test "${with_jvm_interpreter+set}" = set; then :
64769  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64770$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64771fi
64772
64773
64774
64775
64776###############################################################################
64777#
64778# We need to do some final tweaking, when everything else is done.
64779#
64780###############################################################################
64781
64782
64783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64784$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64785
64786  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64787    ENABLE_INTREE_EC=yes
64788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64789$as_echo "yes" >&6; }
64790  else
64791    ENABLE_INTREE_EC=no
64792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64793$as_echo "no" >&6; }
64794  fi
64795
64796
64797
64798
64799  # Check whether --enable-jtreg-failure-handler was given.
64800if test "${enable_jtreg_failure_handler+set}" = set; then :
64801  enableval=$enable_jtreg_failure_handler;
64802fi
64803
64804
64805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64806$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64807
64808  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64809    if test "x$JT_HOME" = "x"; then
64810      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64811    else
64812      BUILD_FAILURE_HANDLER=true
64813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64814$as_echo "yes, forced" >&6; }
64815    fi
64816  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64817    BUILD_FAILURE_HANDLER=false
64818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64819$as_echo "no, forced" >&6; }
64820  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64821      || test "x$enable_jtreg_failure_handler" = "x"; then
64822    if test "x$JT_HOME" = "x"; then
64823      BUILD_FAILURE_HANDLER=false
64824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64825$as_echo "no, missing jtreg" >&6; }
64826    else
64827      BUILD_FAILURE_HANDLER=true
64828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64829$as_echo "yes, jtreg present" >&6; }
64830    fi
64831  else
64832    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64833  fi
64834
64835
64836
64837
64838  # Check whether --enable-generate-classlist was given.
64839if test "${enable_generate_classlist+set}" = set; then :
64840  enableval=$enable_generate_classlist;
64841fi
64842
64843
64844  # Check if it's likely that it's possible to generate the classlist. Depending
64845  # on exact jvm configuration it could be possible anyway.
64846  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64847    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64848  else
64849    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64850  fi
64851
64852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64853$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64854  if test "x$enable_generate_classlist" = "xyes"; then
64855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64856$as_echo "yes, forced" >&6; }
64857    ENABLE_GENERATE_CLASSLIST="true"
64858    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64859      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64860$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64861    fi
64862  elif test "x$enable_generate_classlist" = "xno"; then
64863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64864$as_echo "no, forced" >&6; }
64865    ENABLE_GENERATE_CLASSLIST="false"
64866  elif test "x$enable_generate_classlist" = "x"; then
64867    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64869$as_echo "yes" >&6; }
64870      ENABLE_GENERATE_CLASSLIST="true"
64871    else
64872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64873$as_echo "no" >&6; }
64874      ENABLE_GENERATE_CLASSLIST="false"
64875    fi
64876  else
64877    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64878  fi
64879
64880
64881
64882
64883###############################################################################
64884#
64885# Configure parts of the build that only affect the build performance,
64886# not the result.
64887#
64888###############################################################################
64889
64890
64891  # How many cores do we have on this build system?
64892
64893# Check whether --with-num-cores was given.
64894if test "${with_num_cores+set}" = set; then :
64895  withval=$with_num_cores;
64896fi
64897
64898  if test "x$with_num_cores" = x; then
64899    # The number of cores were not specified, try to probe them.
64900
64901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64902$as_echo_n "checking for number of cores... " >&6; }
64903  NUM_CORES=1
64904  FOUND_CORES=no
64905
64906  if test -f /proc/cpuinfo; then
64907    # Looks like a Linux (or cygwin) system
64908    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64909    FOUND_CORES=yes
64910  elif test -x /usr/sbin/psrinfo; then
64911    # Looks like a Solaris system
64912    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64913    FOUND_CORES=yes
64914  elif test -x /usr/sbin/sysctl; then
64915    # Looks like a MacOSX system
64916    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64917    FOUND_CORES=yes
64918  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64919    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64920    FOUND_CORES=yes
64921  elif test -n "$NUMBER_OF_PROCESSORS"; then
64922    # On windows, look in the env
64923    NUM_CORES=$NUMBER_OF_PROCESSORS
64924    FOUND_CORES=yes
64925  fi
64926
64927  if test "x$FOUND_CORES" = xyes; then
64928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64929$as_echo "$NUM_CORES" >&6; }
64930  else
64931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64932$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64933    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64934$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64935  fi
64936
64937  else
64938    NUM_CORES=$with_num_cores
64939  fi
64940
64941
64942
64943  # How much memory do we have on this build system?
64944
64945# Check whether --with-memory-size was given.
64946if test "${with_memory_size+set}" = set; then :
64947  withval=$with_memory_size;
64948fi
64949
64950  if test "x$with_memory_size" = x; then
64951    # The memory size was not specified, try to probe it.
64952
64953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64954$as_echo_n "checking for memory size... " >&6; }
64955  # Default to 1024 MB
64956  MEMORY_SIZE=1024
64957  FOUND_MEM=no
64958
64959  if test -f /proc/meminfo; then
64960    # Looks like a Linux (or cygwin) system
64961    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64962    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64963    FOUND_MEM=yes
64964  elif test -x /usr/sbin/prtconf; then
64965    # Looks like a Solaris or AIX system
64966    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64967    FOUND_MEM=yes
64968  elif test -x /usr/sbin/sysctl; then
64969    # Looks like a MacOSX system
64970    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64971    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64972    FOUND_MEM=yes
64973  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64974    # Windows, but without cygwin
64975    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64976    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64977    FOUND_MEM=yes
64978  fi
64979
64980  if test "x$FOUND_MEM" = xyes; then
64981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64982$as_echo "$MEMORY_SIZE MB" >&6; }
64983  else
64984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64985$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64986    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64987$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64988  fi
64989
64990  else
64991    MEMORY_SIZE=$with_memory_size
64992  fi
64993
64994
64995
64996  # Provide a decent default number of parallel jobs for make depending on
64997  # number of cores, amount of memory and machine architecture.
64998
64999# Check whether --with-jobs was given.
65000if test "${with_jobs+set}" = set; then :
65001  withval=$with_jobs;
65002fi
65003
65004  if test "x$with_jobs" = x; then
65005    # Number of jobs was not specified, calculate.
65006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65007$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65008    # Approximate memory in GB.
65009    memory_gb=`expr $MEMORY_SIZE / 1024`
65010    # Pick the lowest of memory in gb and number of cores.
65011    if test "$memory_gb" -lt "$NUM_CORES"; then
65012      JOBS="$memory_gb"
65013    else
65014      JOBS="$NUM_CORES"
65015    fi
65016    if test "$JOBS" -eq "0"; then
65017      JOBS=1
65018    fi
65019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65020$as_echo "$JOBS" >&6; }
65021  else
65022    JOBS=$with_jobs
65023  fi
65024
65025
65026
65027  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65028
65029# Check whether --with-test-jobs was given.
65030if test "${with_test_jobs+set}" = set; then :
65031  withval=$with_test_jobs;
65032fi
65033
65034  if test "x$with_test_jobs" = x; then
65035      TEST_JOBS=0
65036  else
65037      TEST_JOBS=$with_test_jobs
65038  fi
65039
65040
65041
65042# Setup arguments for the boot jdk (after cores and memory have been setup)
65043
65044  ##############################################################################
65045  #
65046  # Specify jvm options for anything that is run with the Boot JDK.
65047  # Not all JVM:s accept the same arguments on the command line.
65048  #
65049
65050# Check whether --with-boot-jdk-jvmargs was given.
65051if test "${with_boot_jdk_jvmargs+set}" = set; then :
65052  withval=$with_boot_jdk_jvmargs;
65053fi
65054
65055
65056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65057$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65058
65059  # Disable special log output when a debug build is used as Boot JDK...
65060
65061  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65062  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65063  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65064  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65065  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65066  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65067    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65068    JVM_ARG_OK=true
65069  else
65070    $ECHO "Arg failed:" >&5
65071    $ECHO "$OUTPUT" >&5
65072    JVM_ARG_OK=false
65073  fi
65074
65075
65076  # Force en-US environment
65077
65078  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65079  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65080  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65081  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65082  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65083  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65084    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65085    JVM_ARG_OK=true
65086  else
65087    $ECHO "Arg failed:" >&5
65088    $ECHO "$OUTPUT" >&5
65089    JVM_ARG_OK=false
65090  fi
65091
65092
65093  # Apply user provided options.
65094
65095  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65096  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65097  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65098  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65099  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65101    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65102    JVM_ARG_OK=true
65103  else
65104    $ECHO "Arg failed:" >&5
65105    $ECHO "$OUTPUT" >&5
65106    JVM_ARG_OK=false
65107  fi
65108
65109
65110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65111$as_echo "$boot_jdk_jvmargs" >&6; }
65112
65113  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65114  JAVA_FLAGS=$boot_jdk_jvmargs
65115
65116
65117
65118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65119$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65120
65121  # Starting amount of heap memory.
65122
65123  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65124  $ECHO "Command: $JAVA -Xms64M -version" >&5
65125  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65126  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65127  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65128  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65129    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65130    JVM_ARG_OK=true
65131  else
65132    $ECHO "Arg failed:" >&5
65133    $ECHO "$OUTPUT" >&5
65134    JVM_ARG_OK=false
65135  fi
65136
65137  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65138
65139  # Maximum amount of heap memory and stack size.
65140  JVM_HEAP_LIMIT_32="1024"
65141  # Running a 64 bit JVM allows for and requires a bigger heap
65142  JVM_HEAP_LIMIT_64="1600"
65143  STACK_SIZE_32=768
65144  STACK_SIZE_64=1536
65145  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65146  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65147    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65148  fi
65149  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65150    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65151  fi
65152  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65153    JVM_HEAP_LIMIT_32=512
65154    JVM_HEAP_LIMIT_64=512
65155  fi
65156
65157  if test "x$BOOT_JDK_BITS" = "x32"; then
65158    STACK_SIZE=$STACK_SIZE_32
65159    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65160  else
65161    STACK_SIZE=$STACK_SIZE_64
65162    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65163  fi
65164
65165  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65166  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65167  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65168  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65169  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65170  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65171    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65172    JVM_ARG_OK=true
65173  else
65174    $ECHO "Arg failed:" >&5
65175    $ECHO "$OUTPUT" >&5
65176    JVM_ARG_OK=false
65177  fi
65178
65179
65180  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65181  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65182  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65183  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65184  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65185  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65186    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65187    JVM_ARG_OK=true
65188  else
65189    $ECHO "Arg failed:" >&5
65190    $ECHO "$OUTPUT" >&5
65191    JVM_ARG_OK=false
65192  fi
65193
65194
65195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65196$as_echo "$boot_jdk_jvmargs_big" >&6; }
65197
65198  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65199
65200
65201  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65202    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65203    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65204  else
65205    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65206    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65207  fi
65208  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65209  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65211$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65213$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65214
65215
65216  # By default, the main javac compilations use big
65217  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65218
65219
65220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65221$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65222
65223  # Use serial gc for small short lived tools if possible
65224
65225  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65226  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65227  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65228  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65229  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65230  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65231    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65232    JVM_ARG_OK=true
65233  else
65234    $ECHO "Arg failed:" >&5
65235    $ECHO "$OUTPUT" >&5
65236    JVM_ARG_OK=false
65237  fi
65238
65239
65240  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65241  $ECHO "Command: $JAVA -Xms32M -version" >&5
65242  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65243  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65244  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65245  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65246    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65247    JVM_ARG_OK=true
65248  else
65249    $ECHO "Arg failed:" >&5
65250    $ECHO "$OUTPUT" >&5
65251    JVM_ARG_OK=false
65252  fi
65253
65254
65255  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65256  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65257  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65258  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65259  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65260  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65261    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65262    JVM_ARG_OK=true
65263  else
65264    $ECHO "Arg failed:" >&5
65265    $ECHO "$OUTPUT" >&5
65266    JVM_ARG_OK=false
65267  fi
65268
65269
65270  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65271  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65272  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65273  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65274  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65275  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65276    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65277    JVM_ARG_OK=true
65278  else
65279    $ECHO "Arg failed:" >&5
65280    $ECHO "$OUTPUT" >&5
65281    JVM_ARG_OK=false
65282  fi
65283
65284
65285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65286$as_echo "$boot_jdk_jvmargs_small" >&6; }
65287
65288  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65289
65290
65291  JAVA_TOOL_FLAGS_SMALL=""
65292  for f in $JAVA_FLAGS_SMALL; do
65293    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65294  done
65295
65296
65297
65298# Setup smart javac (after cores and memory have been setup)
65299
65300
65301# Check whether --with-sjavac-server-java was given.
65302if test "${with_sjavac_server_java+set}" = set; then :
65303  withval=$with_sjavac_server_java;
65304fi
65305
65306
65307  if test "x$with_sjavac_server_java" != x; then
65308    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65309    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65310    if test "x$FOUND_VERSION" = x; then
65311      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65312    fi
65313  else
65314    SJAVAC_SERVER_JAVA="$JAVA"
65315  fi
65316
65317
65318  if test "$MEMORY_SIZE" -gt "3000"; then
65319
65320  $ECHO "Check if jvm arg is ok: -d64" >&5
65321  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65322  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65323  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65324  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65325  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65326    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65327    JVM_ARG_OK=true
65328  else
65329    $ECHO "Arg failed:" >&5
65330    $ECHO "$OUTPUT" >&5
65331    JVM_ARG_OK=false
65332  fi
65333
65334    if test "$JVM_ARG_OK" = true; then
65335      JVM_64BIT=true
65336      JVM_ARG_OK=false
65337    fi
65338  fi
65339
65340  MX_VALUE=`expr $MEMORY_SIZE / 2`
65341  if test "$JVM_64BIT" = true; then
65342    # Set ms lower than mx since more than one instance of the server might
65343    # get launched at the same time before they figure out which instance won.
65344    MS_VALUE=512
65345    if test "$MX_VALUE" -gt "2048"; then
65346      MX_VALUE=2048
65347    fi
65348  else
65349    MS_VALUE=256
65350    if test "$MX_VALUE" -gt "1500"; then
65351      MX_VALUE=1500
65352    fi
65353  fi
65354  if test "$MX_VALUE" -lt "512"; then
65355    MX_VALUE=512
65356  fi
65357
65358  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65359  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65360  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65361  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65362  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65363  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65364    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65365    JVM_ARG_OK=true
65366  else
65367    $ECHO "Arg failed:" >&5
65368    $ECHO "$OUTPUT" >&5
65369    JVM_ARG_OK=false
65370  fi
65371
65372
65373
65374  # Check whether --enable-sjavac was given.
65375if test "${enable_sjavac+set}" = set; then :
65376  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65377else
65378  ENABLE_SJAVAC="no"
65379fi
65380
65381  if test "x$JVM_ARG_OK" = "xfalse"; then
65382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65383$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65384    ENABLE_SJAVAC="no"
65385  fi
65386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65387$as_echo_n "checking whether to use sjavac... " >&6; }
65388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65389$as_echo "$ENABLE_SJAVAC" >&6; }
65390
65391
65392  # Check whether --enable-javac-server was given.
65393if test "${enable_javac_server+set}" = set; then :
65394  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65395else
65396  ENABLE_JAVAC_SERVER="yes"
65397fi
65398
65399  if test "x$JVM_ARG_OK" = "xfalse"; then
65400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65401$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65402    ENABLE_JAVAC_SERVER="no"
65403  fi
65404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65405$as_echo_n "checking whether to use javac server... " >&6; }
65406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65407$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65408
65409
65410  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65411    # When using a server javac, the small client instances do not need much
65412    # resources.
65413    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65414  fi
65415
65416
65417# Setup use of icecc if requested
65418
65419  # Check whether --enable-icecc was given.
65420if test "${enable_icecc+set}" = set; then :
65421  enableval=$enable_icecc;
65422fi
65423
65424
65425  if test "x${enable_icecc}" = "xyes"; then
65426
65427
65428
65429  # Publish this variable in the help.
65430
65431
65432  if [ -z "${ICECC_CMD+x}" ]; then
65433    # The variable is not set by user, try to locate tool using the code snippet
65434    for ac_prog in icecc
65435do
65436  # Extract the first word of "$ac_prog", so it can be a program name with args.
65437set dummy $ac_prog; ac_word=$2
65438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65439$as_echo_n "checking for $ac_word... " >&6; }
65440if ${ac_cv_path_ICECC_CMD+:} false; then :
65441  $as_echo_n "(cached) " >&6
65442else
65443  case $ICECC_CMD in
65444  [\\/]* | ?:[\\/]*)
65445  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65446  ;;
65447  *)
65448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65449for as_dir in $PATH
65450do
65451  IFS=$as_save_IFS
65452  test -z "$as_dir" && as_dir=.
65453    for ac_exec_ext in '' $ac_executable_extensions; do
65454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65455    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65457    break 2
65458  fi
65459done
65460  done
65461IFS=$as_save_IFS
65462
65463  ;;
65464esac
65465fi
65466ICECC_CMD=$ac_cv_path_ICECC_CMD
65467if test -n "$ICECC_CMD"; then
65468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65469$as_echo "$ICECC_CMD" >&6; }
65470else
65471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65472$as_echo "no" >&6; }
65473fi
65474
65475
65476  test -n "$ICECC_CMD" && break
65477done
65478
65479  else
65480    # The variable is set, but is it from the command line or the environment?
65481
65482    # Try to remove the string !ICECC_CMD! from our list.
65483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65485      # If it failed, the variable was not from the command line. Ignore it,
65486      # but warn the user (except for BASH, which is always set by the calling BASH).
65487      if test "xICECC_CMD" != xBASH; then
65488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65489$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65490      fi
65491      # Try to locate tool using the code snippet
65492      for ac_prog in icecc
65493do
65494  # Extract the first word of "$ac_prog", so it can be a program name with args.
65495set dummy $ac_prog; ac_word=$2
65496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65497$as_echo_n "checking for $ac_word... " >&6; }
65498if ${ac_cv_path_ICECC_CMD+:} false; then :
65499  $as_echo_n "(cached) " >&6
65500else
65501  case $ICECC_CMD in
65502  [\\/]* | ?:[\\/]*)
65503  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65504  ;;
65505  *)
65506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65507for as_dir in $PATH
65508do
65509  IFS=$as_save_IFS
65510  test -z "$as_dir" && as_dir=.
65511    for ac_exec_ext in '' $ac_executable_extensions; do
65512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65513    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65515    break 2
65516  fi
65517done
65518  done
65519IFS=$as_save_IFS
65520
65521  ;;
65522esac
65523fi
65524ICECC_CMD=$ac_cv_path_ICECC_CMD
65525if test -n "$ICECC_CMD"; then
65526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65527$as_echo "$ICECC_CMD" >&6; }
65528else
65529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65530$as_echo "no" >&6; }
65531fi
65532
65533
65534  test -n "$ICECC_CMD" && break
65535done
65536
65537    else
65538      # If it succeeded, then it was overridden by the user. We will use it
65539      # for the tool.
65540
65541      # First remove it from the list of overridden variables, so we can test
65542      # for unknown variables in the end.
65543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65544
65545      # Check if we try to supply an empty value
65546      if test "x$ICECC_CMD" = x; then
65547        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65548$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65550$as_echo_n "checking for ICECC_CMD... " >&6; }
65551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65552$as_echo "disabled" >&6; }
65553      else
65554        # Check if the provided tool contains a complete path.
65555        tool_specified="$ICECC_CMD"
65556        tool_basename="${tool_specified##*/}"
65557        if test "x$tool_basename" = "x$tool_specified"; then
65558          # A command without a complete path is provided, search $PATH.
65559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65560$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65561          # Extract the first word of "$tool_basename", so it can be a program name with args.
65562set dummy $tool_basename; ac_word=$2
65563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65564$as_echo_n "checking for $ac_word... " >&6; }
65565if ${ac_cv_path_ICECC_CMD+:} false; then :
65566  $as_echo_n "(cached) " >&6
65567else
65568  case $ICECC_CMD in
65569  [\\/]* | ?:[\\/]*)
65570  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65571  ;;
65572  *)
65573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65574for as_dir in $PATH
65575do
65576  IFS=$as_save_IFS
65577  test -z "$as_dir" && as_dir=.
65578    for ac_exec_ext in '' $ac_executable_extensions; do
65579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65580    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65582    break 2
65583  fi
65584done
65585  done
65586IFS=$as_save_IFS
65587
65588  ;;
65589esac
65590fi
65591ICECC_CMD=$ac_cv_path_ICECC_CMD
65592if test -n "$ICECC_CMD"; then
65593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65594$as_echo "$ICECC_CMD" >&6; }
65595else
65596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65597$as_echo "no" >&6; }
65598fi
65599
65600
65601          if test "x$ICECC_CMD" = x; then
65602            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65603          fi
65604        else
65605          # Otherwise we believe it is a complete path. Use it as it is.
65606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65607$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65608          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65609$as_echo_n "checking for ICECC_CMD... " >&6; }
65610          if test ! -x "$tool_specified"; then
65611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65612$as_echo "not found" >&6; }
65613            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65614          fi
65615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65616$as_echo "$tool_specified" >&6; }
65617        fi
65618      fi
65619    fi
65620
65621  fi
65622
65623
65624
65625  if test "x$ICECC_CMD" = x; then
65626    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65627  fi
65628
65629
65630    old_path="$PATH"
65631
65632    # Look for icecc-create-env in some known places
65633    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65634
65635
65636
65637  # Publish this variable in the help.
65638
65639
65640  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65641    # The variable is not set by user, try to locate tool using the code snippet
65642    for ac_prog in icecc-create-env
65643do
65644  # Extract the first word of "$ac_prog", so it can be a program name with args.
65645set dummy $ac_prog; ac_word=$2
65646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65647$as_echo_n "checking for $ac_word... " >&6; }
65648if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65649  $as_echo_n "(cached) " >&6
65650else
65651  case $ICECC_CREATE_ENV in
65652  [\\/]* | ?:[\\/]*)
65653  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65654  ;;
65655  *)
65656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65657for as_dir in $PATH
65658do
65659  IFS=$as_save_IFS
65660  test -z "$as_dir" && as_dir=.
65661    for ac_exec_ext in '' $ac_executable_extensions; do
65662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65663    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65665    break 2
65666  fi
65667done
65668  done
65669IFS=$as_save_IFS
65670
65671  ;;
65672esac
65673fi
65674ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65675if test -n "$ICECC_CREATE_ENV"; then
65676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65677$as_echo "$ICECC_CREATE_ENV" >&6; }
65678else
65679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65680$as_echo "no" >&6; }
65681fi
65682
65683
65684  test -n "$ICECC_CREATE_ENV" && break
65685done
65686
65687  else
65688    # The variable is set, but is it from the command line or the environment?
65689
65690    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65693      # If it failed, the variable was not from the command line. Ignore it,
65694      # but warn the user (except for BASH, which is always set by the calling BASH).
65695      if test "xICECC_CREATE_ENV" != xBASH; then
65696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65697$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65698      fi
65699      # Try to locate tool using the code snippet
65700      for ac_prog in icecc-create-env
65701do
65702  # Extract the first word of "$ac_prog", so it can be a program name with args.
65703set dummy $ac_prog; ac_word=$2
65704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65705$as_echo_n "checking for $ac_word... " >&6; }
65706if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65707  $as_echo_n "(cached) " >&6
65708else
65709  case $ICECC_CREATE_ENV in
65710  [\\/]* | ?:[\\/]*)
65711  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65712  ;;
65713  *)
65714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65715for as_dir in $PATH
65716do
65717  IFS=$as_save_IFS
65718  test -z "$as_dir" && as_dir=.
65719    for ac_exec_ext in '' $ac_executable_extensions; do
65720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65721    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65723    break 2
65724  fi
65725done
65726  done
65727IFS=$as_save_IFS
65728
65729  ;;
65730esac
65731fi
65732ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65733if test -n "$ICECC_CREATE_ENV"; then
65734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65735$as_echo "$ICECC_CREATE_ENV" >&6; }
65736else
65737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65738$as_echo "no" >&6; }
65739fi
65740
65741
65742  test -n "$ICECC_CREATE_ENV" && break
65743done
65744
65745    else
65746      # If it succeeded, then it was overridden by the user. We will use it
65747      # for the tool.
65748
65749      # First remove it from the list of overridden variables, so we can test
65750      # for unknown variables in the end.
65751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65752
65753      # Check if we try to supply an empty value
65754      if test "x$ICECC_CREATE_ENV" = x; then
65755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65756$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65758$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65760$as_echo "disabled" >&6; }
65761      else
65762        # Check if the provided tool contains a complete path.
65763        tool_specified="$ICECC_CREATE_ENV"
65764        tool_basename="${tool_specified##*/}"
65765        if test "x$tool_basename" = "x$tool_specified"; then
65766          # A command without a complete path is provided, search $PATH.
65767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65768$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65769          # Extract the first word of "$tool_basename", so it can be a program name with args.
65770set dummy $tool_basename; ac_word=$2
65771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65772$as_echo_n "checking for $ac_word... " >&6; }
65773if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65774  $as_echo_n "(cached) " >&6
65775else
65776  case $ICECC_CREATE_ENV in
65777  [\\/]* | ?:[\\/]*)
65778  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65779  ;;
65780  *)
65781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65782for as_dir in $PATH
65783do
65784  IFS=$as_save_IFS
65785  test -z "$as_dir" && as_dir=.
65786    for ac_exec_ext in '' $ac_executable_extensions; do
65787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65788    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65790    break 2
65791  fi
65792done
65793  done
65794IFS=$as_save_IFS
65795
65796  ;;
65797esac
65798fi
65799ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65800if test -n "$ICECC_CREATE_ENV"; then
65801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65802$as_echo "$ICECC_CREATE_ENV" >&6; }
65803else
65804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65805$as_echo "no" >&6; }
65806fi
65807
65808
65809          if test "x$ICECC_CREATE_ENV" = x; then
65810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65811          fi
65812        else
65813          # Otherwise we believe it is a complete path. Use it as it is.
65814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65815$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65817$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65818          if test ! -x "$tool_specified"; then
65819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65820$as_echo "not found" >&6; }
65821            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65822          fi
65823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65824$as_echo "$tool_specified" >&6; }
65825        fi
65826      fi
65827    fi
65828
65829  fi
65830
65831
65832
65833  if test "x$ICECC_CREATE_ENV" = x; then
65834    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65835  fi
65836
65837
65838    # Use icecc-create-env to create a minimal compilation environment that can
65839    # be sent to the other hosts in the icecream cluster.
65840    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65841    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65842    # Older versions of icecc does not have the --gcc parameter
65843    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65844      icecc_gcc_arg="--gcc"
65845    fi
65846    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65847
65848  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65849      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65850          ${icecc_create_env_log} 2>&1 )
65851  if test "$?" != "0"; then
65852    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65853$as_echo "$as_me: icecc-create-env output:" >&6;}
65854    cat \
65855          ${icecc_create_env_log}
65856    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65857  fi
65858
65859    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65860      # For clang, the icecc compilerwrapper is needed. It usually resides next
65861      # to icecc-create-env.
65862
65863
65864
65865  # Publish this variable in the help.
65866
65867
65868  if [ -z "${ICECC_WRAPPER+x}" ]; then
65869    # The variable is not set by user, try to locate tool using the code snippet
65870    for ac_prog in compilerwrapper
65871do
65872  # Extract the first word of "$ac_prog", so it can be a program name with args.
65873set dummy $ac_prog; ac_word=$2
65874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65875$as_echo_n "checking for $ac_word... " >&6; }
65876if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65877  $as_echo_n "(cached) " >&6
65878else
65879  case $ICECC_WRAPPER in
65880  [\\/]* | ?:[\\/]*)
65881  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65882  ;;
65883  *)
65884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65885for as_dir in $PATH
65886do
65887  IFS=$as_save_IFS
65888  test -z "$as_dir" && as_dir=.
65889    for ac_exec_ext in '' $ac_executable_extensions; do
65890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65891    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65893    break 2
65894  fi
65895done
65896  done
65897IFS=$as_save_IFS
65898
65899  ;;
65900esac
65901fi
65902ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65903if test -n "$ICECC_WRAPPER"; then
65904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65905$as_echo "$ICECC_WRAPPER" >&6; }
65906else
65907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65908$as_echo "no" >&6; }
65909fi
65910
65911
65912  test -n "$ICECC_WRAPPER" && break
65913done
65914
65915  else
65916    # The variable is set, but is it from the command line or the environment?
65917
65918    # Try to remove the string !ICECC_WRAPPER! from our list.
65919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65921      # If it failed, the variable was not from the command line. Ignore it,
65922      # but warn the user (except for BASH, which is always set by the calling BASH).
65923      if test "xICECC_WRAPPER" != xBASH; then
65924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65925$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65926      fi
65927      # Try to locate tool using the code snippet
65928      for ac_prog in compilerwrapper
65929do
65930  # Extract the first word of "$ac_prog", so it can be a program name with args.
65931set dummy $ac_prog; ac_word=$2
65932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65933$as_echo_n "checking for $ac_word... " >&6; }
65934if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65935  $as_echo_n "(cached) " >&6
65936else
65937  case $ICECC_WRAPPER in
65938  [\\/]* | ?:[\\/]*)
65939  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65940  ;;
65941  *)
65942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65943for as_dir in $PATH
65944do
65945  IFS=$as_save_IFS
65946  test -z "$as_dir" && as_dir=.
65947    for ac_exec_ext in '' $ac_executable_extensions; do
65948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65949    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65951    break 2
65952  fi
65953done
65954  done
65955IFS=$as_save_IFS
65956
65957  ;;
65958esac
65959fi
65960ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65961if test -n "$ICECC_WRAPPER"; then
65962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65963$as_echo "$ICECC_WRAPPER" >&6; }
65964else
65965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65966$as_echo "no" >&6; }
65967fi
65968
65969
65970  test -n "$ICECC_WRAPPER" && break
65971done
65972
65973    else
65974      # If it succeeded, then it was overridden by the user. We will use it
65975      # for the tool.
65976
65977      # First remove it from the list of overridden variables, so we can test
65978      # for unknown variables in the end.
65979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65980
65981      # Check if we try to supply an empty value
65982      if test "x$ICECC_WRAPPER" = x; then
65983        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65984$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65986$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65988$as_echo "disabled" >&6; }
65989      else
65990        # Check if the provided tool contains a complete path.
65991        tool_specified="$ICECC_WRAPPER"
65992        tool_basename="${tool_specified##*/}"
65993        if test "x$tool_basename" = "x$tool_specified"; then
65994          # A command without a complete path is provided, search $PATH.
65995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65996$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65997          # Extract the first word of "$tool_basename", so it can be a program name with args.
65998set dummy $tool_basename; ac_word=$2
65999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66000$as_echo_n "checking for $ac_word... " >&6; }
66001if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66002  $as_echo_n "(cached) " >&6
66003else
66004  case $ICECC_WRAPPER in
66005  [\\/]* | ?:[\\/]*)
66006  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66007  ;;
66008  *)
66009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66010for as_dir in $PATH
66011do
66012  IFS=$as_save_IFS
66013  test -z "$as_dir" && as_dir=.
66014    for ac_exec_ext in '' $ac_executable_extensions; do
66015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66016    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66018    break 2
66019  fi
66020done
66021  done
66022IFS=$as_save_IFS
66023
66024  ;;
66025esac
66026fi
66027ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66028if test -n "$ICECC_WRAPPER"; then
66029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66030$as_echo "$ICECC_WRAPPER" >&6; }
66031else
66032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66033$as_echo "no" >&6; }
66034fi
66035
66036
66037          if test "x$ICECC_WRAPPER" = x; then
66038            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66039          fi
66040        else
66041          # Otherwise we believe it is a complete path. Use it as it is.
66042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66043$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66044          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66045$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66046          if test ! -x "$tool_specified"; then
66047            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66048$as_echo "not found" >&6; }
66049            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66050          fi
66051          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66052$as_echo "$tool_specified" >&6; }
66053        fi
66054      fi
66055    fi
66056
66057  fi
66058
66059
66060
66061  if test "x$ICECC_WRAPPER" = x; then
66062    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66063  fi
66064
66065
66066
66067  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66068      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66069  if test "$?" != "0"; then
66070    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66071$as_echo "$as_me: icecc-create-env output:" >&6;}
66072    cat ${icecc_create_env_log}
66073    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66074  fi
66075
66076    else
66077      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66078    fi
66079    PATH="$old_path"
66080    # The bundle with the compiler gets a name based on checksums. Parse log file
66081    # to find it.
66082    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66083    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66084    if test ! -f ${ICECC_ENV_BUNDLE}; then
66085      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66086    fi
66087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66088$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66090$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66091    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66092
66093    if test "x${COMPILE_TYPE}" = "xcross"; then
66094      # If cross compiling, create a separate env package for the build compiler
66095      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66096      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66097      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66098
66099  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66100      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66101            ${icecc_create_env_log_build} 2>&1 )
66102  if test "$?" != "0"; then
66103    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66104$as_echo "$as_me: icecc-create-env output:" >&6;}
66105    cat \
66106            ${icecc_create_env_log_build}
66107    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66108  fi
66109
66110      elif test "x${BUILD_CC##*/}" = "xclang"; then
66111
66112  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66113      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66114  if test "$?" != "0"; then
66115    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66116$as_echo "$as_me: icecc-create-env output:" >&6;}
66117    cat ${icecc_create_env_log_build}
66118    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66119  fi
66120
66121      else
66122        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66123      fi
66124      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66125      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66126      if test ! -f ${ICECC_ENV_BUNDLE}; then
66127        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66128      fi
66129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66130$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66132$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66133      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66134          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66135    else
66136      BUILD_ICECC="${ICECC}"
66137    fi
66138
66139
66140  fi
66141
66142
66143# Can the C/C++ compiler use precompiled headers?
66144
66145
66146  ###############################################################################
66147  #
66148  # Can the C/C++ compiler use precompiled headers?
66149  #
66150  # Check whether --enable-precompiled-headers was given.
66151if test "${enable_precompiled_headers+set}" = set; then :
66152  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66153else
66154  ENABLE_PRECOMPH=yes
66155fi
66156
66157
66158  USE_PRECOMPILED_HEADER=1
66159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66160$as_echo_n "checking If precompiled header is enabled... " >&6; }
66161  if test "x$ENABLE_PRECOMPH" = xno; then
66162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66163$as_echo "no, forced" >&6; }
66164    USE_PRECOMPILED_HEADER=0
66165  elif test "x$ICECC" != "x"; then
66166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66167$as_echo "no, does not work effectively with icecc" >&6; }
66168    USE_PRECOMPILED_HEADER=0
66169  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66171$as_echo "no, does not work with Solaris Studio" >&6; }
66172    USE_PRECOMPILED_HEADER=0
66173  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66175$as_echo "no, does not work with xlc" >&6; }
66176    USE_PRECOMPILED_HEADER=0
66177  else
66178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66179$as_echo "yes" >&6; }
66180  fi
66181
66182  if test "x$ENABLE_PRECOMPH" = xyes; then
66183    # Check that the compiler actually supports precomp headers.
66184    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66186$as_echo_n "checking that precompiled headers work... " >&6; }
66187      echo "int alfa();" > conftest.h
66188      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66189      if test ! -f conftest.hpp.gch; then
66190        USE_PRECOMPILED_HEADER=0
66191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66192$as_echo "no" >&6; }
66193      else
66194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66195$as_echo "yes" >&6; }
66196      fi
66197      $RM conftest.h conftest.hpp.gch
66198    fi
66199  fi
66200
66201
66202
66203
66204# Setup use of ccache, if available
66205
66206  # Check whether --enable-ccache was given.
66207if test "${enable_ccache+set}" = set; then :
66208  enableval=$enable_ccache;
66209fi
66210
66211
66212  CCACHE_STATUS=
66213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66214$as_echo_n "checking is ccache enabled... " >&6; }
66215  if test "x$enable_ccache" = xyes; then
66216    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66218$as_echo "yes" >&6; }
66219      OLD_PATH="$PATH"
66220      if test "x$TOOLCHAIN_PATH" != x; then
66221        PATH=$TOOLCHAIN_PATH:$PATH
66222      fi
66223
66224
66225
66226  # Publish this variable in the help.
66227
66228
66229  if [ -z "${CCACHE+x}" ]; then
66230    # The variable is not set by user, try to locate tool using the code snippet
66231    for ac_prog in ccache
66232do
66233  # Extract the first word of "$ac_prog", so it can be a program name with args.
66234set dummy $ac_prog; ac_word=$2
66235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66236$as_echo_n "checking for $ac_word... " >&6; }
66237if ${ac_cv_path_CCACHE+:} false; then :
66238  $as_echo_n "(cached) " >&6
66239else
66240  case $CCACHE in
66241  [\\/]* | ?:[\\/]*)
66242  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66243  ;;
66244  *)
66245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66246for as_dir in $PATH
66247do
66248  IFS=$as_save_IFS
66249  test -z "$as_dir" && as_dir=.
66250    for ac_exec_ext in '' $ac_executable_extensions; do
66251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66252    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66254    break 2
66255  fi
66256done
66257  done
66258IFS=$as_save_IFS
66259
66260  ;;
66261esac
66262fi
66263CCACHE=$ac_cv_path_CCACHE
66264if test -n "$CCACHE"; then
66265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66266$as_echo "$CCACHE" >&6; }
66267else
66268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66269$as_echo "no" >&6; }
66270fi
66271
66272
66273  test -n "$CCACHE" && break
66274done
66275
66276  else
66277    # The variable is set, but is it from the command line or the environment?
66278
66279    # Try to remove the string !CCACHE! from our list.
66280    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66281    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66282      # If it failed, the variable was not from the command line. Ignore it,
66283      # but warn the user (except for BASH, which is always set by the calling BASH).
66284      if test "xCCACHE" != xBASH; then
66285        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66286$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66287      fi
66288      # Try to locate tool using the code snippet
66289      for ac_prog in ccache
66290do
66291  # Extract the first word of "$ac_prog", so it can be a program name with args.
66292set dummy $ac_prog; ac_word=$2
66293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66294$as_echo_n "checking for $ac_word... " >&6; }
66295if ${ac_cv_path_CCACHE+:} false; then :
66296  $as_echo_n "(cached) " >&6
66297else
66298  case $CCACHE in
66299  [\\/]* | ?:[\\/]*)
66300  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66301  ;;
66302  *)
66303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66304for as_dir in $PATH
66305do
66306  IFS=$as_save_IFS
66307  test -z "$as_dir" && as_dir=.
66308    for ac_exec_ext in '' $ac_executable_extensions; do
66309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66310    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66312    break 2
66313  fi
66314done
66315  done
66316IFS=$as_save_IFS
66317
66318  ;;
66319esac
66320fi
66321CCACHE=$ac_cv_path_CCACHE
66322if test -n "$CCACHE"; then
66323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66324$as_echo "$CCACHE" >&6; }
66325else
66326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66327$as_echo "no" >&6; }
66328fi
66329
66330
66331  test -n "$CCACHE" && break
66332done
66333
66334    else
66335      # If it succeeded, then it was overridden by the user. We will use it
66336      # for the tool.
66337
66338      # First remove it from the list of overridden variables, so we can test
66339      # for unknown variables in the end.
66340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66341
66342      # Check if we try to supply an empty value
66343      if test "x$CCACHE" = x; then
66344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66345$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66347$as_echo_n "checking for CCACHE... " >&6; }
66348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66349$as_echo "disabled" >&6; }
66350      else
66351        # Check if the provided tool contains a complete path.
66352        tool_specified="$CCACHE"
66353        tool_basename="${tool_specified##*/}"
66354        if test "x$tool_basename" = "x$tool_specified"; then
66355          # A command without a complete path is provided, search $PATH.
66356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66357$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66358          # Extract the first word of "$tool_basename", so it can be a program name with args.
66359set dummy $tool_basename; ac_word=$2
66360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66361$as_echo_n "checking for $ac_word... " >&6; }
66362if ${ac_cv_path_CCACHE+:} false; then :
66363  $as_echo_n "(cached) " >&6
66364else
66365  case $CCACHE in
66366  [\\/]* | ?:[\\/]*)
66367  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66368  ;;
66369  *)
66370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66371for as_dir in $PATH
66372do
66373  IFS=$as_save_IFS
66374  test -z "$as_dir" && as_dir=.
66375    for ac_exec_ext in '' $ac_executable_extensions; do
66376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66377    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66379    break 2
66380  fi
66381done
66382  done
66383IFS=$as_save_IFS
66384
66385  ;;
66386esac
66387fi
66388CCACHE=$ac_cv_path_CCACHE
66389if test -n "$CCACHE"; then
66390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66391$as_echo "$CCACHE" >&6; }
66392else
66393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66394$as_echo "no" >&6; }
66395fi
66396
66397
66398          if test "x$CCACHE" = x; then
66399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66400          fi
66401        else
66402          # Otherwise we believe it is a complete path. Use it as it is.
66403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66404$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66406$as_echo_n "checking for CCACHE... " >&6; }
66407          if test ! -x "$tool_specified"; then
66408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66409$as_echo "not found" >&6; }
66410            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66411          fi
66412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66413$as_echo "$tool_specified" >&6; }
66414        fi
66415      fi
66416    fi
66417
66418  fi
66419
66420
66421
66422  if test "x$CCACHE" = x; then
66423    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66424  fi
66425
66426
66427      PATH="$OLD_PATH"
66428      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66429      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66430    else
66431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66432$as_echo "no" >&6; }
66433      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66434$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66435    fi
66436  elif test "x$enable_ccache" = xno; then
66437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66438$as_echo "no, explicitly disabled" >&6; }
66439    CCACHE_STATUS="Disabled"
66440  elif test "x$enable_ccache" = x; then
66441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66442$as_echo "no" >&6; }
66443  else
66444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66445$as_echo "unknown" >&6; }
66446    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66447  fi
66448
66449
66450
66451# Check whether --with-ccache-dir was given.
66452if test "${with_ccache_dir+set}" = set; then :
66453  withval=$with_ccache_dir;
66454fi
66455
66456
66457  if test "x$with_ccache_dir" != x; then
66458    # When using a non home ccache directory, assume the use is to share ccache files
66459    # with other users. Thus change the umask.
66460    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66461    if test "x$CCACHE" = x; then
66462      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66463$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66464    fi
66465  fi
66466
66467  if test "x$CCACHE" != x; then
66468
66469  if test "x$CCACHE" != x; then
66470    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66471      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66472          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66473      if test "x$HAS_BAD_CCACHE" != "x"; then
66474        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66475      fi
66476    fi
66477    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66478      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66479          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66480      if test "x$HAS_BAD_CCACHE" != "x"; then
66481        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66482      fi
66483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66484$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66485      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66486      PUSHED_FLAGS="$CXXFLAGS"
66487      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66488      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66489/* end confdefs.h.  */
66490
66491int
66492main ()
66493{
66494
66495  ;
66496  return 0;
66497}
66498_ACEOF
66499if ac_fn_cxx_try_compile "$LINENO"; then :
66500  CC_KNOWS_CCACHE_TRICK=yes
66501else
66502  CC_KNOWS_CCACHE_TRICK=no
66503fi
66504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66505      CXXFLAGS="$PUSHED_FLAGS"
66506      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66508$as_echo "yes" >&6; }
66509        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66510
66511        CCACHE_SLOPPINESS=pch_defines,time_macros
66512      else
66513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66514$as_echo "no" >&6; }
66515        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66516      fi
66517    fi
66518
66519    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66520        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66521
66522    if test "x$SET_CCACHE_DIR" != x; then
66523      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66524      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66525    fi
66526  fi
66527
66528  fi
66529
66530
66531###############################################################################
66532#
66533# And now the finish...
66534#
66535###############################################################################
66536
66537# Check for some common pitfalls
66538
66539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66540    file_to_test="$SRC_ROOT/LICENSE"
66541    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66542      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
66543    fi
66544  fi
66545
66546
66547  # Did user specify any unknown variables?
66548
66549  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66550    # Replace the separating ! with spaces before presenting for end user.
66551    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66552    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66553$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66554  fi
66555
66556
66557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66558$as_echo_n "checking if build directory is on local disk... " >&6; }
66559
66560  # df -l lists only local disks; if the given directory is not found then
66561  # a non-zero exit code is given
66562  if test "x$DF" = x; then
66563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66564      # msys does not have df; use Windows "net use" instead.
66565      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66566      if test "x$IS_NETWORK_DISK" = x; then
66567        OUTPUT_DIR_IS_LOCAL="yes"
66568      else
66569        OUTPUT_DIR_IS_LOCAL="no"
66570      fi
66571    else
66572      # No df here, say it's local
66573      OUTPUT_DIR_IS_LOCAL="yes"
66574    fi
66575  else
66576    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66577      OUTPUT_DIR_IS_LOCAL="yes"
66578    else
66579      OUTPUT_DIR_IS_LOCAL="no"
66580    fi
66581  fi
66582
66583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66584$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66585
66586
66587
66588  # Check if the user has any old-style ALT_ variables set.
66589  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66590
66591  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66592  # Since we can't properly handle the dependencies for this, warn the user about the situation
66593  if test -e $OUTPUT_ROOT/spec.gmk; then
66594    IS_RECONFIGURE=yes
66595  else
66596    IS_RECONFIGURE=no
66597  fi
66598
66599
66600# At the end, call the custom hook. (Dummy macro if no custom sources available)
66601
66602
66603# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66604
66605  # Keep feature lists sorted and free of duplicates
66606  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66607  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66608  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66609  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66610  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66611  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66612  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66613
66614  # Validate features
66615  for variant in $JVM_VARIANTS; do
66616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66617$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66618    features_var_name=JVM_FEATURES_$variant
66619    JVM_FEATURES_TO_TEST=${!features_var_name}
66620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66621$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66622    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66623    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66624    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66625    if test "x$INVALID_FEATURES" != x; then
66626      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66627    fi
66628  done
66629
66630
66631# We're messing a bit with internal autoconf variables to put the config.status
66632# in the output directory instead of the current directory.
66633CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66634
66635# Create the actual output files. Now the main work of configure is done.
66636cat >confcache <<\_ACEOF
66637# This file is a shell script that caches the results of configure
66638# tests run on this system so they can be shared between configure
66639# scripts and configure runs, see configure's option --config-cache.
66640# It is not useful on other systems.  If it contains results you don't
66641# want to keep, you may remove or edit it.
66642#
66643# config.status only pays attention to the cache file if you give it
66644# the --recheck option to rerun configure.
66645#
66646# `ac_cv_env_foo' variables (set or unset) will be overridden when
66647# loading this file, other *unset* `ac_cv_foo' will be assigned the
66648# following values.
66649
66650_ACEOF
66651
66652# The following way of writing the cache mishandles newlines in values,
66653# but we know of no workaround that is simple, portable, and efficient.
66654# So, we kill variables containing newlines.
66655# Ultrix sh set writes to stderr and can't be redirected directly,
66656# and sets the high bit in the cache file unless we assign to the vars.
66657(
66658  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66659    eval ac_val=\$$ac_var
66660    case $ac_val in #(
66661    *${as_nl}*)
66662      case $ac_var in #(
66663      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66664$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66665      esac
66666      case $ac_var in #(
66667      _ | IFS | as_nl) ;; #(
66668      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66669      *) { eval $ac_var=; unset $ac_var;} ;;
66670      esac ;;
66671    esac
66672  done
66673
66674  (set) 2>&1 |
66675    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66676    *${as_nl}ac_space=\ *)
66677      # `set' does not quote correctly, so add quotes: double-quote
66678      # substitution turns \\\\ into \\, and sed turns \\ into \.
66679      sed -n \
66680	"s/'/'\\\\''/g;
66681	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66682      ;; #(
66683    *)
66684      # `set' quotes correctly as required by POSIX, so do not add quotes.
66685      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66686      ;;
66687    esac |
66688    sort
66689) |
66690  sed '
66691     /^ac_cv_env_/b end
66692     t clear
66693     :clear
66694     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66695     t end
66696     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66697     :end' >>confcache
66698if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66699  if test -w "$cache_file"; then
66700    if test "x$cache_file" != "x/dev/null"; then
66701      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66702$as_echo "$as_me: updating cache $cache_file" >&6;}
66703      if test ! -f "$cache_file" || test -h "$cache_file"; then
66704	cat confcache >"$cache_file"
66705      else
66706        case $cache_file in #(
66707        */* | ?:*)
66708	  mv -f confcache "$cache_file"$$ &&
66709	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66710        *)
66711	  mv -f confcache "$cache_file" ;;
66712	esac
66713      fi
66714    fi
66715  else
66716    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66717$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66718  fi
66719fi
66720rm -f confcache
66721
66722test "x$prefix" = xNONE && prefix=$ac_default_prefix
66723# Let make expand exec_prefix.
66724test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66725
66726# Transform confdefs.h into DEFS.
66727# Protect against shell expansion while executing Makefile rules.
66728# Protect against Makefile macro expansion.
66729#
66730# If the first sed substitution is executed (which looks for macros that
66731# take arguments), then branch to the quote section.  Otherwise,
66732# look for a macro that doesn't take arguments.
66733ac_script='
66734:mline
66735/\\$/{
66736 N
66737 s,\\\n,,
66738 b mline
66739}
66740t clear
66741:clear
66742s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66743t quote
66744s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66745t quote
66746b any
66747:quote
66748s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66749s/\[/\\&/g
66750s/\]/\\&/g
66751s/\$/$$/g
66752H
66753:any
66754${
66755	g
66756	s/^\n//
66757	s/\n/ /g
66758	p
66759}
66760'
66761DEFS=`sed -n "$ac_script" confdefs.h`
66762
66763
66764ac_libobjs=
66765ac_ltlibobjs=
66766U=
66767for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66768  # 1. Remove the extension, and $U if already installed.
66769  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66770  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66771  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66772  #    will be set to the directory where LIBOBJS objects are built.
66773  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66774  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66775done
66776LIBOBJS=$ac_libobjs
66777
66778LTLIBOBJS=$ac_ltlibobjs
66779
66780
66781
66782: "${CONFIG_STATUS=./config.status}"
66783ac_write_fail=0
66784ac_clean_files_save=$ac_clean_files
66785ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66786{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66787$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66788as_write_fail=0
66789cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66790#! $SHELL
66791# Generated by $as_me.
66792# Run this file to recreate the current configuration.
66793# Compiler output produced by configure, useful for debugging
66794# configure, is in config.log if it exists.
66795
66796debug=false
66797ac_cs_recheck=false
66798ac_cs_silent=false
66799
66800SHELL=\${CONFIG_SHELL-$SHELL}
66801export SHELL
66802_ASEOF
66803cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66804## -------------------- ##
66805## M4sh Initialization. ##
66806## -------------------- ##
66807
66808# Be more Bourne compatible
66809DUALCASE=1; export DUALCASE # for MKS sh
66810if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66811  emulate sh
66812  NULLCMD=:
66813  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66814  # is contrary to our usage.  Disable this feature.
66815  alias -g '${1+"$@"}'='"$@"'
66816  setopt NO_GLOB_SUBST
66817else
66818  case `(set -o) 2>/dev/null` in #(
66819  *posix*) :
66820    set -o posix ;; #(
66821  *) :
66822     ;;
66823esac
66824fi
66825
66826
66827as_nl='
66828'
66829export as_nl
66830# Printing a long string crashes Solaris 7 /usr/bin/printf.
66831as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66832as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66833as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66834# Prefer a ksh shell builtin over an external printf program on Solaris,
66835# but without wasting forks for bash or zsh.
66836if test -z "$BASH_VERSION$ZSH_VERSION" \
66837    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66838  as_echo='print -r --'
66839  as_echo_n='print -rn --'
66840elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66841  as_echo='printf %s\n'
66842  as_echo_n='printf %s'
66843else
66844  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66845    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66846    as_echo_n='/usr/ucb/echo -n'
66847  else
66848    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66849    as_echo_n_body='eval
66850      arg=$1;
66851      case $arg in #(
66852      *"$as_nl"*)
66853	expr "X$arg" : "X\\(.*\\)$as_nl";
66854	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66855      esac;
66856      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66857    '
66858    export as_echo_n_body
66859    as_echo_n='sh -c $as_echo_n_body as_echo'
66860  fi
66861  export as_echo_body
66862  as_echo='sh -c $as_echo_body as_echo'
66863fi
66864
66865# The user is always right.
66866if test "${PATH_SEPARATOR+set}" != set; then
66867  PATH_SEPARATOR=:
66868  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66869    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66870      PATH_SEPARATOR=';'
66871  }
66872fi
66873
66874
66875# IFS
66876# We need space, tab and new line, in precisely that order.  Quoting is
66877# there to prevent editors from complaining about space-tab.
66878# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66879# splitting by setting IFS to empty value.)
66880IFS=" ""	$as_nl"
66881
66882# Find who we are.  Look in the path if we contain no directory separator.
66883as_myself=
66884case $0 in #((
66885  *[\\/]* ) as_myself=$0 ;;
66886  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66887for as_dir in $PATH
66888do
66889  IFS=$as_save_IFS
66890  test -z "$as_dir" && as_dir=.
66891    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66892  done
66893IFS=$as_save_IFS
66894
66895     ;;
66896esac
66897# We did not find ourselves, most probably we were run as `sh COMMAND'
66898# in which case we are not to be found in the path.
66899if test "x$as_myself" = x; then
66900  as_myself=$0
66901fi
66902if test ! -f "$as_myself"; then
66903  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66904  exit 1
66905fi
66906
66907# Unset variables that we do not need and which cause bugs (e.g. in
66908# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66909# suppresses any "Segmentation fault" message there.  '((' could
66910# trigger a bug in pdksh 5.2.14.
66911for as_var in BASH_ENV ENV MAIL MAILPATH
66912do eval test x\${$as_var+set} = xset \
66913  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66914done
66915PS1='$ '
66916PS2='> '
66917PS4='+ '
66918
66919# NLS nuisances.
66920LC_ALL=C
66921export LC_ALL
66922LANGUAGE=C
66923export LANGUAGE
66924
66925# CDPATH.
66926(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66927
66928
66929# as_fn_error STATUS ERROR [LINENO LOG_FD]
66930# ----------------------------------------
66931# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66932# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66933# script with STATUS, using 1 if that was 0.
66934as_fn_error ()
66935{
66936  as_status=$1; test $as_status -eq 0 && as_status=1
66937  if test "$4"; then
66938    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66939    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66940  fi
66941  $as_echo "$as_me: error: $2" >&2
66942  as_fn_exit $as_status
66943} # as_fn_error
66944
66945
66946# as_fn_set_status STATUS
66947# -----------------------
66948# Set $? to STATUS, without forking.
66949as_fn_set_status ()
66950{
66951  return $1
66952} # as_fn_set_status
66953
66954# as_fn_exit STATUS
66955# -----------------
66956# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66957as_fn_exit ()
66958{
66959  set +e
66960  as_fn_set_status $1
66961  exit $1
66962} # as_fn_exit
66963
66964# as_fn_unset VAR
66965# ---------------
66966# Portably unset VAR.
66967as_fn_unset ()
66968{
66969  { eval $1=; unset $1;}
66970}
66971as_unset=as_fn_unset
66972# as_fn_append VAR VALUE
66973# ----------------------
66974# Append the text in VALUE to the end of the definition contained in VAR. Take
66975# advantage of any shell optimizations that allow amortized linear growth over
66976# repeated appends, instead of the typical quadratic growth present in naive
66977# implementations.
66978if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66979  eval 'as_fn_append ()
66980  {
66981    eval $1+=\$2
66982  }'
66983else
66984  as_fn_append ()
66985  {
66986    eval $1=\$$1\$2
66987  }
66988fi # as_fn_append
66989
66990# as_fn_arith ARG...
66991# ------------------
66992# Perform arithmetic evaluation on the ARGs, and store the result in the
66993# global $as_val. Take advantage of shells that can avoid forks. The arguments
66994# must be portable across $(()) and expr.
66995if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66996  eval 'as_fn_arith ()
66997  {
66998    as_val=$(( $* ))
66999  }'
67000else
67001  as_fn_arith ()
67002  {
67003    as_val=`expr "$@" || test $? -eq 1`
67004  }
67005fi # as_fn_arith
67006
67007
67008if expr a : '\(a\)' >/dev/null 2>&1 &&
67009   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67010  as_expr=expr
67011else
67012  as_expr=false
67013fi
67014
67015if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67016  as_basename=basename
67017else
67018  as_basename=false
67019fi
67020
67021if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67022  as_dirname=dirname
67023else
67024  as_dirname=false
67025fi
67026
67027as_me=`$as_basename -- "$0" ||
67028$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67029	 X"$0" : 'X\(//\)$' \| \
67030	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67031$as_echo X/"$0" |
67032    sed '/^.*\/\([^/][^/]*\)\/*$/{
67033	    s//\1/
67034	    q
67035	  }
67036	  /^X\/\(\/\/\)$/{
67037	    s//\1/
67038	    q
67039	  }
67040	  /^X\/\(\/\).*/{
67041	    s//\1/
67042	    q
67043	  }
67044	  s/.*/./; q'`
67045
67046# Avoid depending upon Character Ranges.
67047as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67048as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67049as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67050as_cr_digits='0123456789'
67051as_cr_alnum=$as_cr_Letters$as_cr_digits
67052
67053ECHO_C= ECHO_N= ECHO_T=
67054case `echo -n x` in #(((((
67055-n*)
67056  case `echo 'xy\c'` in
67057  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67058  xy)  ECHO_C='\c';;
67059  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67060       ECHO_T='	';;
67061  esac;;
67062*)
67063  ECHO_N='-n';;
67064esac
67065
67066rm -f conf$$ conf$$.exe conf$$.file
67067if test -d conf$$.dir; then
67068  rm -f conf$$.dir/conf$$.file
67069else
67070  rm -f conf$$.dir
67071  mkdir conf$$.dir 2>/dev/null
67072fi
67073if (echo >conf$$.file) 2>/dev/null; then
67074  if ln -s conf$$.file conf$$ 2>/dev/null; then
67075    as_ln_s='ln -s'
67076    # ... but there are two gotchas:
67077    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67078    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67079    # In both cases, we have to default to `cp -pR'.
67080    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67081      as_ln_s='cp -pR'
67082  elif ln conf$$.file conf$$ 2>/dev/null; then
67083    as_ln_s=ln
67084  else
67085    as_ln_s='cp -pR'
67086  fi
67087else
67088  as_ln_s='cp -pR'
67089fi
67090rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67091rmdir conf$$.dir 2>/dev/null
67092
67093
67094# as_fn_mkdir_p
67095# -------------
67096# Create "$as_dir" as a directory, including parents if necessary.
67097as_fn_mkdir_p ()
67098{
67099
67100  case $as_dir in #(
67101  -*) as_dir=./$as_dir;;
67102  esac
67103  test -d "$as_dir" || eval $as_mkdir_p || {
67104    as_dirs=
67105    while :; do
67106      case $as_dir in #(
67107      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67108      *) as_qdir=$as_dir;;
67109      esac
67110      as_dirs="'$as_qdir' $as_dirs"
67111      as_dir=`$as_dirname -- "$as_dir" ||
67112$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67113	 X"$as_dir" : 'X\(//\)[^/]' \| \
67114	 X"$as_dir" : 'X\(//\)$' \| \
67115	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67116$as_echo X"$as_dir" |
67117    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67118	    s//\1/
67119	    q
67120	  }
67121	  /^X\(\/\/\)[^/].*/{
67122	    s//\1/
67123	    q
67124	  }
67125	  /^X\(\/\/\)$/{
67126	    s//\1/
67127	    q
67128	  }
67129	  /^X\(\/\).*/{
67130	    s//\1/
67131	    q
67132	  }
67133	  s/.*/./; q'`
67134      test -d "$as_dir" && break
67135    done
67136    test -z "$as_dirs" || eval "mkdir $as_dirs"
67137  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67138
67139
67140} # as_fn_mkdir_p
67141if mkdir -p . 2>/dev/null; then
67142  as_mkdir_p='mkdir -p "$as_dir"'
67143else
67144  test -d ./-p && rmdir ./-p
67145  as_mkdir_p=false
67146fi
67147
67148
67149# as_fn_executable_p FILE
67150# -----------------------
67151# Test if FILE is an executable regular file.
67152as_fn_executable_p ()
67153{
67154  test -f "$1" && test -x "$1"
67155} # as_fn_executable_p
67156as_test_x='test -x'
67157as_executable_p=as_fn_executable_p
67158
67159# Sed expression to map a string onto a valid CPP name.
67160as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67161
67162# Sed expression to map a string onto a valid variable name.
67163as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67164
67165
67166exec 6>&1
67167## ----------------------------------- ##
67168## Main body of $CONFIG_STATUS script. ##
67169## ----------------------------------- ##
67170_ASEOF
67171test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67172
67173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67174# Save the log message, to keep $0 and so on meaningful, and to
67175# report actual input values of CONFIG_FILES etc. instead of their
67176# values after options handling.
67177ac_log="
67178This file was extended by OpenJDK $as_me jdk9, which was
67179generated by GNU Autoconf 2.69.  Invocation command line was
67180
67181  CONFIG_FILES    = $CONFIG_FILES
67182  CONFIG_HEADERS  = $CONFIG_HEADERS
67183  CONFIG_LINKS    = $CONFIG_LINKS
67184  CONFIG_COMMANDS = $CONFIG_COMMANDS
67185  $ $0 $@
67186
67187on `(hostname || uname -n) 2>/dev/null | sed 1q`
67188"
67189
67190_ACEOF
67191
67192case $ac_config_files in *"
67193"*) set x $ac_config_files; shift; ac_config_files=$*;;
67194esac
67195
67196
67197
67198cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67199# Files that config.status was made for.
67200config_files="$ac_config_files"
67201
67202_ACEOF
67203
67204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67205ac_cs_usage="\
67206\`$as_me' instantiates files and other configuration actions
67207from templates according to the current configuration.  Unless the files
67208and actions are specified as TAGs, all are instantiated by default.
67209
67210Usage: $0 [OPTION]... [TAG]...
67211
67212  -h, --help       print this help, then exit
67213  -V, --version    print version number and configuration settings, then exit
67214      --config     print configuration, then exit
67215  -q, --quiet, --silent
67216                   do not print progress messages
67217  -d, --debug      don't remove temporary files
67218      --recheck    update $as_me by reconfiguring in the same conditions
67219      --file=FILE[:TEMPLATE]
67220                   instantiate the configuration file FILE
67221
67222Configuration files:
67223$config_files
67224
67225Report bugs to <build-dev@openjdk.java.net>.
67226OpenJDK home page: <http://openjdk.java.net>."
67227
67228_ACEOF
67229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67230ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67231ac_cs_version="\\
67232OpenJDK config.status jdk9
67233configured by $0, generated by GNU Autoconf 2.69,
67234  with options \\"\$ac_cs_config\\"
67235
67236Copyright (C) 2012 Free Software Foundation, Inc.
67237This config.status script is free software; the Free Software Foundation
67238gives unlimited permission to copy, distribute and modify it."
67239
67240ac_pwd='$ac_pwd'
67241srcdir='$srcdir'
67242AWK='$AWK'
67243test -n "\$AWK" || AWK=awk
67244_ACEOF
67245
67246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67247# The default lists apply if the user does not specify any file.
67248ac_need_defaults=:
67249while test $# != 0
67250do
67251  case $1 in
67252  --*=?*)
67253    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67254    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67255    ac_shift=:
67256    ;;
67257  --*=)
67258    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67259    ac_optarg=
67260    ac_shift=:
67261    ;;
67262  *)
67263    ac_option=$1
67264    ac_optarg=$2
67265    ac_shift=shift
67266    ;;
67267  esac
67268
67269  case $ac_option in
67270  # Handling of the options.
67271  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67272    ac_cs_recheck=: ;;
67273  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67274    $as_echo "$ac_cs_version"; exit ;;
67275  --config | --confi | --conf | --con | --co | --c )
67276    $as_echo "$ac_cs_config"; exit ;;
67277  --debug | --debu | --deb | --de | --d | -d )
67278    debug=: ;;
67279  --file | --fil | --fi | --f )
67280    $ac_shift
67281    case $ac_optarg in
67282    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67283    '') as_fn_error $? "missing file argument" ;;
67284    esac
67285    as_fn_append CONFIG_FILES " '$ac_optarg'"
67286    ac_need_defaults=false;;
67287  --he | --h |  --help | --hel | -h )
67288    $as_echo "$ac_cs_usage"; exit ;;
67289  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67290  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67291    ac_cs_silent=: ;;
67292
67293  # This is an error.
67294  -*) as_fn_error $? "unrecognized option: \`$1'
67295Try \`$0 --help' for more information." ;;
67296
67297  *) as_fn_append ac_config_targets " $1"
67298     ac_need_defaults=false ;;
67299
67300  esac
67301  shift
67302done
67303
67304ac_configure_extra_args=
67305
67306if $ac_cs_silent; then
67307  exec 6>/dev/null
67308  ac_configure_extra_args="$ac_configure_extra_args --silent"
67309fi
67310
67311_ACEOF
67312cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67313if \$ac_cs_recheck; then
67314  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67315  shift
67316  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67317  CONFIG_SHELL='$SHELL'
67318  export CONFIG_SHELL
67319  exec "\$@"
67320fi
67321
67322_ACEOF
67323cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67324exec 5>>config.log
67325{
67326  echo
67327  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67328## Running $as_me. ##
67329_ASBOX
67330  $as_echo "$ac_log"
67331} >&5
67332
67333_ACEOF
67334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67335_ACEOF
67336
67337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67338
67339# Handling of arguments.
67340for ac_config_target in $ac_config_targets
67341do
67342  case $ac_config_target in
67343    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67344    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67345    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67346    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67347    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67348
67349  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67350  esac
67351done
67352
67353
67354# If the user did not use the arguments to specify the items to instantiate,
67355# then the envvar interface is used.  Set only those that are not.
67356# We use the long form for the default assignment because of an extremely
67357# bizarre bug on SunOS 4.1.3.
67358if $ac_need_defaults; then
67359  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67360fi
67361
67362# Have a temporary directory for convenience.  Make it in the build tree
67363# simply because there is no reason against having it here, and in addition,
67364# creating and moving files from /tmp can sometimes cause problems.
67365# Hook for its removal unless debugging.
67366# Note that there is a small window in which the directory will not be cleaned:
67367# after its creation but before its name has been assigned to `$tmp'.
67368$debug ||
67369{
67370  tmp= ac_tmp=
67371  trap 'exit_status=$?
67372  : "${ac_tmp:=$tmp}"
67373  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67374' 0
67375  trap 'as_fn_exit 1' 1 2 13 15
67376}
67377# Create a (secure) tmp directory for tmp files.
67378
67379{
67380  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67381  test -d "$tmp"
67382}  ||
67383{
67384  tmp=./conf$$-$RANDOM
67385  (umask 077 && mkdir "$tmp")
67386} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67387ac_tmp=$tmp
67388
67389# Set up the scripts for CONFIG_FILES section.
67390# No need to generate them if there are no CONFIG_FILES.
67391# This happens for instance with `./config.status config.h'.
67392if test -n "$CONFIG_FILES"; then
67393
67394
67395ac_cr=`echo X | tr X '\015'`
67396# On cygwin, bash can eat \r inside `` if the user requested igncr.
67397# But we know of no other shell where ac_cr would be empty at this
67398# point, so we can use a bashism as a fallback.
67399if test "x$ac_cr" = x; then
67400  eval ac_cr=\$\'\\r\'
67401fi
67402ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67403if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67404  ac_cs_awk_cr='\\r'
67405else
67406  ac_cs_awk_cr=$ac_cr
67407fi
67408
67409echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67410_ACEOF
67411
67412
67413{
67414  echo "cat >conf$$subs.awk <<_ACEOF" &&
67415  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67416  echo "_ACEOF"
67417} >conf$$subs.sh ||
67418  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67419ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67420ac_delim='%!_!# '
67421for ac_last_try in false false false false false :; do
67422  . ./conf$$subs.sh ||
67423    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67424
67425  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67426  if test $ac_delim_n = $ac_delim_num; then
67427    break
67428  elif $ac_last_try; then
67429    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67430  else
67431    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67432  fi
67433done
67434rm -f conf$$subs.sh
67435
67436cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67437cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67438_ACEOF
67439sed -n '
67440h
67441s/^/S["/; s/!.*/"]=/
67442p
67443g
67444s/^[^!]*!//
67445:repl
67446t repl
67447s/'"$ac_delim"'$//
67448t delim
67449:nl
67450h
67451s/\(.\{148\}\)..*/\1/
67452t more1
67453s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67454p
67455n
67456b repl
67457:more1
67458s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67459p
67460g
67461s/.\{148\}//
67462t nl
67463:delim
67464h
67465s/\(.\{148\}\)..*/\1/
67466t more2
67467s/["\\]/\\&/g; s/^/"/; s/$/"/
67468p
67469b
67470:more2
67471s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67472p
67473g
67474s/.\{148\}//
67475t delim
67476' <conf$$subs.awk | sed '
67477/^[^""]/{
67478  N
67479  s/\n//
67480}
67481' >>$CONFIG_STATUS || ac_write_fail=1
67482rm -f conf$$subs.awk
67483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67484_ACAWK
67485cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67486  for (key in S) S_is_set[key] = 1
67487  FS = ""
67488
67489}
67490{
67491  line = $ 0
67492  nfields = split(line, field, "@")
67493  substed = 0
67494  len = length(field[1])
67495  for (i = 2; i < nfields; i++) {
67496    key = field[i]
67497    keylen = length(key)
67498    if (S_is_set[key]) {
67499      value = S[key]
67500      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67501      len += length(value) + length(field[++i])
67502      substed = 1
67503    } else
67504      len += 1 + keylen
67505  }
67506
67507  print line
67508}
67509
67510_ACAWK
67511_ACEOF
67512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67513if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67514  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67515else
67516  cat
67517fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67518  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67519_ACEOF
67520
67521# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67522# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67523# trailing colons and then remove the whole line if VPATH becomes empty
67524# (actually we leave an empty line to preserve line numbers).
67525if test "x$srcdir" = x.; then
67526  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67527h
67528s///
67529s/^/:/
67530s/[	 ]*$/:/
67531s/:\$(srcdir):/:/g
67532s/:\${srcdir}:/:/g
67533s/:@srcdir@:/:/g
67534s/^:*//
67535s/:*$//
67536x
67537s/\(=[	 ]*\).*/\1/
67538G
67539s/\n//
67540s/^[^=]*=[	 ]*$//
67541}'
67542fi
67543
67544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67545fi # test -n "$CONFIG_FILES"
67546
67547
67548eval set X "  :F $CONFIG_FILES      "
67549shift
67550for ac_tag
67551do
67552  case $ac_tag in
67553  :[FHLC]) ac_mode=$ac_tag; continue;;
67554  esac
67555  case $ac_mode$ac_tag in
67556  :[FHL]*:*);;
67557  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67558  :[FH]-) ac_tag=-:-;;
67559  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67560  esac
67561  ac_save_IFS=$IFS
67562  IFS=:
67563  set x $ac_tag
67564  IFS=$ac_save_IFS
67565  shift
67566  ac_file=$1
67567  shift
67568
67569  case $ac_mode in
67570  :L) ac_source=$1;;
67571  :[FH])
67572    ac_file_inputs=
67573    for ac_f
67574    do
67575      case $ac_f in
67576      -) ac_f="$ac_tmp/stdin";;
67577      *) # Look for the file first in the build tree, then in the source tree
67578	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67579	 # because $ac_f cannot contain `:'.
67580	 test -f "$ac_f" ||
67581	   case $ac_f in
67582	   [\\/$]*) false;;
67583	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67584	   esac ||
67585	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67586      esac
67587      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67588      as_fn_append ac_file_inputs " '$ac_f'"
67589    done
67590
67591    # Let's still pretend it is `configure' which instantiates (i.e., don't
67592    # use $as_me), people would be surprised to read:
67593    #    /* config.h.  Generated by config.status.  */
67594    configure_input='Generated from '`
67595	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67596	`' by configure.'
67597    if test x"$ac_file" != x-; then
67598      configure_input="$ac_file.  $configure_input"
67599      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67600$as_echo "$as_me: creating $ac_file" >&6;}
67601    fi
67602    # Neutralize special characters interpreted by sed in replacement strings.
67603    case $configure_input in #(
67604    *\&* | *\|* | *\\* )
67605       ac_sed_conf_input=`$as_echo "$configure_input" |
67606       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67607    *) ac_sed_conf_input=$configure_input;;
67608    esac
67609
67610    case $ac_tag in
67611    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67612      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67613    esac
67614    ;;
67615  esac
67616
67617  ac_dir=`$as_dirname -- "$ac_file" ||
67618$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67619	 X"$ac_file" : 'X\(//\)[^/]' \| \
67620	 X"$ac_file" : 'X\(//\)$' \| \
67621	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67622$as_echo X"$ac_file" |
67623    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67624	    s//\1/
67625	    q
67626	  }
67627	  /^X\(\/\/\)[^/].*/{
67628	    s//\1/
67629	    q
67630	  }
67631	  /^X\(\/\/\)$/{
67632	    s//\1/
67633	    q
67634	  }
67635	  /^X\(\/\).*/{
67636	    s//\1/
67637	    q
67638	  }
67639	  s/.*/./; q'`
67640  as_dir="$ac_dir"; as_fn_mkdir_p
67641  ac_builddir=.
67642
67643case "$ac_dir" in
67644.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67645*)
67646  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67647  # A ".." for each directory in $ac_dir_suffix.
67648  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67649  case $ac_top_builddir_sub in
67650  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67651  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67652  esac ;;
67653esac
67654ac_abs_top_builddir=$ac_pwd
67655ac_abs_builddir=$ac_pwd$ac_dir_suffix
67656# for backward compatibility:
67657ac_top_builddir=$ac_top_build_prefix
67658
67659case $srcdir in
67660  .)  # We are building in place.
67661    ac_srcdir=.
67662    ac_top_srcdir=$ac_top_builddir_sub
67663    ac_abs_top_srcdir=$ac_pwd ;;
67664  [\\/]* | ?:[\\/]* )  # Absolute name.
67665    ac_srcdir=$srcdir$ac_dir_suffix;
67666    ac_top_srcdir=$srcdir
67667    ac_abs_top_srcdir=$srcdir ;;
67668  *) # Relative name.
67669    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67670    ac_top_srcdir=$ac_top_build_prefix$srcdir
67671    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67672esac
67673ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67674
67675
67676  case $ac_mode in
67677  :F)
67678  #
67679  # CONFIG_FILE
67680  #
67681
67682_ACEOF
67683
67684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67685# If the template does not know about datarootdir, expand it.
67686# FIXME: This hack should be removed a few years after 2.60.
67687ac_datarootdir_hack=; ac_datarootdir_seen=
67688ac_sed_dataroot='
67689/datarootdir/ {
67690  p
67691  q
67692}
67693/@datadir@/p
67694/@docdir@/p
67695/@infodir@/p
67696/@localedir@/p
67697/@mandir@/p'
67698case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67699*datarootdir*) ac_datarootdir_seen=yes;;
67700*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67701  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67702$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67703_ACEOF
67704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67705  ac_datarootdir_hack='
67706  s&@datadir@&$datadir&g
67707  s&@docdir@&$docdir&g
67708  s&@infodir@&$infodir&g
67709  s&@localedir@&$localedir&g
67710  s&@mandir@&$mandir&g
67711  s&\\\${datarootdir}&$datarootdir&g' ;;
67712esac
67713_ACEOF
67714
67715# Neutralize VPATH when `$srcdir' = `.'.
67716# Shell code in configure.ac might set extrasub.
67717# FIXME: do we really want to maintain this feature?
67718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67719ac_sed_extra="$ac_vpsub
67720$extrasub
67721_ACEOF
67722cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67723:t
67724/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67725s|@configure_input@|$ac_sed_conf_input|;t t
67726s&@top_builddir@&$ac_top_builddir_sub&;t t
67727s&@top_build_prefix@&$ac_top_build_prefix&;t t
67728s&@srcdir@&$ac_srcdir&;t t
67729s&@abs_srcdir@&$ac_abs_srcdir&;t t
67730s&@top_srcdir@&$ac_top_srcdir&;t t
67731s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67732s&@builddir@&$ac_builddir&;t t
67733s&@abs_builddir@&$ac_abs_builddir&;t t
67734s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67735$ac_datarootdir_hack
67736"
67737eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67738  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67739
67740test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67741  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67742  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67743      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67744  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67745which seems to be undefined.  Please make sure it is defined" >&5
67746$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67747which seems to be undefined.  Please make sure it is defined" >&2;}
67748
67749  rm -f "$ac_tmp/stdin"
67750  case $ac_file in
67751  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67752  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67753  esac \
67754  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67755 ;;
67756
67757
67758
67759  esac
67760
67761done # for ac_tag
67762
67763
67764as_fn_exit 0
67765_ACEOF
67766ac_clean_files=$ac_clean_files_save
67767
67768test $ac_write_fail = 0 ||
67769  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67770
67771
67772# configure is writing to config.log, and then calls config.status.
67773# config.status does its own redirection, appending to config.log.
67774# Unfortunately, on DOS this fails, as config.log is still kept open
67775# by configure, so config.status won't be able to write to it; its
67776# output is simply discarded.  So we exec the FD to /dev/null,
67777# effectively closing config.log, so it can be properly (re)opened and
67778# appended to by config.status.  When coming back to configure, we
67779# need to make the FD available again.
67780if test "$no_create" != yes; then
67781  ac_cs_success=:
67782  ac_config_status_args=
67783  test "$silent" = yes &&
67784    ac_config_status_args="$ac_config_status_args --quiet"
67785  exec 5>/dev/null
67786  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67787  exec 5>>config.log
67788  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67789  # would make configure fail if this is the last instruction.
67790  $ac_cs_success || as_fn_exit 1
67791fi
67792if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67793  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67794$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67795fi
67796
67797
67798# After AC_OUTPUT, we need to do final work
67799
67800
67801  # Try to move config.log (generated by autoconf) to the configure-support directory.
67802  if test -e ./config.log; then
67803    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67804  fi
67805
67806  # Rotate our log file (configure.log)
67807  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67808    $RM -f "$OUTPUT_ROOT/configure.log.old"
67809  fi
67810  if test -e "$OUTPUT_ROOT/configure.log"; then
67811    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67812  fi
67813
67814  # Move configure.log from current directory to the build output root
67815  if test -e ./configure.log; then
67816    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67817  fi
67818
67819  # Make the compare script executable
67820  $CHMOD +x $OUTPUT_ROOT/compare.sh
67821
67822
67823# Finally output some useful information to the user
67824
67825  # Finally output some useful information to the user
67826
67827  printf "\n"
67828  printf "====================================================\n"
67829  if test "x$no_create" != "xyes"; then
67830    if test "x$IS_RECONFIGURE" != "xyes"; then
67831      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67832    else
67833      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67834    fi
67835  else
67836    if test "x$IS_RECONFIGURE" != "xyes"; then
67837      printf "A configuration has been successfully checked but not created\n"
67838    else
67839      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67840    fi
67841  fi
67842  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67843    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67844  else
67845    printf "using default settings.\n"
67846  fi
67847
67848  printf "\n"
67849  printf "Configuration summary:\n"
67850  printf "* Debug level:    $DEBUG_LEVEL\n"
67851  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67852  printf "* JDK variant:    $JDK_VARIANT\n"
67853  printf "* JVM variants:   $JVM_VARIANTS\n"
67854  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67855  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67856
67857  printf "\n"
67858  printf "Tools summary:\n"
67859  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67860    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67861  fi
67862  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67863  if test "x$TOOLCHAIN_VERSION" != "x"; then
67864    print_version=" $TOOLCHAIN_VERSION"
67865  fi
67866  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67867  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67868  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67869
67870  printf "\n"
67871  printf "Build performance summary:\n"
67872  printf "* Cores to use:   $JOBS\n"
67873  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67874  if test "x$CCACHE_STATUS" != "x"; then
67875    printf "* ccache status:  $CCACHE_STATUS\n"
67876  fi
67877  printf "\n"
67878
67879  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67880    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67881    printf "will result in longer build times.\n"
67882    printf "\n"
67883  fi
67884
67885  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67886    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67887    printf "These are not respected, and will be ignored. It is recommended\n"
67888    printf "that you clean your environment. The following variables are set:\n"
67889    printf "$FOUND_ALT_VARIABLES\n"
67890    printf "\n"
67891  fi
67892
67893  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67894    printf "WARNING: Your build output directory is not on a local disk.\n"
67895    printf "This will severely degrade build performance!\n"
67896    printf "It is recommended that you create an output directory on a local disk,\n"
67897    printf "and run the configure script again from that directory.\n"
67898    printf "\n"
67899  fi
67900
67901  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67902    printf "WARNING: The result of this configuration has overridden an older\n"
67903    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67904    printf "proper build. Failure to do so might result in strange build problems.\n"
67905    printf "\n"
67906  fi
67907
67908  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67909    printf "WARNING: The result of this configuration was not saved.\n"
67910    printf "You should run without '--no-create | -n' to create the configuration.\n"
67911    printf "\n"
67912  fi
67913
67914
67915
67916  # Locate config.log.
67917  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67918    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67919  elif test -e "./config.log"; then
67920    CONFIG_LOG_PATH="."
67921  fi
67922
67923  if test -e "$CONFIG_LOG_PATH/config.log"; then
67924    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67925    if test $? -eq 0; then
67926      printf "The following warnings were produced. Repeated here for convenience:\n"
67927      # We must quote sed expression (using []) to stop m4 from eating the [].
67928      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67929      printf "\n"
67930    fi
67931  fi
67932
67933