generated-configure.sh revision 2581:d0e9877fff61
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
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796BUILD_AS
797BUILD_LDCXX
798BUILD_LD
799BUILD_STRIP
800BUILD_OBJCOPY
801BUILD_AR
802BUILD_NM
803BUILD_CXX
804BUILD_CC
805BUILD_SYSROOT_LDFLAGS
806BUILD_SYSROOT_CFLAGS
807ac_ct_OBJDUMP
808OBJDUMP
809ac_ct_OBJCOPY
810OBJCOPY
811ac_ct_NM
812ac_ct_STRIP
813GNM
814NM
815STRIP
816MSBUILD
817DUMPBIN
818RC
819MT
820LIPO
821ac_ct_AR
822AR
823AS
824LDCXX
825LD
826CXXCPP
827CPP
828CXX_VERSION_NUMBER
829CC_VERSION_NUMBER
830ac_ct_CXX
831CXXFLAGS
832CXX
833TOOLCHAIN_PATH_CXX
834POTENTIAL_CXX
835OBJEXT
836EXEEXT
837ac_ct_CC
838CPPFLAGS
839LDFLAGS
840CFLAGS
841CC
842TOOLCHAIN_PATH_CC
843POTENTIAL_CC
844TOOLCHAIN_VERSION
845VS_LIB
846VS_INCLUDE
847VS_PATH
848CYGWIN_LINK
849SYSROOT_LDFLAGS
850SYSROOT_CFLAGS
851EXTRA_LDFLAGS
852EXTRA_CXXFLAGS
853EXTRA_CFLAGS
854EXE_SUFFIX
855OBJ_SUFFIX
856STATIC_LIBRARY
857SHARED_LIBRARY
858STATIC_LIBRARY_SUFFIX
859SHARED_LIBRARY_SUFFIX
860LIBRARY_PREFIX
861TOOLCHAIN_TYPE
862STATIC_BUILD
863IMPORT_MODULES_MAKE
864IMPORT_MODULES_SRC
865IMPORT_MODULES_MAN
866IMPORT_MODULES_LEGAL
867IMPORT_MODULES_CONF
868IMPORT_MODULES_LIBS
869IMPORT_MODULES_CMDS
870IMPORT_MODULES_CLASSES
871BUILD_OUTPUT
872JDK_TOPDIR
873NASHORN_TOPDIR
874HOTSPOT_TOPDIR
875JAXWS_TOPDIR
876JAXP_TOPDIR
877CORBA_TOPDIR
878LANGTOOLS_TOPDIR
879EXTERNAL_BUILDJDK
880BUILD_JDK
881CREATE_BUILDJDK
882JLINK
883JMOD
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_FULL_DOCS
922ENABLE_HEADLESS_ONLY
923DEFAULT_MAKE_TARGET
924OS_VERSION_MICRO
925OS_VERSION_MINOR
926OS_VERSION_MAJOR
927PKG_CONFIG
928BASH_ARGS
929SETFILE
930CODESIGN
931XATTR
932DSYMUTIL
933IS_GNU_TIME
934PATCH
935DTRACE
936TIME
937STAT
938HG
939DOT
940READELF
941OTOOL
942LDD
943ZIPEXE
944UNZIP
945TAR_SUPPORTS_TRANSFORM
946TAR_INCLUDE_PARAM
947TAR_CREATE_EXTRA_PARAM
948TAR_TYPE
949FIND_DELETE
950OUTPUT_SYNC
951OUTPUT_SYNC_SUPPORTED
952CHECK_TOOLSDIR_MAKE
953CHECK_TOOLSDIR_GMAKE
954CHECK_MAKE
955CHECK_GMAKE
956MAKE
957PKGHANDLER
958CONFIGURESUPPORT_OUTPUTDIR
959OUTPUT_ROOT
960CONF_NAME
961SPEC
962SDKROOT
963XCODEBUILD
964JVM_VARIANT_MAIN
965VALID_JVM_VARIANTS
966JVM_VARIANTS
967DEBUG_LEVEL
968HOTSPOT_DEBUG_LEVEL
969JDK_VARIANT
970USERNAME
971CANONICAL_TOPDIR
972ORIGINAL_TOPDIR
973TOPDIR
974PATH_SEP
975HOTSPOT_BUILD_CPU_DEFINE
976HOTSPOT_BUILD_CPU_ARCH
977HOTSPOT_BUILD_CPU
978HOTSPOT_BUILD_OS_TYPE
979HOTSPOT_BUILD_OS
980OPENJDK_BUILD_BUNDLE_PLATFORM
981OPENJDK_BUILD_OS_EXPORT_DIR
982OPENJDK_BUILD_CPU_OSARCH
983OPENJDK_BUILD_CPU_ISADIR
984OPENJDK_BUILD_CPU_LEGACY_LIB
985OPENJDK_BUILD_CPU_LEGACY
986HOTSPOT_TARGET_CPU_DEFINE
987HOTSPOT_TARGET_CPU_ARCH
988HOTSPOT_TARGET_CPU
989HOTSPOT_TARGET_OS_TYPE
990HOTSPOT_TARGET_OS
991DEFINE_CROSS_COMPILE_ARCH
992OPENJDK_TARGET_BUNDLE_PLATFORM
993OPENJDK_TARGET_OS_EXPORT_DIR
994OPENJDK_TARGET_CPU_OSARCH
995OPENJDK_TARGET_CPU_ISADIR
996OPENJDK_TARGET_CPU_LEGACY_LIB
997OPENJDK_TARGET_CPU_LEGACY
998OPENJDK_MODULE_TARGET_OS_ARCH
999OPENJDK_MODULE_TARGET_OS_NAME
1000COMPILE_TYPE
1001OPENJDK_TARGET_CPU_ENDIAN
1002OPENJDK_TARGET_CPU_BITS
1003OPENJDK_TARGET_CPU_ARCH
1004OPENJDK_TARGET_CPU
1005OPENJDK_TARGET_OS_ENV
1006OPENJDK_TARGET_OS_TYPE
1007OPENJDK_TARGET_OS
1008OPENJDK_BUILD_CPU_ENDIAN
1009OPENJDK_BUILD_CPU_BITS
1010OPENJDK_BUILD_CPU_ARCH
1011OPENJDK_BUILD_CPU
1012OPENJDK_BUILD_OS_ENV
1013OPENJDK_BUILD_OS_TYPE
1014OPENJDK_BUILD_OS
1015OPENJDK_BUILD_AUTOCONF_NAME
1016OPENJDK_TARGET_AUTOCONF_NAME
1017target_os
1018target_vendor
1019target_cpu
1020target
1021host_os
1022host_vendor
1023host_cpu
1024host
1025build_os
1026build_vendor
1027build_cpu
1028build
1029PANDOC
1030NICE
1031CPIO
1032DF
1033READLINK
1034CYGPATH
1035SED
1036FGREP
1037EGREP
1038GREP
1039AWK
1040XARGS
1041WHICH
1042WC
1043UNIQ
1044UNAME
1045TR
1046TOUCH
1047TEE
1048TAR
1049TAIL
1050SORT
1051SH
1052RMDIR
1053RM
1054PRINTF
1055NAWK
1056MV
1057MKTEMP
1058MKDIR
1059LS
1060LN
1061GZIP
1062GUNZIP
1063HEAD
1064FIND
1065FILE
1066EXPR
1067ECHO
1068DIRNAME
1069DIFF
1070DATE
1071CUT
1072CP
1073COMM
1074CMP
1075CHMOD
1076CAT
1077BASH
1078BASENAME
1079DATE_WHEN_CONFIGURED
1080ORIGINAL_PATH
1081CONFIGURE_COMMAND_LINE
1082target_alias
1083host_alias
1084build_alias
1085LIBS
1086ECHO_T
1087ECHO_N
1088ECHO_C
1089DEFS
1090mandir
1091localedir
1092libdir
1093psdir
1094pdfdir
1095dvidir
1096htmldir
1097infodir
1098docdir
1099oldincludedir
1100includedir
1101localstatedir
1102sharedstatedir
1103sysconfdir
1104datadir
1105datarootdir
1106libexecdir
1107sbindir
1108bindir
1109program_transform_name
1110prefix
1111exec_prefix
1112PACKAGE_URL
1113PACKAGE_BUGREPORT
1114PACKAGE_STRING
1115PACKAGE_VERSION
1116PACKAGE_TARNAME
1117PACKAGE_NAME
1118PATH_SEPARATOR
1119SHELL'
1120ac_subst_files=''
1121ac_user_opts='
1122enable_option_checking
1123with_target_bits
1124enable_openjdk_only
1125with_custom_make_dir
1126with_jdk_variant
1127enable_debug
1128with_debug_level
1129with_jvm_variants
1130with_cpu_port
1131with_devkit
1132with_sys_root
1133with_sysroot
1134with_tools_dir
1135with_toolchain_path
1136with_extra_path
1137with_sdk_name
1138with_conf_name
1139with_output_sync
1140with_default_make_target
1141enable_headless_only
1142enable_full_docs
1143with_cacerts_file
1144enable_unlimited_crypto
1145with_copyright_year
1146enable_keep_packaged_modules
1147with_milestone
1148with_update_version
1149with_user_release_suffix
1150with_build_number
1151with_version_string
1152with_version_pre
1153with_version_opt
1154with_version_build
1155with_version_major
1156with_version_minor
1157with_version_security
1158with_version_patch
1159with_boot_jdk
1160with_build_jdk
1161with_add_source_root
1162with_override_source_root
1163with_adds_and_overrides
1164with_override_langtools
1165with_override_corba
1166with_override_jaxp
1167with_override_jaxws
1168with_override_hotspot
1169with_override_nashorn
1170with_override_jdk
1171with_import_hotspot
1172with_import_modules
1173enable_static_build
1174with_toolchain_type
1175with_extra_cflags
1176with_extra_cxxflags
1177with_extra_ldflags
1178with_toolchain_version
1179with_build_devkit
1180with_jtreg
1181with_abi_profile
1182enable_warnings_as_errors
1183with_native_debug_symbols
1184enable_debug_symbols
1185enable_zip_debug_info
1186enable_native_coverage
1187enable_dtrace
1188enable_aot
1189enable_hotspot_gtest
1190with_stdc__lib
1191with_msvcr_dll
1192with_msvcp_dll
1193with_x
1194with_cups
1195with_cups_include
1196with_freetype
1197with_freetype_include
1198with_freetype_lib
1199with_freetype_src
1200enable_freetype_bundling
1201with_alsa
1202with_alsa_include
1203with_alsa_lib
1204with_libffi
1205with_libffi_include
1206with_libffi_lib
1207enable_libffi_bundling
1208with_libjpeg
1209with_giflib
1210with_libpng
1211with_zlib
1212with_lcms
1213with_dxsdk
1214with_dxsdk_lib
1215with_dxsdk_include
1216with_libelf
1217with_libelf_include
1218with_libelf_lib
1219with_jvm_features
1220with_jvm_interpreter
1221enable_jtreg_failure_handler
1222enable_generate_classlist
1223with_num_cores
1224with_memory_size
1225with_jobs
1226with_test_jobs
1227with_boot_jdk_jvmargs
1228with_sjavac_server_java
1229enable_sjavac
1230enable_javac_server
1231enable_icecc
1232enable_precompiled_headers
1233enable_ccache
1234with_ccache_dir
1235'
1236      ac_precious_vars='build_alias
1237host_alias
1238target_alias
1239BASENAME
1240BASH
1241CAT
1242CHMOD
1243CMP
1244COMM
1245CP
1246CUT
1247DATE
1248DIFF
1249DIRNAME
1250ECHO
1251EXPR
1252FILE
1253FIND
1254HEAD
1255GUNZIP
1256GZIP
1257LN
1258LS
1259MKDIR
1260MKTEMP
1261MV
1262NAWK
1263PRINTF
1264RM
1265RMDIR
1266SH
1267SORT
1268TAIL
1269TAR
1270TEE
1271TOUCH
1272TR
1273UNAME
1274UNIQ
1275WC
1276WHICH
1277XARGS
1278AWK
1279GREP
1280EGREP
1281FGREP
1282SED
1283CYGPATH
1284READLINK
1285DF
1286CPIO
1287NICE
1288PANDOC
1289MAKE
1290UNZIP
1291ZIPEXE
1292LDD
1293OTOOL
1294READELF
1295DOT
1296HG
1297STAT
1298TIME
1299DTRACE
1300PATCH
1301DSYMUTIL
1302XATTR
1303CODESIGN
1304SETFILE
1305PKG_CONFIG
1306JAVA
1307JAVAC
1308JAVAH
1309JAR
1310JARSIGNER
1311CC
1312CFLAGS
1313LDFLAGS
1314LIBS
1315CPPFLAGS
1316CXX
1317CXXFLAGS
1318CCC
1319CPP
1320CXXCPP
1321AS
1322AR
1323LIPO
1324STRIP
1325NM
1326GNM
1327OBJCOPY
1328OBJDUMP
1329BUILD_CC
1330BUILD_CXX
1331BUILD_NM
1332BUILD_AR
1333BUILD_OBJCOPY
1334BUILD_STRIP
1335JTREGEXE
1336XMKMF
1337FREETYPE_CFLAGS
1338FREETYPE_LIBS
1339ALSA_CFLAGS
1340ALSA_LIBS
1341LIBFFI_CFLAGS
1342LIBFFI_LIBS
1343PNG_CFLAGS
1344PNG_LIBS
1345LCMS_CFLAGS
1346LCMS_LIBS
1347ELF_CFLAGS
1348ELF_LIBS
1349ICECC_CMD
1350ICECC_CREATE_ENV
1351ICECC_WRAPPER
1352CCACHE'
1353
1354
1355# Initialize some variables set by options.
1356ac_init_help=
1357ac_init_version=false
1358ac_unrecognized_opts=
1359ac_unrecognized_sep=
1360# The variables have the same names as the options, with
1361# dashes changed to underlines.
1362cache_file=/dev/null
1363exec_prefix=NONE
1364no_create=
1365no_recursion=
1366prefix=NONE
1367program_prefix=NONE
1368program_suffix=NONE
1369program_transform_name=s,x,x,
1370silent=
1371site=
1372srcdir=
1373verbose=
1374x_includes=NONE
1375x_libraries=NONE
1376
1377# Installation directory options.
1378# These are left unexpanded so users can "make install exec_prefix=/foo"
1379# and all the variables that are supposed to be based on exec_prefix
1380# by default will actually change.
1381# Use braces instead of parens because sh, perl, etc. also accept them.
1382# (The list follows the same order as the GNU Coding Standards.)
1383bindir='${exec_prefix}/bin'
1384sbindir='${exec_prefix}/sbin'
1385libexecdir='${exec_prefix}/libexec'
1386datarootdir='${prefix}/share'
1387datadir='${datarootdir}'
1388sysconfdir='${prefix}/etc'
1389sharedstatedir='${prefix}/com'
1390localstatedir='${prefix}/var'
1391includedir='${prefix}/include'
1392oldincludedir='/usr/include'
1393docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1394infodir='${datarootdir}/info'
1395htmldir='${docdir}'
1396dvidir='${docdir}'
1397pdfdir='${docdir}'
1398psdir='${docdir}'
1399libdir='${exec_prefix}/lib'
1400localedir='${datarootdir}/locale'
1401mandir='${datarootdir}/man'
1402
1403ac_prev=
1404ac_dashdash=
1405for ac_option
1406do
1407  # If the previous option needs an argument, assign it.
1408  if test -n "$ac_prev"; then
1409    eval $ac_prev=\$ac_option
1410    ac_prev=
1411    continue
1412  fi
1413
1414  case $ac_option in
1415  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1416  *=)   ac_optarg= ;;
1417  *)    ac_optarg=yes ;;
1418  esac
1419
1420  # Accept the important Cygnus configure options, so we can diagnose typos.
1421
1422  case $ac_dashdash$ac_option in
1423  --)
1424    ac_dashdash=yes ;;
1425
1426  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1427    ac_prev=bindir ;;
1428  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1429    bindir=$ac_optarg ;;
1430
1431  -build | --build | --buil | --bui | --bu)
1432    ac_prev=build_alias ;;
1433  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1434    build_alias=$ac_optarg ;;
1435
1436  -cache-file | --cache-file | --cache-fil | --cache-fi \
1437  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1438    ac_prev=cache_file ;;
1439  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1440  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1441    cache_file=$ac_optarg ;;
1442
1443  --config-cache | -C)
1444    cache_file=config.cache ;;
1445
1446  -datadir | --datadir | --datadi | --datad)
1447    ac_prev=datadir ;;
1448  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1449    datadir=$ac_optarg ;;
1450
1451  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1452  | --dataroo | --dataro | --datar)
1453    ac_prev=datarootdir ;;
1454  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1455  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1456    datarootdir=$ac_optarg ;;
1457
1458  -disable-* | --disable-*)
1459    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1460    # Reject names that are not valid shell variable names.
1461    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1462      as_fn_error $? "invalid feature name: $ac_useropt"
1463    ac_useropt_orig=$ac_useropt
1464    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1465    case $ac_user_opts in
1466      *"
1467"enable_$ac_useropt"
1468"*) ;;
1469      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1470	 ac_unrecognized_sep=', ';;
1471    esac
1472    eval enable_$ac_useropt=no ;;
1473
1474  -docdir | --docdir | --docdi | --doc | --do)
1475    ac_prev=docdir ;;
1476  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1477    docdir=$ac_optarg ;;
1478
1479  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1480    ac_prev=dvidir ;;
1481  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1482    dvidir=$ac_optarg ;;
1483
1484  -enable-* | --enable-*)
1485    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1486    # Reject names that are not valid shell variable names.
1487    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1488      as_fn_error $? "invalid feature name: $ac_useropt"
1489    ac_useropt_orig=$ac_useropt
1490    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1491    case $ac_user_opts in
1492      *"
1493"enable_$ac_useropt"
1494"*) ;;
1495      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1496	 ac_unrecognized_sep=', ';;
1497    esac
1498    eval enable_$ac_useropt=\$ac_optarg ;;
1499
1500  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1501  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1502  | --exec | --exe | --ex)
1503    ac_prev=exec_prefix ;;
1504  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1505  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1506  | --exec=* | --exe=* | --ex=*)
1507    exec_prefix=$ac_optarg ;;
1508
1509  -gas | --gas | --ga | --g)
1510    # Obsolete; use --with-gas.
1511    with_gas=yes ;;
1512
1513  -help | --help | --hel | --he | -h)
1514    ac_init_help=long ;;
1515  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1516    ac_init_help=recursive ;;
1517  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1518    ac_init_help=short ;;
1519
1520  -host | --host | --hos | --ho)
1521    ac_prev=host_alias ;;
1522  -host=* | --host=* | --hos=* | --ho=*)
1523    host_alias=$ac_optarg ;;
1524
1525  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1526    ac_prev=htmldir ;;
1527  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1528  | --ht=*)
1529    htmldir=$ac_optarg ;;
1530
1531  -includedir | --includedir | --includedi | --included | --include \
1532  | --includ | --inclu | --incl | --inc)
1533    ac_prev=includedir ;;
1534  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1535  | --includ=* | --inclu=* | --incl=* | --inc=*)
1536    includedir=$ac_optarg ;;
1537
1538  -infodir | --infodir | --infodi | --infod | --info | --inf)
1539    ac_prev=infodir ;;
1540  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1541    infodir=$ac_optarg ;;
1542
1543  -libdir | --libdir | --libdi | --libd)
1544    ac_prev=libdir ;;
1545  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1546    libdir=$ac_optarg ;;
1547
1548  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1549  | --libexe | --libex | --libe)
1550    ac_prev=libexecdir ;;
1551  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1552  | --libexe=* | --libex=* | --libe=*)
1553    libexecdir=$ac_optarg ;;
1554
1555  -localedir | --localedir | --localedi | --localed | --locale)
1556    ac_prev=localedir ;;
1557  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1558    localedir=$ac_optarg ;;
1559
1560  -localstatedir | --localstatedir | --localstatedi | --localstated \
1561  | --localstate | --localstat | --localsta | --localst | --locals)
1562    ac_prev=localstatedir ;;
1563  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1564  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1565    localstatedir=$ac_optarg ;;
1566
1567  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1568    ac_prev=mandir ;;
1569  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1570    mandir=$ac_optarg ;;
1571
1572  -nfp | --nfp | --nf)
1573    # Obsolete; use --without-fp.
1574    with_fp=no ;;
1575
1576  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1577  | --no-cr | --no-c | -n)
1578    no_create=yes ;;
1579
1580  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1581  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1582    no_recursion=yes ;;
1583
1584  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1585  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1586  | --oldin | --oldi | --old | --ol | --o)
1587    ac_prev=oldincludedir ;;
1588  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1589  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1590  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1591    oldincludedir=$ac_optarg ;;
1592
1593  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1594    ac_prev=prefix ;;
1595  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1596    prefix=$ac_optarg ;;
1597
1598  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1599  | --program-pre | --program-pr | --program-p)
1600    ac_prev=program_prefix ;;
1601  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1602  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1603    program_prefix=$ac_optarg ;;
1604
1605  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1606  | --program-suf | --program-su | --program-s)
1607    ac_prev=program_suffix ;;
1608  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1609  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1610    program_suffix=$ac_optarg ;;
1611
1612  -program-transform-name | --program-transform-name \
1613  | --program-transform-nam | --program-transform-na \
1614  | --program-transform-n | --program-transform- \
1615  | --program-transform | --program-transfor \
1616  | --program-transfo | --program-transf \
1617  | --program-trans | --program-tran \
1618  | --progr-tra | --program-tr | --program-t)
1619    ac_prev=program_transform_name ;;
1620  -program-transform-name=* | --program-transform-name=* \
1621  | --program-transform-nam=* | --program-transform-na=* \
1622  | --program-transform-n=* | --program-transform-=* \
1623  | --program-transform=* | --program-transfor=* \
1624  | --program-transfo=* | --program-transf=* \
1625  | --program-trans=* | --program-tran=* \
1626  | --progr-tra=* | --program-tr=* | --program-t=*)
1627    program_transform_name=$ac_optarg ;;
1628
1629  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1630    ac_prev=pdfdir ;;
1631  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1632    pdfdir=$ac_optarg ;;
1633
1634  -psdir | --psdir | --psdi | --psd | --ps)
1635    ac_prev=psdir ;;
1636  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1637    psdir=$ac_optarg ;;
1638
1639  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1640  | -silent | --silent | --silen | --sile | --sil)
1641    silent=yes ;;
1642
1643  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1644    ac_prev=sbindir ;;
1645  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1646  | --sbi=* | --sb=*)
1647    sbindir=$ac_optarg ;;
1648
1649  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1650  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1651  | --sharedst | --shareds | --shared | --share | --shar \
1652  | --sha | --sh)
1653    ac_prev=sharedstatedir ;;
1654  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1655  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1656  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1657  | --sha=* | --sh=*)
1658    sharedstatedir=$ac_optarg ;;
1659
1660  -site | --site | --sit)
1661    ac_prev=site ;;
1662  -site=* | --site=* | --sit=*)
1663    site=$ac_optarg ;;
1664
1665  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1666    ac_prev=srcdir ;;
1667  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1668    srcdir=$ac_optarg ;;
1669
1670  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1671  | --syscon | --sysco | --sysc | --sys | --sy)
1672    ac_prev=sysconfdir ;;
1673  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1674  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1675    sysconfdir=$ac_optarg ;;
1676
1677  -target | --target | --targe | --targ | --tar | --ta | --t)
1678    ac_prev=target_alias ;;
1679  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1680    target_alias=$ac_optarg ;;
1681
1682  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1683    verbose=yes ;;
1684
1685  -version | --version | --versio | --versi | --vers | -V)
1686    ac_init_version=: ;;
1687
1688  -with-* | --with-*)
1689    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1690    # Reject names that are not valid shell variable names.
1691    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1692      as_fn_error $? "invalid package name: $ac_useropt"
1693    ac_useropt_orig=$ac_useropt
1694    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1695    case $ac_user_opts in
1696      *"
1697"with_$ac_useropt"
1698"*) ;;
1699      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1700	 ac_unrecognized_sep=', ';;
1701    esac
1702    eval with_$ac_useropt=\$ac_optarg ;;
1703
1704  -without-* | --without-*)
1705    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1706    # Reject names that are not valid shell variable names.
1707    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1708      as_fn_error $? "invalid package name: $ac_useropt"
1709    ac_useropt_orig=$ac_useropt
1710    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1711    case $ac_user_opts in
1712      *"
1713"with_$ac_useropt"
1714"*) ;;
1715      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1716	 ac_unrecognized_sep=', ';;
1717    esac
1718    eval with_$ac_useropt=no ;;
1719
1720  --x)
1721    # Obsolete; use --with-x.
1722    with_x=yes ;;
1723
1724  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1725  | --x-incl | --x-inc | --x-in | --x-i)
1726    ac_prev=x_includes ;;
1727  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1728  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1729    x_includes=$ac_optarg ;;
1730
1731  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1732  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1733    ac_prev=x_libraries ;;
1734  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1735  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1736    x_libraries=$ac_optarg ;;
1737
1738  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1739Try \`$0 --help' for more information"
1740    ;;
1741
1742  *=*)
1743    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1744    # Reject names that are not valid shell variable names.
1745    case $ac_envvar in #(
1746      '' | [0-9]* | *[!_$as_cr_alnum]* )
1747      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1748    esac
1749    eval $ac_envvar=\$ac_optarg
1750    export $ac_envvar ;;
1751
1752  *)
1753    # FIXME: should be removed in autoconf 3.0.
1754    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1755    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1756      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1757    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1758    ;;
1759
1760  esac
1761done
1762
1763if test -n "$ac_prev"; then
1764  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1765  as_fn_error $? "missing argument to $ac_option"
1766fi
1767
1768if test -n "$ac_unrecognized_opts"; then
1769  case $enable_option_checking in
1770    no) ;;
1771    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1772    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1773  esac
1774fi
1775
1776# Check all directory arguments for consistency.
1777for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1778		datadir sysconfdir sharedstatedir localstatedir includedir \
1779		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1780		libdir localedir mandir
1781do
1782  eval ac_val=\$$ac_var
1783  # Remove trailing slashes.
1784  case $ac_val in
1785    */ )
1786      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1787      eval $ac_var=\$ac_val;;
1788  esac
1789  # Be sure to have absolute directory names.
1790  case $ac_val in
1791    [\\/$]* | ?:[\\/]* )  continue;;
1792    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1793  esac
1794  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1795done
1796
1797# There might be people who depend on the old broken behavior: `$host'
1798# used to hold the argument of --host etc.
1799# FIXME: To remove some day.
1800build=$build_alias
1801host=$host_alias
1802target=$target_alias
1803
1804# FIXME: To remove some day.
1805if test "x$host_alias" != x; then
1806  if test "x$build_alias" = x; then
1807    cross_compiling=maybe
1808  elif test "x$build_alias" != "x$host_alias"; then
1809    cross_compiling=yes
1810  fi
1811fi
1812
1813ac_tool_prefix=
1814test -n "$host_alias" && ac_tool_prefix=$host_alias-
1815
1816test "$silent" = yes && exec 6>/dev/null
1817
1818
1819ac_pwd=`pwd` && test -n "$ac_pwd" &&
1820ac_ls_di=`ls -di .` &&
1821ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1822  as_fn_error $? "working directory cannot be determined"
1823test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1824  as_fn_error $? "pwd does not report name of working directory"
1825
1826
1827# Find the source files, if location was not specified.
1828if test -z "$srcdir"; then
1829  ac_srcdir_defaulted=yes
1830  # Try the directory containing this script, then the parent directory.
1831  ac_confdir=`$as_dirname -- "$as_myself" ||
1832$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1833	 X"$as_myself" : 'X\(//\)[^/]' \| \
1834	 X"$as_myself" : 'X\(//\)$' \| \
1835	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1836$as_echo X"$as_myself" |
1837    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1838	    s//\1/
1839	    q
1840	  }
1841	  /^X\(\/\/\)[^/].*/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)$/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\).*/{
1850	    s//\1/
1851	    q
1852	  }
1853	  s/.*/./; q'`
1854  srcdir=$ac_confdir
1855  if test ! -r "$srcdir/$ac_unique_file"; then
1856    srcdir=..
1857  fi
1858else
1859  ac_srcdir_defaulted=no
1860fi
1861if test ! -r "$srcdir/$ac_unique_file"; then
1862  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1863  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1864fi
1865ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1866ac_abs_confdir=`(
1867	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1868	pwd)`
1869# When building in place, set srcdir=.
1870if test "$ac_abs_confdir" = "$ac_pwd"; then
1871  srcdir=.
1872fi
1873# Remove unnecessary trailing slashes from srcdir.
1874# Double slashes in file names in object file debugging info
1875# mess up M-x gdb in Emacs.
1876case $srcdir in
1877*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1878esac
1879for ac_var in $ac_precious_vars; do
1880  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1881  eval ac_env_${ac_var}_value=\$${ac_var}
1882  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1884done
1885
1886#
1887# Report the --help message.
1888#
1889if test "$ac_init_help" = "long"; then
1890  # Omit some internal or obsolete options to make the list less imposing.
1891  # This message is too long to be a string in the A/UX 3.1 sh.
1892  cat <<_ACEOF
1893\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1894
1895Usage: $0 [OPTION]... [VAR=VALUE]...
1896
1897To assign environment variables (e.g., CC, CFLAGS...), specify them as
1898VAR=VALUE.  See below for descriptions of some of the useful variables.
1899
1900Defaults for the options are specified in brackets.
1901
1902Configuration:
1903  -h, --help              display this help and exit
1904      --help=short        display options specific to this package
1905      --help=recursive    display the short help of all the included packages
1906  -V, --version           display version information and exit
1907  -q, --quiet, --silent   do not print \`checking ...' messages
1908      --cache-file=FILE   cache test results in FILE [disabled]
1909  -C, --config-cache      alias for \`--cache-file=config.cache'
1910  -n, --no-create         do not create output files
1911      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1912
1913Installation directories:
1914  --prefix=PREFIX         install architecture-independent files in PREFIX
1915                          [$ac_default_prefix]
1916  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1917                          [PREFIX]
1918
1919By default, \`make install' will install all the files in
1920\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1921an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1922for instance \`--prefix=\$HOME'.
1923
1924For better control, use the options below.
1925
1926Fine tuning of the installation directories:
1927  --bindir=DIR            user executables [EPREFIX/bin]
1928  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1929  --libexecdir=DIR        program executables [EPREFIX/libexec]
1930  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1931  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1932  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1933  --libdir=DIR            object code libraries [EPREFIX/lib]
1934  --includedir=DIR        C header files [PREFIX/include]
1935  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1936  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1937  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1938  --infodir=DIR           info documentation [DATAROOTDIR/info]
1939  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1940  --mandir=DIR            man documentation [DATAROOTDIR/man]
1941  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1942  --htmldir=DIR           html documentation [DOCDIR]
1943  --dvidir=DIR            dvi documentation [DOCDIR]
1944  --pdfdir=DIR            pdf documentation [DOCDIR]
1945  --psdir=DIR             ps documentation [DOCDIR]
1946_ACEOF
1947
1948  cat <<\_ACEOF
1949
1950X features:
1951  --x-includes=DIR    X include files are in DIR
1952  --x-libraries=DIR   X library files are in DIR
1953
1954System types:
1955  --build=BUILD     configure for building on BUILD [guessed]
1956  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1957  --target=TARGET   configure for building compilers for TARGET [HOST]
1958_ACEOF
1959fi
1960
1961if test -n "$ac_init_help"; then
1962  case $ac_init_help in
1963     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1964   esac
1965  cat <<\_ACEOF
1966
1967Optional Features:
1968  --disable-option-checking  ignore unrecognized --enable/--with options
1969  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1970  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1971  --enable-openjdk-only   suppress building custom source even if present
1972                          [disabled]
1973  --enable-debug          set the debug level to fastdebug (shorthand for
1974                          --with-debug-level=fastdebug) [disabled]
1975  --enable-headless-only  only build headless (no GUI) support [disabled]
1976  --enable-full-docs      build complete documentation [disabled]
1977  --disable-unlimited-crypto
1978                          Disable unlimited crypto policy [enabled]
1979  --disable-keep-packaged-modules
1980                          Do not keep packaged modules in jdk image [enable]
1981  --enable-static-build   enable static library build [disabled]
1982  --disable-warnings-as-errors
1983                          do not consider native warnings to be an error
1984                          [enabled]
1985  --enable-debug-symbols  Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --enable-zip-debug-info Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-native-coverage
1990                          enable native compilation with code coverage
1991                          data[disabled]
1992  --enable-dtrace[=yes/no/auto]
1993                          enable dtrace. Default is auto, where dtrace is
1994                          enabled if all dependencies are present.
1995  --enable-aot[=yes/no/auto]
1996                          enable ahead of time compilation feature. Default is
1997                          auto, where aot is enabled if all dependencies are
1998                          present.
1999  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2000  --disable-freetype-bundling
2001                          disable bundling of the freetype library with the
2002                          build result [enabled on Windows or when using
2003                          --with-freetype, disabled otherwise]
2004  --enable-libffi-bundling
2005                          enable bundling of libffi.so to make the built JDK
2006                          runnable on more systems
2007  --enable-jtreg-failure-handler
2008                          forces build of the jtreg failure handler to be
2009                          enabled, missing dependencies become fatal errors.
2010                          Default is auto, where the failure handler is built
2011                          if all dependencies are present and otherwise just
2012                          disabled.
2013  --disable-generate-classlist
2014                          forces enabling or disabling of the generation of a
2015                          CDS classlist at build time. Default is to generate
2016                          it when either the server or client JVMs are built.
2017  --enable-sjavac         use sjavac to do fast incremental compiles
2018                          [disabled]
2019  --disable-javac-server  disable javac server [enabled]
2020  --enable-icecc          enable distribted compilation of native code using
2021                          icecc/icecream [disabled]
2022  --disable-precompiled-headers
2023                          disable using precompiled headers when compiling C++
2024                          [enabled]
2025  --enable-ccache         enable using ccache to speed up recompilations
2026                          [disabled]
2027
2028Optional Packages:
2029  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2030  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2031  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2032                          support it), e.g. --with-target-bits=32 [guessed]
2033  --with-custom-make-dir  Deprecated. Option is kept for backwards
2034                          compatibility and is ignored
2035  --with-jdk-variant      JDK variant to build (normal) [normal]
2036  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2037                          optimized) [release]
2038  --with-jvm-variants     JVM variants (separated by commas) to build
2039                          (server,client,minimal,core,zero,zeroshark,custom)
2040                          [server]
2041  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2042                          (arm64,aarch64) [aarch64]
2043  --with-devkit           use this devkit for compilers, tools and resources
2044  --with-sys-root         alias for --with-sysroot for backwards compatability
2045  --with-sysroot          use this directory as sysroot
2046  --with-tools-dir        alias for --with-toolchain-path for backwards
2047                          compatibility
2048  --with-toolchain-path   prepend these directories when searching for
2049                          toolchain binaries (compilers etc)
2050  --with-extra-path       prepend these directories to the default path
2051  --with-sdk-name         use the platform SDK of the given name. [macosx]
2052  --with-conf-name        use this as the name of the configuration [generated
2053                          from important configuration options]
2054  --with-output-sync      set make output sync type if supported by make.
2055                          [recurse]
2056  --with-default-make-target
2057                          set the default make target [exploded-image]
2058  --with-cacerts-file     specify alternative cacerts file
2059  --with-copyright-year   Set copyright year value for build [current year]
2060  --with-milestone        Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-update-version   Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-user-release-suffix
2065                          Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-build-number     Deprecated. Option is kept for backwards
2068                          compatibility and is ignored
2069  --with-version-string   Set version string [calculated]
2070  --with-version-pre      Set the base part of the version 'PRE' field
2071                          (pre-release identifier) ['internal']
2072  --with-version-opt      Set version 'OPT' field (build metadata)
2073                          [<timestamp>.<user>.<dirname>]
2074  --with-version-build    Set version 'BUILD' field (build number) [not
2075                          specified]
2076  --with-version-major    Set version 'MAJOR' field (first number) [current
2077                          source value]
2078  --with-version-minor    Set version 'MINOR' field (second number) [current
2079                          source value]
2080  --with-version-security Set version 'SECURITY' field (third number) [current
2081                          source value]
2082  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2083                          specified]
2084  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2085  --with-build-jdk        path to JDK of same version as is being built[the
2086                          newly built JDK]
2087  --with-add-source-root  Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-source-root
2090                          Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-adds-and-overrides
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-langtools
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-corba   Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-jaxp    Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-override-jaxws   Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-hotspot Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-nashorn Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-jdk     Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-import_hotspot   Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-import-modules   import a set of prebuilt modules either as a zip
2113                          file or an exploded directory
2114  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2115                          to show possible values [platform dependent]
2116  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2117  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2118  --with-extra-ldflags    extra flags to be used when linking jdk
2119  --with-toolchain-version
2120                          the version of the toolchain to look for, use
2121                          '--help' to show possible values [platform
2122                          dependent]
2123  --with-build-devkit     Devkit to use for the build platform toolchain
2124  --with-jtreg            Regression Test Harness [probed]
2125  --with-abi-profile      specify ABI profile for ARM builds
2126                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2127                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2128                          [toolchain dependent]
2129  --with-native-debug-symbols
2130                          set the native debug symbol configuration (none,
2131                          internal, external, zipped) [varying]
2132  --with-stdc++lib=<static>,<dynamic>,<default>
2133                          force linking of the C++ runtime on Linux to either
2134                          static or dynamic, default is static with dynamic as
2135                          fallback
2136  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2137                          (Windows only) [probed]
2138  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2139                          (Windows only) [probed]
2140  --with-x                use the X Window System
2141  --with-cups             specify prefix directory for the cups package
2142                          (expecting the headers under PATH/include)
2143  --with-cups-include     specify directory for the cups include files
2144  --with-freetype         specify prefix directory for the freetype package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-freetype-include specify directory for the freetype include files
2148  --with-freetype-lib     specify directory for the freetype library
2149  --with-freetype-src     specify directory with freetype sources to
2150                          automatically build the library (experimental,
2151                          Windows-only)
2152  --with-alsa             specify prefix directory for the alsa package
2153                          (expecting the libraries under PATH/lib and the
2154                          headers under PATH/include)
2155  --with-alsa-include     specify directory for the alsa include files
2156  --with-alsa-lib         specify directory for the alsa library
2157  --with-libffi           specify prefix directory for the libffi package
2158                          (expecting the libraries under PATH/lib and the
2159                          headers under PATH/include)
2160  --with-libffi-include   specify directory for the libffi include files
2161  --with-libffi-lib       specify directory for the libffi library
2162  --with-libjpeg          use libjpeg from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-giflib           use giflib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-libpng           use libpng from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-zlib             use zlib from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-lcms             use lcms2 from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-dxsdk            Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-dxsdk-include    Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-libelf           specify prefix directory for the libelf package
2179                          (expecting the libraries under PATH/lib and the
2180                          headers under PATH/include)
2181  --with-libelf-include   specify directory for the libelf include files
2182  --with-libelf-lib       specify directory for the libelf library
2183  --with-jvm-features     additional JVM features to enable (separated by
2184                          comma), use '--help' to show possible values [none]
2185  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2186                          compatibility and is ignored
2187  --with-num-cores        number of cores in the build system, e.g.
2188                          --with-num-cores=8 [probed]
2189  --with-memory-size      memory (in MB) available in the build system, e.g.
2190                          --with-memory-size=1024 [probed]
2191  --with-jobs             number of parallel jobs to let make run [calculated
2192                          based on cores and memory]
2193  --with-test-jobs        number of parallel tests jobs to run [based on build
2194                          jobs]
2195  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2196                          invocations of boot JDK, overriding the default
2197                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2198                          -enableassertions"
2199  --with-sjavac-server-java
2200                          use this java binary for running the sjavac
2201                          background server [Boot JDK java]
2202  --with-ccache-dir       where to store ccache files [~/.ccache]
2203
2204Some influential environment variables:
2205  BASENAME    Override default value for BASENAME
2206  BASH        Override default value for BASH
2207  CAT         Override default value for CAT
2208  CHMOD       Override default value for CHMOD
2209  CMP         Override default value for CMP
2210  COMM        Override default value for COMM
2211  CP          Override default value for CP
2212  CUT         Override default value for CUT
2213  DATE        Override default value for DATE
2214  DIFF        Override default value for DIFF
2215  DIRNAME     Override default value for DIRNAME
2216  ECHO        Override default value for ECHO
2217  EXPR        Override default value for EXPR
2218  FILE        Override default value for FILE
2219  FIND        Override default value for FIND
2220  HEAD        Override default value for HEAD
2221  GUNZIP      Override default value for GUNZIP
2222  GZIP        Override default value for GZIP
2223  LN          Override default value for LN
2224  LS          Override default value for LS
2225  MKDIR       Override default value for MKDIR
2226  MKTEMP      Override default value for MKTEMP
2227  MV          Override default value for MV
2228  NAWK        Override default value for NAWK
2229  PRINTF      Override default value for PRINTF
2230  RM          Override default value for RM
2231  RMDIR       Override default value for RMDIR
2232  SH          Override default value for SH
2233  SORT        Override default value for SORT
2234  TAIL        Override default value for TAIL
2235  TAR         Override default value for TAR
2236  TEE         Override default value for TEE
2237  TOUCH       Override default value for TOUCH
2238  TR          Override default value for TR
2239  UNAME       Override default value for UNAME
2240  UNIQ        Override default value for UNIQ
2241  WC          Override default value for WC
2242  WHICH       Override default value for WHICH
2243  XARGS       Override default value for XARGS
2244  AWK         Override default value for AWK
2245  GREP        Override default value for GREP
2246  EGREP       Override default value for EGREP
2247  FGREP       Override default value for FGREP
2248  SED         Override default value for SED
2249  CYGPATH     Override default value for CYGPATH
2250  READLINK    Override default value for READLINK
2251  DF          Override default value for DF
2252  CPIO        Override default value for CPIO
2253  NICE        Override default value for NICE
2254  PANDOC      Override default value for PANDOC
2255  MAKE        Override default value for MAKE
2256  UNZIP       Override default value for UNZIP
2257  ZIPEXE      Override default value for ZIPEXE
2258  LDD         Override default value for LDD
2259  OTOOL       Override default value for OTOOL
2260  READELF     Override default value for READELF
2261  DOT         Override default value for DOT
2262  HG          Override default value for HG
2263  STAT        Override default value for STAT
2264  TIME        Override default value for TIME
2265  DTRACE      Override default value for DTRACE
2266  PATCH       Override default value for PATCH
2267  DSYMUTIL    Override default value for DSYMUTIL
2268  XATTR       Override default value for XATTR
2269  CODESIGN    Override default value for CODESIGN
2270  SETFILE     Override default value for SETFILE
2271  PKG_CONFIG  path to pkg-config utility
2272  JAVA        Override default value for JAVA
2273  JAVAC       Override default value for JAVAC
2274  JAVAH       Override default value for JAVAH
2275  JAR         Override default value for JAR
2276  JARSIGNER   Override default value for JARSIGNER
2277  CC          C compiler command
2278  CFLAGS      C compiler flags
2279  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2280              nonstandard directory <lib dir>
2281  LIBS        libraries to pass to the linker, e.g. -l<library>
2282  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2283              you have headers in a nonstandard directory <include dir>
2284  CXX         C++ compiler command
2285  CXXFLAGS    C++ compiler flags
2286  CPP         C preprocessor
2287  CXXCPP      C++ preprocessor
2288  AS          Override default value for AS
2289  AR          Override default value for AR
2290  LIPO        Override default value for LIPO
2291  STRIP       Override default value for STRIP
2292  NM          Override default value for NM
2293  GNM         Override default value for GNM
2294  OBJCOPY     Override default value for OBJCOPY
2295  OBJDUMP     Override default value for OBJDUMP
2296  BUILD_CC    Override default value for BUILD_CC
2297  BUILD_CXX   Override default value for BUILD_CXX
2298  BUILD_NM    Override default value for BUILD_NM
2299  BUILD_AR    Override default value for BUILD_AR
2300  BUILD_OBJCOPY
2301              Override default value for BUILD_OBJCOPY
2302  BUILD_STRIP Override default value for BUILD_STRIP
2303  JTREGEXE    Override default value for JTREGEXE
2304  XMKMF       Path to xmkmf, Makefile generator for X Window System
2305  FREETYPE_CFLAGS
2306              C compiler flags for FREETYPE, overriding pkg-config
2307  FREETYPE_LIBS
2308              linker flags for FREETYPE, overriding pkg-config
2309  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2310  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2311  LIBFFI_CFLAGS
2312              C compiler flags for LIBFFI, overriding pkg-config
2313  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2314  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2315  PNG_LIBS    linker flags for PNG, overriding pkg-config
2316  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2317  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2318  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2319  ELF_LIBS    linker flags for ELF, overriding pkg-config
2320  ICECC_CMD   Override default value for ICECC_CMD
2321  ICECC_CREATE_ENV
2322              Override default value for ICECC_CREATE_ENV
2323  ICECC_WRAPPER
2324              Override default value for ICECC_WRAPPER
2325  CCACHE      Override default value for CCACHE
2326
2327Use these variables to override the choices made by `configure' or to help
2328it to find libraries and programs with nonstandard names/locations.
2329
2330Report bugs to <build-dev@openjdk.java.net>.
2331OpenJDK home page: <http://openjdk.java.net>.
2332_ACEOF
2333ac_status=$?
2334fi
2335
2336if test "$ac_init_help" = "recursive"; then
2337  # If there are subdirs, report their specific --help.
2338  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2339    test -d "$ac_dir" ||
2340      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2341      continue
2342    ac_builddir=.
2343
2344case "$ac_dir" in
2345.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2346*)
2347  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2348  # A ".." for each directory in $ac_dir_suffix.
2349  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2350  case $ac_top_builddir_sub in
2351  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2352  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2353  esac ;;
2354esac
2355ac_abs_top_builddir=$ac_pwd
2356ac_abs_builddir=$ac_pwd$ac_dir_suffix
2357# for backward compatibility:
2358ac_top_builddir=$ac_top_build_prefix
2359
2360case $srcdir in
2361  .)  # We are building in place.
2362    ac_srcdir=.
2363    ac_top_srcdir=$ac_top_builddir_sub
2364    ac_abs_top_srcdir=$ac_pwd ;;
2365  [\\/]* | ?:[\\/]* )  # Absolute name.
2366    ac_srcdir=$srcdir$ac_dir_suffix;
2367    ac_top_srcdir=$srcdir
2368    ac_abs_top_srcdir=$srcdir ;;
2369  *) # Relative name.
2370    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2371    ac_top_srcdir=$ac_top_build_prefix$srcdir
2372    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2373esac
2374ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2375
2376    cd "$ac_dir" || { ac_status=$?; continue; }
2377    # Check for guested configure.
2378    if test -f "$ac_srcdir/configure.gnu"; then
2379      echo &&
2380      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2381    elif test -f "$ac_srcdir/configure"; then
2382      echo &&
2383      $SHELL "$ac_srcdir/configure" --help=recursive
2384    else
2385      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2386    fi || ac_status=$?
2387    cd "$ac_pwd" || { ac_status=$?; break; }
2388  done
2389fi
2390
2391test -n "$ac_init_help" && exit $ac_status
2392if $ac_init_version; then
2393  cat <<\_ACEOF
2394OpenJDK configure jdk9
2395generated by GNU Autoconf 2.69
2396
2397Copyright (C) 2012 Free Software Foundation, Inc.
2398This configure script is free software; the Free Software Foundation
2399gives unlimited permission to copy, distribute and modify it.
2400_ACEOF
2401  exit
2402fi
2403
2404## ------------------------ ##
2405## Autoconf initialization. ##
2406## ------------------------ ##
2407
2408# ac_fn_c_try_compile LINENO
2409# --------------------------
2410# Try to compile conftest.$ac_ext, and return whether this succeeded.
2411ac_fn_c_try_compile ()
2412{
2413  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2414  rm -f conftest.$ac_objext
2415  if { { ac_try="$ac_compile"
2416case "(($ac_try" in
2417  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2418  *) ac_try_echo=$ac_try;;
2419esac
2420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2421$as_echo "$ac_try_echo"; } >&5
2422  (eval "$ac_compile") 2>conftest.err
2423  ac_status=$?
2424  if test -s conftest.err; then
2425    grep -v '^ *+' conftest.err >conftest.er1
2426    cat conftest.er1 >&5
2427    mv -f conftest.er1 conftest.err
2428  fi
2429  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2430  test $ac_status = 0; } && {
2431	 test -z "$ac_c_werror_flag" ||
2432	 test ! -s conftest.err
2433       } && test -s conftest.$ac_objext; then :
2434  ac_retval=0
2435else
2436  $as_echo "$as_me: failed program was:" >&5
2437sed 's/^/| /' conftest.$ac_ext >&5
2438
2439	ac_retval=1
2440fi
2441  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2442  as_fn_set_status $ac_retval
2443
2444} # ac_fn_c_try_compile
2445
2446# ac_fn_cxx_try_compile LINENO
2447# ----------------------------
2448# Try to compile conftest.$ac_ext, and return whether this succeeded.
2449ac_fn_cxx_try_compile ()
2450{
2451  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2452  rm -f conftest.$ac_objext
2453  if { { ac_try="$ac_compile"
2454case "(($ac_try" in
2455  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2456  *) ac_try_echo=$ac_try;;
2457esac
2458eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2459$as_echo "$ac_try_echo"; } >&5
2460  (eval "$ac_compile") 2>conftest.err
2461  ac_status=$?
2462  if test -s conftest.err; then
2463    grep -v '^ *+' conftest.err >conftest.er1
2464    cat conftest.er1 >&5
2465    mv -f conftest.er1 conftest.err
2466  fi
2467  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2468  test $ac_status = 0; } && {
2469	 test -z "$ac_cxx_werror_flag" ||
2470	 test ! -s conftest.err
2471       } && test -s conftest.$ac_objext; then :
2472  ac_retval=0
2473else
2474  $as_echo "$as_me: failed program was:" >&5
2475sed 's/^/| /' conftest.$ac_ext >&5
2476
2477	ac_retval=1
2478fi
2479  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2480  as_fn_set_status $ac_retval
2481
2482} # ac_fn_cxx_try_compile
2483
2484# ac_fn_c_try_cpp LINENO
2485# ----------------------
2486# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2487ac_fn_c_try_cpp ()
2488{
2489  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2490  if { { ac_try="$ac_cpp conftest.$ac_ext"
2491case "(($ac_try" in
2492  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2493  *) ac_try_echo=$ac_try;;
2494esac
2495eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2496$as_echo "$ac_try_echo"; } >&5
2497  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2498  ac_status=$?
2499  if test -s conftest.err; then
2500    grep -v '^ *+' conftest.err >conftest.er1
2501    cat conftest.er1 >&5
2502    mv -f conftest.er1 conftest.err
2503  fi
2504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2505  test $ac_status = 0; } > conftest.i && {
2506	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2507	 test ! -s conftest.err
2508       }; then :
2509  ac_retval=0
2510else
2511  $as_echo "$as_me: failed program was:" >&5
2512sed 's/^/| /' conftest.$ac_ext >&5
2513
2514    ac_retval=1
2515fi
2516  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2517  as_fn_set_status $ac_retval
2518
2519} # ac_fn_c_try_cpp
2520
2521# ac_fn_cxx_try_cpp LINENO
2522# ------------------------
2523# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2524ac_fn_cxx_try_cpp ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  if { { ac_try="$ac_cpp conftest.$ac_ext"
2528case "(($ac_try" in
2529  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2530  *) ac_try_echo=$ac_try;;
2531esac
2532eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2533$as_echo "$ac_try_echo"; } >&5
2534  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2535  ac_status=$?
2536  if test -s conftest.err; then
2537    grep -v '^ *+' conftest.err >conftest.er1
2538    cat conftest.er1 >&5
2539    mv -f conftest.er1 conftest.err
2540  fi
2541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2542  test $ac_status = 0; } > conftest.i && {
2543	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2544	 test ! -s conftest.err
2545       }; then :
2546  ac_retval=0
2547else
2548  $as_echo "$as_me: failed program was:" >&5
2549sed 's/^/| /' conftest.$ac_ext >&5
2550
2551    ac_retval=1
2552fi
2553  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2554  as_fn_set_status $ac_retval
2555
2556} # ac_fn_cxx_try_cpp
2557
2558# ac_fn_c_try_link LINENO
2559# -----------------------
2560# Try to link conftest.$ac_ext, and return whether this succeeded.
2561ac_fn_c_try_link ()
2562{
2563  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2564  rm -f conftest.$ac_objext conftest$ac_exeext
2565  if { { ac_try="$ac_link"
2566case "(($ac_try" in
2567  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568  *) ac_try_echo=$ac_try;;
2569esac
2570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2571$as_echo "$ac_try_echo"; } >&5
2572  (eval "$ac_link") 2>conftest.err
2573  ac_status=$?
2574  if test -s conftest.err; then
2575    grep -v '^ *+' conftest.err >conftest.er1
2576    cat conftest.er1 >&5
2577    mv -f conftest.er1 conftest.err
2578  fi
2579  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2580  test $ac_status = 0; } && {
2581	 test -z "$ac_c_werror_flag" ||
2582	 test ! -s conftest.err
2583       } && test -s conftest$ac_exeext && {
2584	 test "$cross_compiling" = yes ||
2585	 test -x conftest$ac_exeext
2586       }; then :
2587  ac_retval=0
2588else
2589  $as_echo "$as_me: failed program was:" >&5
2590sed 's/^/| /' conftest.$ac_ext >&5
2591
2592	ac_retval=1
2593fi
2594  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2595  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2596  # interfere with the next link command; also delete a directory that is
2597  # left behind by Apple's compiler.  We do this before executing the actions.
2598  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2599  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2600  as_fn_set_status $ac_retval
2601
2602} # ac_fn_c_try_link
2603
2604# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2605# ---------------------------------------------------------
2606# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2607# the include files in INCLUDES and setting the cache variable VAR
2608# accordingly.
2609ac_fn_cxx_check_header_mongrel ()
2610{
2611  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2612  if eval \${$3+:} false; then :
2613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2614$as_echo_n "checking for $2... " >&6; }
2615if eval \${$3+:} false; then :
2616  $as_echo_n "(cached) " >&6
2617fi
2618eval ac_res=\$$3
2619	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2620$as_echo "$ac_res" >&6; }
2621else
2622  # Is the header compilable?
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2624$as_echo_n "checking $2 usability... " >&6; }
2625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626/* end confdefs.h.  */
2627$4
2628#include <$2>
2629_ACEOF
2630if ac_fn_cxx_try_compile "$LINENO"; then :
2631  ac_header_compiler=yes
2632else
2633  ac_header_compiler=no
2634fi
2635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2637$as_echo "$ac_header_compiler" >&6; }
2638
2639# Is the header present?
2640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2641$as_echo_n "checking $2 presence... " >&6; }
2642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644#include <$2>
2645_ACEOF
2646if ac_fn_cxx_try_cpp "$LINENO"; then :
2647  ac_header_preproc=yes
2648else
2649  ac_header_preproc=no
2650fi
2651rm -f conftest.err conftest.i conftest.$ac_ext
2652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2653$as_echo "$ac_header_preproc" >&6; }
2654
2655# So?  What about this header?
2656case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2657  yes:no: )
2658    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2659$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2661$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2662    ;;
2663  no:yes:* )
2664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2665$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2667$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2669$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2670    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2671$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2672    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2673$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2674( $as_echo "## ----------------------------------------- ##
2675## Report this to build-dev@openjdk.java.net ##
2676## ----------------------------------------- ##"
2677     ) | sed "s/^/$as_me: WARNING:     /" >&2
2678    ;;
2679esac
2680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2681$as_echo_n "checking for $2... " >&6; }
2682if eval \${$3+:} false; then :
2683  $as_echo_n "(cached) " >&6
2684else
2685  eval "$3=\$ac_header_compiler"
2686fi
2687eval ac_res=\$$3
2688	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2689$as_echo "$ac_res" >&6; }
2690fi
2691  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2692
2693} # ac_fn_cxx_check_header_mongrel
2694
2695# ac_fn_cxx_try_run LINENO
2696# ------------------------
2697# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2698# that executables *can* be run.
2699ac_fn_cxx_try_run ()
2700{
2701  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2702  if { { ac_try="$ac_link"
2703case "(($ac_try" in
2704  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2705  *) ac_try_echo=$ac_try;;
2706esac
2707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2708$as_echo "$ac_try_echo"; } >&5
2709  (eval "$ac_link") 2>&5
2710  ac_status=$?
2711  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2712  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2713  { { case "(($ac_try" in
2714  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2715  *) ac_try_echo=$ac_try;;
2716esac
2717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2718$as_echo "$ac_try_echo"; } >&5
2719  (eval "$ac_try") 2>&5
2720  ac_status=$?
2721  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2722  test $ac_status = 0; }; }; then :
2723  ac_retval=0
2724else
2725  $as_echo "$as_me: program exited with status $ac_status" >&5
2726       $as_echo "$as_me: failed program was:" >&5
2727sed 's/^/| /' conftest.$ac_ext >&5
2728
2729       ac_retval=$ac_status
2730fi
2731  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2732  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2733  as_fn_set_status $ac_retval
2734
2735} # ac_fn_cxx_try_run
2736
2737# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2738# ---------------------------------------------------------
2739# Tests whether HEADER exists and can be compiled using the include files in
2740# INCLUDES, setting the cache variable VAR accordingly.
2741ac_fn_cxx_check_header_compile ()
2742{
2743  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2745$as_echo_n "checking for $2... " >&6; }
2746if eval \${$3+:} false; then :
2747  $as_echo_n "(cached) " >&6
2748else
2749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2750/* end confdefs.h.  */
2751$4
2752#include <$2>
2753_ACEOF
2754if ac_fn_cxx_try_compile "$LINENO"; then :
2755  eval "$3=yes"
2756else
2757  eval "$3=no"
2758fi
2759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2760fi
2761eval ac_res=\$$3
2762	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2763$as_echo "$ac_res" >&6; }
2764  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2765
2766} # ac_fn_cxx_check_header_compile
2767
2768# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2769# ----------------------------------------------
2770# Tries to find the compile-time value of EXPR in a program that includes
2771# INCLUDES, setting VAR accordingly. Returns whether the value could be
2772# computed
2773ac_fn_cxx_compute_int ()
2774{
2775  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2776  if test "$cross_compiling" = yes; then
2777    # Depending upon the size, compute the lo and hi bounds.
2778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779/* end confdefs.h.  */
2780$4
2781int
2782main ()
2783{
2784static int test_array [1 - 2 * !(($2) >= 0)];
2785test_array [0] = 0;
2786return test_array [0];
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792if ac_fn_cxx_try_compile "$LINENO"; then :
2793  ac_lo=0 ac_mid=0
2794  while :; do
2795    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2796/* end confdefs.h.  */
2797$4
2798int
2799main ()
2800{
2801static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2802test_array [0] = 0;
2803return test_array [0];
2804
2805  ;
2806  return 0;
2807}
2808_ACEOF
2809if ac_fn_cxx_try_compile "$LINENO"; then :
2810  ac_hi=$ac_mid; break
2811else
2812  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2813			if test $ac_lo -le $ac_mid; then
2814			  ac_lo= ac_hi=
2815			  break
2816			fi
2817			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2818fi
2819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2820  done
2821else
2822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823/* end confdefs.h.  */
2824$4
2825int
2826main ()
2827{
2828static int test_array [1 - 2 * !(($2) < 0)];
2829test_array [0] = 0;
2830return test_array [0];
2831
2832  ;
2833  return 0;
2834}
2835_ACEOF
2836if ac_fn_cxx_try_compile "$LINENO"; then :
2837  ac_hi=-1 ac_mid=-1
2838  while :; do
2839    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840/* end confdefs.h.  */
2841$4
2842int
2843main ()
2844{
2845static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2846test_array [0] = 0;
2847return test_array [0];
2848
2849  ;
2850  return 0;
2851}
2852_ACEOF
2853if ac_fn_cxx_try_compile "$LINENO"; then :
2854  ac_lo=$ac_mid; break
2855else
2856  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2857			if test $ac_mid -le $ac_hi; then
2858			  ac_lo= ac_hi=
2859			  break
2860			fi
2861			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2862fi
2863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2864  done
2865else
2866  ac_lo= ac_hi=
2867fi
2868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2869fi
2870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871# Binary search between lo and hi bounds.
2872while test "x$ac_lo" != "x$ac_hi"; do
2873  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2875/* end confdefs.h.  */
2876$4
2877int
2878main ()
2879{
2880static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2881test_array [0] = 0;
2882return test_array [0];
2883
2884  ;
2885  return 0;
2886}
2887_ACEOF
2888if ac_fn_cxx_try_compile "$LINENO"; then :
2889  ac_hi=$ac_mid
2890else
2891  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2892fi
2893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2894done
2895case $ac_lo in #((
2896?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2897'') ac_retval=1 ;;
2898esac
2899  else
2900    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2901/* end confdefs.h.  */
2902$4
2903static long int longval () { return $2; }
2904static unsigned long int ulongval () { return $2; }
2905#include <stdio.h>
2906#include <stdlib.h>
2907int
2908main ()
2909{
2910
2911  FILE *f = fopen ("conftest.val", "w");
2912  if (! f)
2913    return 1;
2914  if (($2) < 0)
2915    {
2916      long int i = longval ();
2917      if (i != ($2))
2918	return 1;
2919      fprintf (f, "%ld", i);
2920    }
2921  else
2922    {
2923      unsigned long int i = ulongval ();
2924      if (i != ($2))
2925	return 1;
2926      fprintf (f, "%lu", i);
2927    }
2928  /* Do not output a trailing newline, as this causes \r\n confusion
2929     on some platforms.  */
2930  return ferror (f) || fclose (f) != 0;
2931
2932  ;
2933  return 0;
2934}
2935_ACEOF
2936if ac_fn_cxx_try_run "$LINENO"; then :
2937  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2938else
2939  ac_retval=1
2940fi
2941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2942  conftest.$ac_objext conftest.beam conftest.$ac_ext
2943rm -f conftest.val
2944
2945  fi
2946  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2947  as_fn_set_status $ac_retval
2948
2949} # ac_fn_cxx_compute_int
2950
2951# ac_fn_cxx_try_link LINENO
2952# -------------------------
2953# Try to link conftest.$ac_ext, and return whether this succeeded.
2954ac_fn_cxx_try_link ()
2955{
2956  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2957  rm -f conftest.$ac_objext conftest$ac_exeext
2958  if { { ac_try="$ac_link"
2959case "(($ac_try" in
2960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2961  *) ac_try_echo=$ac_try;;
2962esac
2963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2964$as_echo "$ac_try_echo"; } >&5
2965  (eval "$ac_link") 2>conftest.err
2966  ac_status=$?
2967  if test -s conftest.err; then
2968    grep -v '^ *+' conftest.err >conftest.er1
2969    cat conftest.er1 >&5
2970    mv -f conftest.er1 conftest.err
2971  fi
2972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2973  test $ac_status = 0; } && {
2974	 test -z "$ac_cxx_werror_flag" ||
2975	 test ! -s conftest.err
2976       } && test -s conftest$ac_exeext && {
2977	 test "$cross_compiling" = yes ||
2978	 test -x conftest$ac_exeext
2979       }; then :
2980  ac_retval=0
2981else
2982  $as_echo "$as_me: failed program was:" >&5
2983sed 's/^/| /' conftest.$ac_ext >&5
2984
2985	ac_retval=1
2986fi
2987  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2988  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2989  # interfere with the next link command; also delete a directory that is
2990  # left behind by Apple's compiler.  We do this before executing the actions.
2991  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2992  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2993  as_fn_set_status $ac_retval
2994
2995} # ac_fn_cxx_try_link
2996
2997# ac_fn_cxx_check_func LINENO FUNC VAR
2998# ------------------------------------
2999# Tests whether FUNC exists, setting the cache variable VAR accordingly
3000ac_fn_cxx_check_func ()
3001{
3002  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3003  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3004$as_echo_n "checking for $2... " >&6; }
3005if eval \${$3+:} false; then :
3006  $as_echo_n "(cached) " >&6
3007else
3008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3009/* end confdefs.h.  */
3010/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3011   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3012#define $2 innocuous_$2
3013
3014/* System header to define __stub macros and hopefully few prototypes,
3015    which can conflict with char $2 (); below.
3016    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3017    <limits.h> exists even on freestanding compilers.  */
3018
3019#ifdef __STDC__
3020# include <limits.h>
3021#else
3022# include <assert.h>
3023#endif
3024
3025#undef $2
3026
3027/* Override any GCC internal prototype to avoid an error.
3028   Use char because int might match the return type of a GCC
3029   builtin and then its argument prototype would still apply.  */
3030#ifdef __cplusplus
3031extern "C"
3032#endif
3033char $2 ();
3034/* The GNU C library defines this for functions which it implements
3035    to always fail with ENOSYS.  Some functions are actually named
3036    something starting with __ and the normal name is an alias.  */
3037#if defined __stub_$2 || defined __stub___$2
3038choke me
3039#endif
3040
3041int
3042main ()
3043{
3044return $2 ();
3045  ;
3046  return 0;
3047}
3048_ACEOF
3049if ac_fn_cxx_try_link "$LINENO"; then :
3050  eval "$3=yes"
3051else
3052  eval "$3=no"
3053fi
3054rm -f core conftest.err conftest.$ac_objext \
3055    conftest$ac_exeext conftest.$ac_ext
3056fi
3057eval ac_res=\$$3
3058	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3059$as_echo "$ac_res" >&6; }
3060  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3061
3062} # ac_fn_cxx_check_func
3063
3064# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3065# -------------------------------------------------------
3066# Tests whether HEADER exists and can be compiled using the include files in
3067# INCLUDES, setting the cache variable VAR accordingly.
3068ac_fn_c_check_header_compile ()
3069{
3070  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3072$as_echo_n "checking for $2... " >&6; }
3073if eval \${$3+:} false; then :
3074  $as_echo_n "(cached) " >&6
3075else
3076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3077/* end confdefs.h.  */
3078$4
3079#include <$2>
3080_ACEOF
3081if ac_fn_c_try_compile "$LINENO"; then :
3082  eval "$3=yes"
3083else
3084  eval "$3=no"
3085fi
3086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3087fi
3088eval ac_res=\$$3
3089	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3090$as_echo "$ac_res" >&6; }
3091  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3092
3093} # ac_fn_c_check_header_compile
3094cat >config.log <<_ACEOF
3095This file contains any messages produced by compilers while
3096running configure, to aid debugging if configure makes a mistake.
3097
3098It was created by OpenJDK $as_me jdk9, which was
3099generated by GNU Autoconf 2.69.  Invocation command line was
3100
3101  $ $0 $@
3102
3103_ACEOF
3104exec 5>>config.log
3105{
3106cat <<_ASUNAME
3107## --------- ##
3108## Platform. ##
3109## --------- ##
3110
3111hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3112uname -m = `(uname -m) 2>/dev/null || echo unknown`
3113uname -r = `(uname -r) 2>/dev/null || echo unknown`
3114uname -s = `(uname -s) 2>/dev/null || echo unknown`
3115uname -v = `(uname -v) 2>/dev/null || echo unknown`
3116
3117/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3118/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3119
3120/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3121/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3122/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3123/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3124/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3125/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3126/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3127
3128_ASUNAME
3129
3130as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3131for as_dir in $PATH
3132do
3133  IFS=$as_save_IFS
3134  test -z "$as_dir" && as_dir=.
3135    $as_echo "PATH: $as_dir"
3136  done
3137IFS=$as_save_IFS
3138
3139} >&5
3140
3141cat >&5 <<_ACEOF
3142
3143
3144## ----------- ##
3145## Core tests. ##
3146## ----------- ##
3147
3148_ACEOF
3149
3150
3151# Keep a trace of the command line.
3152# Strip out --no-create and --no-recursion so they do not pile up.
3153# Strip out --silent because we don't want to record it for future runs.
3154# Also quote any args containing shell meta-characters.
3155# Make two passes to allow for proper duplicate-argument suppression.
3156ac_configure_args=
3157ac_configure_args0=
3158ac_configure_args1=
3159ac_must_keep_next=false
3160for ac_pass in 1 2
3161do
3162  for ac_arg
3163  do
3164    case $ac_arg in
3165    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3166    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3167    | -silent | --silent | --silen | --sile | --sil)
3168      continue ;;
3169    *\'*)
3170      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3171    esac
3172    case $ac_pass in
3173    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3174    2)
3175      as_fn_append ac_configure_args1 " '$ac_arg'"
3176      if test $ac_must_keep_next = true; then
3177	ac_must_keep_next=false # Got value, back to normal.
3178      else
3179	case $ac_arg in
3180	  *=* | --config-cache | -C | -disable-* | --disable-* \
3181	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3182	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3183	  | -with-* | --with-* | -without-* | --without-* | --x)
3184	    case "$ac_configure_args0 " in
3185	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3186	    esac
3187	    ;;
3188	  -* ) ac_must_keep_next=true ;;
3189	esac
3190      fi
3191      as_fn_append ac_configure_args " '$ac_arg'"
3192      ;;
3193    esac
3194  done
3195done
3196{ ac_configure_args0=; unset ac_configure_args0;}
3197{ ac_configure_args1=; unset ac_configure_args1;}
3198
3199# When interrupted or exit'd, cleanup temporary files, and complete
3200# config.log.  We remove comments because anyway the quotes in there
3201# would cause problems or look ugly.
3202# WARNING: Use '\'' to represent an apostrophe within the trap.
3203# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3204trap 'exit_status=$?
3205  # Save into config.log some information that might help in debugging.
3206  {
3207    echo
3208
3209    $as_echo "## ---------------- ##
3210## Cache variables. ##
3211## ---------------- ##"
3212    echo
3213    # The following way of writing the cache mishandles newlines in values,
3214(
3215  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3216    eval ac_val=\$$ac_var
3217    case $ac_val in #(
3218    *${as_nl}*)
3219      case $ac_var in #(
3220      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3221$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3222      esac
3223      case $ac_var in #(
3224      _ | IFS | as_nl) ;; #(
3225      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3226      *) { eval $ac_var=; unset $ac_var;} ;;
3227      esac ;;
3228    esac
3229  done
3230  (set) 2>&1 |
3231    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3232    *${as_nl}ac_space=\ *)
3233      sed -n \
3234	"s/'\''/'\''\\\\'\'''\''/g;
3235	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3236      ;; #(
3237    *)
3238      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3239      ;;
3240    esac |
3241    sort
3242)
3243    echo
3244
3245    $as_echo "## ----------------- ##
3246## Output variables. ##
3247## ----------------- ##"
3248    echo
3249    for ac_var in $ac_subst_vars
3250    do
3251      eval ac_val=\$$ac_var
3252      case $ac_val in
3253      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3254      esac
3255      $as_echo "$ac_var='\''$ac_val'\''"
3256    done | sort
3257    echo
3258
3259    if test -n "$ac_subst_files"; then
3260      $as_echo "## ------------------- ##
3261## File substitutions. ##
3262## ------------------- ##"
3263      echo
3264      for ac_var in $ac_subst_files
3265      do
3266	eval ac_val=\$$ac_var
3267	case $ac_val in
3268	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3269	esac
3270	$as_echo "$ac_var='\''$ac_val'\''"
3271      done | sort
3272      echo
3273    fi
3274
3275    if test -s confdefs.h; then
3276      $as_echo "## ----------- ##
3277## confdefs.h. ##
3278## ----------- ##"
3279      echo
3280      cat confdefs.h
3281      echo
3282    fi
3283    test "$ac_signal" != 0 &&
3284      $as_echo "$as_me: caught signal $ac_signal"
3285    $as_echo "$as_me: exit $exit_status"
3286  } >&5
3287  rm -f core *.core core.conftest.* &&
3288    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3289    exit $exit_status
3290' 0
3291for ac_signal in 1 2 13 15; do
3292  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3293done
3294ac_signal=0
3295
3296# confdefs.h avoids OS command line length limits that DEFS can exceed.
3297rm -f -r conftest* confdefs.h
3298
3299$as_echo "/* confdefs.h */" > confdefs.h
3300
3301# Predefined preprocessor variables.
3302
3303cat >>confdefs.h <<_ACEOF
3304#define PACKAGE_NAME "$PACKAGE_NAME"
3305_ACEOF
3306
3307cat >>confdefs.h <<_ACEOF
3308#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3309_ACEOF
3310
3311cat >>confdefs.h <<_ACEOF
3312#define PACKAGE_VERSION "$PACKAGE_VERSION"
3313_ACEOF
3314
3315cat >>confdefs.h <<_ACEOF
3316#define PACKAGE_STRING "$PACKAGE_STRING"
3317_ACEOF
3318
3319cat >>confdefs.h <<_ACEOF
3320#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3321_ACEOF
3322
3323cat >>confdefs.h <<_ACEOF
3324#define PACKAGE_URL "$PACKAGE_URL"
3325_ACEOF
3326
3327
3328# Let the site file select an alternate cache file if it wants to.
3329# Prefer an explicitly selected file to automatically selected ones.
3330ac_site_file1=NONE
3331ac_site_file2=NONE
3332if test -n "$CONFIG_SITE"; then
3333  # We do not want a PATH search for config.site.
3334  case $CONFIG_SITE in #((
3335    -*)  ac_site_file1=./$CONFIG_SITE;;
3336    */*) ac_site_file1=$CONFIG_SITE;;
3337    *)   ac_site_file1=./$CONFIG_SITE;;
3338  esac
3339elif test "x$prefix" != xNONE; then
3340  ac_site_file1=$prefix/share/config.site
3341  ac_site_file2=$prefix/etc/config.site
3342else
3343  ac_site_file1=$ac_default_prefix/share/config.site
3344  ac_site_file2=$ac_default_prefix/etc/config.site
3345fi
3346for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3347do
3348  test "x$ac_site_file" = xNONE && continue
3349  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3350    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3351$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3352    sed 's/^/| /' "$ac_site_file" >&5
3353    . "$ac_site_file" \
3354      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3356as_fn_error $? "failed to load site script $ac_site_file
3357See \`config.log' for more details" "$LINENO" 5; }
3358  fi
3359done
3360
3361if test -r "$cache_file"; then
3362  # Some versions of bash will fail to source /dev/null (special files
3363  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3364  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3365    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3366$as_echo "$as_me: loading cache $cache_file" >&6;}
3367    case $cache_file in
3368      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3369      *)                      . "./$cache_file";;
3370    esac
3371  fi
3372else
3373  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3374$as_echo "$as_me: creating cache $cache_file" >&6;}
3375  >$cache_file
3376fi
3377
3378# Check that the precious variables saved in the cache have kept the same
3379# value.
3380ac_cache_corrupted=false
3381for ac_var in $ac_precious_vars; do
3382  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3383  eval ac_new_set=\$ac_env_${ac_var}_set
3384  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3385  eval ac_new_val=\$ac_env_${ac_var}_value
3386  case $ac_old_set,$ac_new_set in
3387    set,)
3388      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3389$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3390      ac_cache_corrupted=: ;;
3391    ,set)
3392      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3393$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3394      ac_cache_corrupted=: ;;
3395    ,);;
3396    *)
3397      if test "x$ac_old_val" != "x$ac_new_val"; then
3398	# differences in whitespace do not lead to failure.
3399	ac_old_val_w=`echo x $ac_old_val`
3400	ac_new_val_w=`echo x $ac_new_val`
3401	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3402	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3403$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3404	  ac_cache_corrupted=:
3405	else
3406	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3407$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3408	  eval $ac_var=\$ac_old_val
3409	fi
3410	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3411$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3412	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3413$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3414      fi;;
3415  esac
3416  # Pass precious variables to config.status.
3417  if test "$ac_new_set" = set; then
3418    case $ac_new_val in
3419    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3420    *) ac_arg=$ac_var=$ac_new_val ;;
3421    esac
3422    case " $ac_configure_args " in
3423      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3424      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3425    esac
3426  fi
3427done
3428if $ac_cache_corrupted; then
3429  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3431  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3432$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3433  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3434fi
3435## -------------------- ##
3436## Main body of script. ##
3437## -------------------- ##
3438
3439ac_ext=c
3440ac_cpp='$CPP $CPPFLAGS'
3441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443ac_compiler_gnu=$ac_cv_c_compiler_gnu
3444
3445
3446
3447ac_aux_dir=
3448for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3449  if test -f "$ac_dir/install-sh"; then
3450    ac_aux_dir=$ac_dir
3451    ac_install_sh="$ac_aux_dir/install-sh -c"
3452    break
3453  elif test -f "$ac_dir/install.sh"; then
3454    ac_aux_dir=$ac_dir
3455    ac_install_sh="$ac_aux_dir/install.sh -c"
3456    break
3457  elif test -f "$ac_dir/shtool"; then
3458    ac_aux_dir=$ac_dir
3459    ac_install_sh="$ac_aux_dir/shtool install -c"
3460    break
3461  fi
3462done
3463if test -z "$ac_aux_dir"; then
3464  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
3465fi
3466
3467# These three variables are undocumented and unsupported,
3468# and are intended to be withdrawn in a future Autoconf release.
3469# They can cause serious problems if a builder's source tree is in a directory
3470# whose full name contains unusual characters.
3471ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3472ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3473ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3474
3475
3476# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3477
3478#
3479# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3480# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3481#
3482# This code is free software; you can redistribute it and/or modify it
3483# under the terms of the GNU General Public License version 2 only, as
3484# published by the Free Software Foundation.  Oracle designates this
3485# particular file as subject to the "Classpath" exception as provided
3486# by Oracle in the LICENSE file that accompanied this code.
3487#
3488# This code is distributed in the hope that it will be useful, but WITHOUT
3489# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3490# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3491# version 2 for more details (a copy is included in the LICENSE file that
3492# accompanied this code).
3493#
3494# You should have received a copy of the GNU General Public License version
3495# 2 along with this work; if not, write to the Free Software Foundation,
3496# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3497#
3498# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3499# or visit www.oracle.com if you need additional information or have any
3500# questions.
3501#
3502
3503#
3504# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3505#
3506# This program is free software; you can redistribute it and/or modify
3507# it under the terms of the GNU General Public License as published by
3508# the Free Software Foundation; either version 2 of the License, or
3509# (at your option) any later version.
3510#
3511# This program is distributed in the hope that it will be useful, but
3512# WITHOUT ANY WARRANTY; without even the implied warranty of
3513# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3514# General Public License for more details.
3515#
3516# You should have received a copy of the GNU General Public License
3517# along with this program; if not, write to the Free Software
3518# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3519#
3520# As a special exception to the GNU General Public License, if you
3521# distribute this file as part of a program that contains a
3522# configuration script generated by Autoconf, you may include it under
3523# the same distribution terms that you use for the rest of that program.
3524
3525# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3526# ----------------------------------
3527# PKG_PROG_PKG_CONFIG
3528
3529# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3530#
3531# Check to see whether a particular set of modules exists.  Similar
3532# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3533#
3534#
3535# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3536# this or PKG_CHECK_MODULES is called, or make sure to call
3537# PKG_CHECK_EXISTS manually
3538# --------------------------------------------------------------
3539
3540
3541
3542# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3543# ---------------------------------------------
3544# _PKG_CONFIG
3545
3546# _PKG_SHORT_ERRORS_SUPPORTED
3547# -----------------------------
3548# _PKG_SHORT_ERRORS_SUPPORTED
3549
3550
3551# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3552# [ACTION-IF-NOT-FOUND])
3553#
3554#
3555# Note that if there is a possibility the first call to
3556# PKG_CHECK_MODULES might not happen, you should be sure to include an
3557# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3558#
3559#
3560# --------------------------------------------------------------
3561# PKG_CHECK_MODULES
3562
3563
3564# Include these first...
3565#
3566# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3567# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3568#
3569# This code is free software; you can redistribute it and/or modify it
3570# under the terms of the GNU General Public License version 2 only, as
3571# published by the Free Software Foundation.  Oracle designates this
3572# particular file as subject to the "Classpath" exception as provided
3573# by Oracle in the LICENSE file that accompanied this code.
3574#
3575# This code is distributed in the hope that it will be useful, but WITHOUT
3576# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3577# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3578# version 2 for more details (a copy is included in the LICENSE file that
3579# accompanied this code).
3580#
3581# You should have received a copy of the GNU General Public License version
3582# 2 along with this work; if not, write to the Free Software Foundation,
3583# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3584#
3585# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3586# or visit www.oracle.com if you need additional information or have any
3587# questions.
3588#
3589
3590# Create a function/macro that takes a series of named arguments. The call is
3591# similar to AC_DEFUN, but the setup of the function looks like this:
3592# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3593# ... do something
3594#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3595# ])
3596# A star (*) in front of a named argument means that it is required and it's
3597# presence will be verified. To pass e.g. the first value as a normal indexed
3598# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3599# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3600# "ARG_FOO".
3601#
3602# The generated function can be called like this:
3603# MYFUNC(FOO: [foo-val],
3604#     BAR: [
3605#         $ECHO hello world
3606#     ])
3607# Note that the argument value must start on the same line as the argument name.
3608#
3609# Argument 1: Name of the function to define
3610# Argument 2: List of legal named arguments, with a * prefix for required arguments
3611# Argument 3: Argument array to treat as named, typically $@
3612# Argument 4: The main function body
3613
3614
3615# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3616# If so, then append $1 to $2 \
3617# Also set JVM_ARG_OK to true/false depending on outcome.
3618
3619
3620# Appends a string to a path variable, only adding the : when needed.
3621
3622
3623# Prepends a string to a path variable, only adding the : when needed.
3624
3625
3626# This will make sure the given variable points to a full and proper
3627# path. This means:
3628# 1) There will be no spaces in the path. On unix platforms,
3629#    spaces in the path will result in an error. On Windows,
3630#    the path will be rewritten using short-style to be space-free.
3631# 2) The path will be absolute, and it will be in unix-style (on
3632#     cygwin).
3633# $1: The name of the variable to fix
3634
3635
3636# This will make sure the given variable points to a executable
3637# with a full and proper path. This means:
3638# 1) There will be no spaces in the path. On unix platforms,
3639#    spaces in the path will result in an error. On Windows,
3640#    the path will be rewritten using short-style to be space-free.
3641# 2) The path will be absolute, and it will be in unix-style (on
3642#     cygwin).
3643# Any arguments given to the executable is preserved.
3644# If the input variable does not have a directory specification, then
3645# it need to be in the PATH.
3646# $1: The name of the variable to fix
3647
3648
3649
3650
3651# Register a --with argument but mark it as deprecated
3652# $1: The name of the with argument to deprecate, not including --with-
3653
3654
3655# Register a --enable argument but mark it as deprecated
3656# $1: The name of the with argument to deprecate, not including --enable-
3657# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3658# $3: Messages to user.
3659
3660
3661
3662
3663# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3664# $1: variable to check
3665
3666
3667# Check that there are no unprocessed overridden variables left.
3668# If so, they are an incorrect argument and we will exit with an error.
3669
3670
3671# Setup a tool for the given variable. If correctly specified by the user,
3672# use that value, otherwise search for the tool using the supplied code snippet.
3673# $1: variable to set
3674# $2: code snippet to call to look for the tool
3675# $3: code snippet to call if variable was used to find tool
3676
3677
3678# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3679# $1: variable to set
3680# $2: executable name (or list of names) to look for
3681# $3: [path]
3682
3683
3684# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3685# $1: variable to set
3686# $2: executable name (or list of names) to look for
3687
3688
3689# Like BASIC_PATH_PROGS but fails if no tool was found.
3690# $1: variable to set
3691# $2: executable name (or list of names) to look for
3692# $3: [path]
3693
3694
3695# Like BASIC_SETUP_TOOL but fails if no tool was found.
3696# $1: variable to set
3697# $2: autoconf macro to call to look for the special tool
3698
3699
3700# Setup the most fundamental tools that relies on not much else to set up,
3701# but is used by much of the early bootstrap code.
3702
3703
3704# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3705
3706
3707# Evaluates platform specific overrides for devkit variables.
3708# $1: Name of variable
3709
3710
3711
3712
3713
3714
3715#%%% Simple tools %%%
3716
3717# Check if we have found a usable version of make
3718# $1: the path to a potential make binary (or empty)
3719# $2: the description on how we found this
3720
3721
3722
3723
3724# Goes looking for a usable version of GNU make.
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735# Check if build directory is on local disk. If not possible to determine,
3736# we prefer to claim it's local.
3737# Argument 1: directory to test
3738# Argument 2: what to do if it is on local disk
3739# Argument 3: what to do otherwise (remote disk or failure)
3740
3741
3742# Check that source files have basic read permissions set. This might
3743# not be the case in cygwin in certain conditions.
3744
3745
3746
3747
3748# Check for support for specific options in bash
3749
3750
3751################################################################################
3752#
3753# Default make target
3754#
3755
3756
3757# Code to run after AC_OUTPUT
3758
3759
3760#
3761# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3762# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3763#
3764# This code is free software; you can redistribute it and/or modify it
3765# under the terms of the GNU General Public License version 2 only, as
3766# published by the Free Software Foundation.  Oracle designates this
3767# particular file as subject to the "Classpath" exception as provided
3768# by Oracle in the LICENSE file that accompanied this code.
3769#
3770# This code is distributed in the hope that it will be useful, but WITHOUT
3771# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3772# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3773# version 2 for more details (a copy is included in the LICENSE file that
3774# accompanied this code).
3775#
3776# You should have received a copy of the GNU General Public License version
3777# 2 along with this work; if not, write to the Free Software Foundation,
3778# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3779#
3780# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3781# or visit www.oracle.com if you need additional information or have any
3782# questions.
3783#
3784
3785
3786
3787
3788
3789# Helper function which possibly converts a path using DOS-style short mode.
3790# If so, the updated path is stored in $new_path.
3791# $1: The path to check
3792
3793
3794# Helper function which possibly converts a path using DOS-style short mode.
3795# If so, the updated path is stored in $new_path.
3796# $1: The path to check
3797
3798
3799# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3800# and could probably be heavily simplified. However, all changes in this
3801# area tend to need lot of testing in different scenarios, and in lack of
3802# proper unit testing, cleaning this up has not been deemed worth the effort
3803# at the moment.
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3814
3815
3816
3817
3818# ... then the rest
3819#
3820# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3821# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3822#
3823# This code is free software; you can redistribute it and/or modify it
3824# under the terms of the GNU General Public License version 2 only, as
3825# published by the Free Software Foundation.  Oracle designates this
3826# particular file as subject to the "Classpath" exception as provided
3827# by Oracle in the LICENSE file that accompanied this code.
3828#
3829# This code is distributed in the hope that it will be useful, but WITHOUT
3830# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3831# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3832# version 2 for more details (a copy is included in the LICENSE file that
3833# accompanied this code).
3834#
3835# You should have received a copy of the GNU General Public License version
3836# 2 along with this work; if not, write to the Free Software Foundation,
3837# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3838#
3839# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3840# or visit www.oracle.com if you need additional information or have any
3841# questions.
3842#
3843
3844########################################################################
3845# This file handles detection of the Boot JDK. The Boot JDK detection
3846# process has been developed as a response to solve a complex real-world
3847# problem. Initially, it was simple, but it has grown as platform after
3848# platform, idiosyncracy after idiosyncracy has been supported.
3849#
3850# The basic idea is this:
3851# 1) You need an acceptable *) JDK to use as a Boot JDK
3852# 2) There are several ways to locate a JDK, that are mostly platform
3853#    dependent **)
3854# 3) You can have multiple JDKs installed
3855# 4) If possible, configure should try to dig out an acceptable JDK
3856#    automatically, without having to resort to command-line options
3857#
3858# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3859#     javac) and not a JRE, etc.
3860#
3861# **) On Windows we typically use a well-known path.
3862#     On MacOSX we typically use the tool java_home.
3863#     On Linux we typically find javac in the $PATH, and then follow a
3864#     chain of symlinks that often ends up in a real JDK.
3865#
3866# This leads to the code where we check in different ways to locate a
3867# JDK, and if one is found, check if it is acceptable. If not, we print
3868# our reasons for rejecting it (useful when debugging non-working
3869# configure situations) and continue checking the next one.
3870########################################################################
3871
3872# Execute the check given as argument, and verify the result
3873# If the Boot JDK was previously found, do nothing
3874# $1 A command line (typically autoconf macro) to execute
3875
3876
3877# Test: Is bootjdk explicitly set by command line arguments?
3878
3879
3880# Test: Is $JAVA_HOME set?
3881
3882
3883# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3884
3885
3886# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3887# $1: Argument to the java_home binary (optional)
3888
3889
3890# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3891
3892
3893# Look for a jdk in the given path. If there are multiple, try to select the newest.
3894# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3895# $1 = Path to directory containing jdk installations.
3896# $2 = String to append to the found JDK directory to get the proper JDK home
3897
3898
3899# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3900# environmental variable as base for where to look.
3901# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3902
3903
3904# Test: Is there a JDK installed in default, well-known locations?
3905
3906
3907# Check that a command-line tool in the Boot JDK is correct
3908# $1 = name of variable to assign
3909# $2 = name of binary
3910
3911
3912###############################################################################
3913#
3914# We need a Boot JDK to bootstrap the build.
3915#
3916
3917
3918
3919
3920
3921# BUILD_JDK: the location of the latest JDK that can run
3922#   on the host system and supports the target class file version
3923#   generated in this JDK build.  This variable should only be
3924#   used after the launchers are built.
3925#
3926
3927# Execute the check given as argument, and verify the result.
3928# If the JDK was previously found, do nothing.
3929# $1 A command line (typically autoconf macro) to execute
3930
3931
3932# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3933# is different than the host system doing the build (e.g. cross-compilation),
3934# a special BUILD_JDK is built as part of the build process.  An external
3935# prebuilt BUILD_JDK can also be supplied.
3936
3937
3938#
3939# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3940# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3941#
3942# This code is free software; you can redistribute it and/or modify it
3943# under the terms of the GNU General Public License version 2 only, as
3944# published by the Free Software Foundation.  Oracle designates this
3945# particular file as subject to the "Classpath" exception as provided
3946# by Oracle in the LICENSE file that accompanied this code.
3947#
3948# This code is distributed in the hope that it will be useful, but WITHOUT
3949# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3950# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3951# version 2 for more details (a copy is included in the LICENSE file that
3952# accompanied this code).
3953#
3954# You should have received a copy of the GNU General Public License version
3955# 2 along with this work; if not, write to the Free Software Foundation,
3956# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3957#
3958# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3959# or visit www.oracle.com if you need additional information or have any
3960# questions.
3961#
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979################################################################################
3980#
3981# Runs icecc-create-env once and prints the error if it fails
3982#
3983# $1: arguments to icecc-create-env
3984# $2: log file
3985#
3986
3987
3988################################################################################
3989#
3990# Optionally enable distributed compilation of native code using icecc/icecream
3991#
3992
3993
3994
3995
3996
3997
3998
3999#
4000# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4001# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4002#
4003# This code is free software; you can redistribute it and/or modify it
4004# under the terms of the GNU General Public License version 2 only, as
4005# published by the Free Software Foundation.  Oracle designates this
4006# particular file as subject to the "Classpath" exception as provided
4007# by Oracle in the LICENSE file that accompanied this code.
4008#
4009# This code is distributed in the hope that it will be useful, but WITHOUT
4010# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4011# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4012# version 2 for more details (a copy is included in the LICENSE file that
4013# accompanied this code).
4014#
4015# You should have received a copy of the GNU General Public License version
4016# 2 along with this work; if not, write to the Free Software Foundation,
4017# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4018#
4019# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4020# or visit www.oracle.com if you need additional information or have any
4021# questions.
4022#
4023
4024################################################################################
4025#
4026# Setup ABI profile (for arm)
4027#
4028
4029
4030# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4031# corresponding configure arguments instead
4032
4033
4034# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4035# that configure can use them while detecting compilers.
4036# TOOLCHAIN_TYPE is available here.
4037# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4038
4039
4040
4041
4042
4043
4044# Documentation on common flags used for solstudio in HIGHEST.
4045#
4046# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4047#          done with care, there are some assumptions below that need to
4048#          be understood about the use of pointers, and IEEE behavior.
4049#
4050# -fns: Use non-standard floating point mode (not IEEE 754)
4051# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4052# -fsingle: Use single precision floating point with 'float'
4053# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4054#   (Source with excessing pointer casting and data access with mixed
4055#    pointer types are not recommended)
4056# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4057#   (If you expect perfect errno behavior, do not use this)
4058# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4059# -xrestrict: Pointer parameters to functions do not overlap
4060#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4061#    If you pass in multiple pointers to the same data, do not use this)
4062# -xlibmil: Inline some library routines
4063#   (If you expect perfect errno behavior, do not use this)
4064# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4065#   (If you expect perfect errno behavior, do not use this)
4066#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4067
4068    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4069    # Bug?
4070    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4071    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4072    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4073    #fi
4074
4075
4076
4077
4078
4079
4080################################################################################
4081# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4082#      conditionals against.
4083# $2 - Optional prefix for each variable defined.
4084
4085
4086# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4087#                                  IF_FALSE: [RUN-IF-FALSE])
4088# ------------------------------------------------------------
4089# Check that the C compiler supports an argument
4090
4091
4092
4093
4094# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4095#                                    IF_FALSE: [RUN-IF-FALSE])
4096# ------------------------------------------------------------
4097# Check that the C++ compiler supports an argument
4098
4099
4100
4101
4102# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4103#                                IF_FALSE: [RUN-IF-FALSE])
4104# ------------------------------------------------------------
4105# Check that the C and C++ compilers support an argument
4106
4107
4108
4109
4110# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4111#                                   IF_FALSE: [RUN-IF-FALSE])
4112# ------------------------------------------------------------
4113# Check that the linker support an argument
4114
4115
4116
4117
4118
4119
4120# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4121# Arguments:
4122# $1 - Optional prefix for each variable defined.
4123
4124
4125#
4126# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4127# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4128#
4129# This code is free software; you can redistribute it and/or modify it
4130# under the terms of the GNU General Public License version 2 only, as
4131# published by the Free Software Foundation.  Oracle designates this
4132# particular file as subject to the "Classpath" exception as provided
4133# by Oracle in the LICENSE file that accompanied this code.
4134#
4135# This code is distributed in the hope that it will be useful, but WITHOUT
4136# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4137# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4138# version 2 for more details (a copy is included in the LICENSE file that
4139# accompanied this code).
4140#
4141# You should have received a copy of the GNU General Public License version
4142# 2 along with this work; if not, write to the Free Software Foundation,
4143# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4144#
4145# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4146# or visit www.oracle.com if you need additional information or have any
4147# questions.
4148#
4149
4150
4151
4152
4153
4154cygwin_help() {
4155  case $1 in
4156    unzip)
4157      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4158      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4159      ;;
4160    zip)
4161      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4162      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4163      ;;
4164    make)
4165      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4166      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4167      ;;
4168    freetype)
4169      HELP_MSG="
4170The freetype library can now be build during the configure process.
4171Download the freetype sources and unpack them into an arbitrary directory:
4172
4173wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4174tar -xzf freetype-2.5.3.tar.gz
4175
4176Then run configure with '--with-freetype-src=<freetype_src>'. This will
4177automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4178builds or into '<freetype_src>/lib32' for 32-bit builds.
4179Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4180and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4181
4182Alternatively you can unpack the sources like this to use the default directory:
4183
4184tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4185      ;;
4186  esac
4187}
4188
4189msys_help() {
4190  PKGHANDLER_COMMAND=""
4191}
4192
4193apt_help() {
4194  case $1 in
4195    reduced)
4196      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4197    devkit)
4198      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4199    openjdk)
4200      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4201    alsa)
4202      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4203    cups)
4204      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4205    freetype)
4206      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4207    ffi)
4208      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4209    x11)
4210      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4211    ccache)
4212      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4213    dtrace)
4214      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4215    elf)
4216      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4217  esac
4218}
4219
4220yum_help() {
4221  case $1 in
4222    devkit)
4223      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4224    openjdk)
4225      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4226    alsa)
4227      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4228    cups)
4229      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4230    freetype)
4231      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4232    x11)
4233      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4234    ccache)
4235      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4236    elf)
4237      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4238  esac
4239}
4240
4241brew_help() {
4242  case $1 in
4243    openjdk)
4244      PKGHANDLER_COMMAND="brew cask install java" ;;
4245    freetype)
4246      PKGHANDLER_COMMAND="brew install freetype" ;;
4247    ccache)
4248      PKGHANDLER_COMMAND="brew install ccache" ;;
4249  esac
4250}
4251
4252port_help() {
4253  PKGHANDLER_COMMAND=""
4254}
4255
4256pkgutil_help() {
4257  PKGHANDLER_COMMAND=""
4258}
4259
4260pkgadd_help() {
4261  PKGHANDLER_COMMAND=""
4262}
4263
4264# This function will check if we're called from the "configure" wrapper while
4265# printing --help. If so, we will print out additional information that can
4266# only be extracted within the autoconf script, and then exit. This must be
4267# called at the very beginning in configure.ac.
4268
4269
4270
4271
4272
4273
4274#
4275# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4276# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4277#
4278# This code is free software; you can redistribute it and/or modify it
4279# under the terms of the GNU General Public License version 2 only, as
4280# published by the Free Software Foundation.  Oracle designates this
4281# particular file as subject to the "Classpath" exception as provided
4282# by Oracle in the LICENSE file that accompanied this code.
4283#
4284# This code is distributed in the hope that it will be useful, but WITHOUT
4285# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4286# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4287# version 2 for more details (a copy is included in the LICENSE file that
4288# accompanied this code).
4289#
4290# You should have received a copy of the GNU General Public License version
4291# 2 along with this work; if not, write to the Free Software Foundation,
4292# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4293#
4294# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4295# or visit www.oracle.com if you need additional information or have any
4296# questions.
4297#
4298
4299# All valid JVM features, regardless of platform
4300VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4301    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4302    static-build link-time-opt aot"
4303
4304# All valid JVM variants
4305VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4306
4307###############################################################################
4308# Check if the specified JVM variant should be built. To be used in shell if
4309# constructs, like this:
4310# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4311#
4312# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4313
4314# Definition kept in one line to allow inlining in if statements.
4315# Additional [] needed to keep m4 from mangling shell constructs.
4316
4317
4318###############################################################################
4319# Check if the specified JVM features are explicitly enabled. To be used in
4320# shell if constructs, like this:
4321# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4322#
4323# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4324
4325# Definition kept in one line to allow inlining in if statements.
4326# Additional [] needed to keep m4 from mangling shell constructs.
4327
4328
4329###############################################################################
4330# Check which variants of the JVM that we want to build. Available variants are:
4331#   server: normal interpreter, and a tiered C1/C2 compiler
4332#   client: normal interpreter, and C1 (no C2 compiler)
4333#   minimal: reduced form of client with optional features stripped out
4334#   core: normal interpreter only, no compiler
4335#   zero: C++ based interpreter only, no compiler
4336#   zeroshark: C++ based interpreter, and a llvm-based compiler
4337#   custom: baseline JVM with no default features
4338#
4339
4340
4341###############################################################################
4342# Check if dtrace should be enabled and has all prerequisites present.
4343#
4344
4345
4346################################################################################
4347# Check if AOT should be enabled
4348#
4349
4350
4351###############################################################################
4352# Set up all JVM features for each JVM variant.
4353#
4354
4355
4356###############################################################################
4357# Validate JVM features once all setup is complete, including custom setup.
4358#
4359
4360
4361################################################################################
4362#
4363# Specify which sources will be used to build the 64-bit ARM port
4364#
4365# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4366# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4367#
4368
4369
4370
4371################################################################################
4372# Check if gtest should be built
4373#
4374
4375
4376#
4377# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4378# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4379#
4380# This code is free software; you can redistribute it and/or modify it
4381# under the terms of the GNU General Public License version 2 only, as
4382# published by the Free Software Foundation.  Oracle designates this
4383# particular file as subject to the "Classpath" exception as provided
4384# by Oracle in the LICENSE file that accompanied this code.
4385#
4386# This code is distributed in the hope that it will be useful, but WITHOUT
4387# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4388# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4389# version 2 for more details (a copy is included in the LICENSE file that
4390# accompanied this code).
4391#
4392# You should have received a copy of the GNU General Public License version
4393# 2 along with this work; if not, write to the Free Software Foundation,
4394# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4395#
4396# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4397# or visit www.oracle.com if you need additional information or have any
4398# questions.
4399#
4400
4401###############################################################################
4402# Check which variant of the JDK that we want to build.
4403# Currently we have:
4404#    normal:   standard edition
4405# but the custom make system may add other variants
4406#
4407# Effectively the JDK variant gives a name to a specific set of
4408# modules to compile into the JDK.
4409
4410
4411###############################################################################
4412# Set the debug level
4413#    release: no debug information, all optimizations, no asserts.
4414#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4415#    fastdebug: debug information (-g), all optimizations, all asserts
4416#    slowdebug: debug information (-g), no optimizations, all asserts
4417
4418
4419###############################################################################
4420#
4421# Should we build only OpenJDK even if closed sources are present?
4422#
4423
4424
4425
4426
4427###############################################################################
4428#
4429# Enable or disable the elliptic curve crypto implementation
4430#
4431
4432
4433
4434
4435################################################################################
4436#
4437# Gcov coverage data for hotspot
4438#
4439
4440
4441################################################################################
4442#
4443# Static build support.  When enabled will generate static
4444# libraries instead of shared libraries for all JDK libs.
4445#
4446
4447
4448################################################################################
4449#
4450# jlink options.
4451# We always keep packaged modules in JDK image.
4452#
4453
4454
4455################################################################################
4456#
4457# Check if building of the jtreg failure handler should be enabled.
4458#
4459
4460
4461################################################################################
4462#
4463# Enable or disable generation of the classlist at build time
4464#
4465
4466
4467#
4468# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4469# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4470#
4471# This code is free software; you can redistribute it and/or modify it
4472# under the terms of the GNU General Public License version 2 only, as
4473# published by the Free Software Foundation.  Oracle designates this
4474# particular file as subject to the "Classpath" exception as provided
4475# by Oracle in the LICENSE file that accompanied this code.
4476#
4477# This code is distributed in the hope that it will be useful, but WITHOUT
4478# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4479# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4480# version 2 for more details (a copy is included in the LICENSE file that
4481# accompanied this code).
4482#
4483# You should have received a copy of the GNU General Public License version
4484# 2 along with this work; if not, write to the Free Software Foundation,
4485# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4486#
4487# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4488# or visit www.oracle.com if you need additional information or have any
4489# questions.
4490#
4491
4492###############################################################################
4493#
4494# Setup version numbers
4495#
4496
4497# Verify that a given string represents a valid version number, and assign it
4498# to a variable.
4499
4500# Argument 1: the variable to assign to
4501# Argument 2: the value given by the user
4502
4503
4504
4505
4506#
4507# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4508# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4509#
4510# This code is free software; you can redistribute it and/or modify it
4511# under the terms of the GNU General Public License version 2 only, as
4512# published by the Free Software Foundation.  Oracle designates this
4513# particular file as subject to the "Classpath" exception as provided
4514# by Oracle in the LICENSE file that accompanied this code.
4515#
4516# This code is distributed in the hope that it will be useful, but WITHOUT
4517# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4518# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4519# version 2 for more details (a copy is included in the LICENSE file that
4520# accompanied this code).
4521#
4522# You should have received a copy of the GNU General Public License version
4523# 2 along with this work; if not, write to the Free Software Foundation,
4524# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4525#
4526# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4527# or visit www.oracle.com if you need additional information or have any
4528# questions.
4529#
4530
4531# Major library component reside in separate files.
4532#
4533# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4534# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4535#
4536# This code is free software; you can redistribute it and/or modify it
4537# under the terms of the GNU General Public License version 2 only, as
4538# published by the Free Software Foundation.  Oracle designates this
4539# particular file as subject to the "Classpath" exception as provided
4540# by Oracle in the LICENSE file that accompanied this code.
4541#
4542# This code is distributed in the hope that it will be useful, but WITHOUT
4543# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4544# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4545# version 2 for more details (a copy is included in the LICENSE file that
4546# accompanied this code).
4547#
4548# You should have received a copy of the GNU General Public License version
4549# 2 along with this work; if not, write to the Free Software Foundation,
4550# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4551#
4552# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4553# or visit www.oracle.com if you need additional information or have any
4554# questions.
4555#
4556
4557################################################################################
4558# Setup alsa (Advanced Linux Sound Architecture)
4559################################################################################
4560
4561
4562#
4563# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4565#
4566# This code is free software; you can redistribute it and/or modify it
4567# under the terms of the GNU General Public License version 2 only, as
4568# published by the Free Software Foundation.  Oracle designates this
4569# particular file as subject to the "Classpath" exception as provided
4570# by Oracle in the LICENSE file that accompanied this code.
4571#
4572# This code is distributed in the hope that it will be useful, but WITHOUT
4573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4575# version 2 for more details (a copy is included in the LICENSE file that
4576# accompanied this code).
4577#
4578# You should have received a copy of the GNU General Public License version
4579# 2 along with this work; if not, write to the Free Software Foundation,
4580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4581#
4582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4583# or visit www.oracle.com if you need additional information or have any
4584# questions.
4585#
4586
4587################################################################################
4588# Setup bundled libraries.
4589#
4590# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4591# OpenJDK repository. Default is to use these libraries as bundled, but they
4592# might be replaced by en external version by the user.
4593################################################################################
4594
4595
4596################################################################################
4597# Setup libjpeg
4598################################################################################
4599
4600
4601################################################################################
4602# Setup giflib
4603################################################################################
4604
4605
4606################################################################################
4607# Setup libpng
4608################################################################################
4609
4610
4611################################################################################
4612# Setup zlib
4613################################################################################
4614
4615
4616################################################################################
4617# Setup lcms (Little CMS)
4618################################################################################
4619
4620
4621#
4622# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624#
4625# This code is free software; you can redistribute it and/or modify it
4626# under the terms of the GNU General Public License version 2 only, as
4627# published by the Free Software Foundation.  Oracle designates this
4628# particular file as subject to the "Classpath" exception as provided
4629# by Oracle in the LICENSE file that accompanied this code.
4630#
4631# This code is distributed in the hope that it will be useful, but WITHOUT
4632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634# version 2 for more details (a copy is included in the LICENSE file that
4635# accompanied this code).
4636#
4637# You should have received a copy of the GNU General Public License version
4638# 2 along with this work; if not, write to the Free Software Foundation,
4639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640#
4641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642# or visit www.oracle.com if you need additional information or have any
4643# questions.
4644#
4645
4646################################################################################
4647# Setup cups (Common Unix Printing System)
4648################################################################################
4649
4650
4651#
4652# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4653# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4654#
4655# This code is free software; you can redistribute it and/or modify it
4656# under the terms of the GNU General Public License version 2 only, as
4657# published by the Free Software Foundation.  Oracle designates this
4658# particular file as subject to the "Classpath" exception as provided
4659# by Oracle in the LICENSE file that accompanied this code.
4660#
4661# This code is distributed in the hope that it will be useful, but WITHOUT
4662# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4663# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4664# version 2 for more details (a copy is included in the LICENSE file that
4665# accompanied this code).
4666#
4667# You should have received a copy of the GNU General Public License version
4668# 2 along with this work; if not, write to the Free Software Foundation,
4669# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4670#
4671# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4672# or visit www.oracle.com if you need additional information or have any
4673# questions.
4674#
4675
4676################################################################################
4677# Setup libffi (Foreign Function Interface)
4678################################################################################
4679
4680
4681#
4682# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4683# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4684#
4685# This code is free software; you can redistribute it and/or modify it
4686# under the terms of the GNU General Public License version 2 only, as
4687# published by the Free Software Foundation.  Oracle designates this
4688# particular file as subject to the "Classpath" exception as provided
4689# by Oracle in the LICENSE file that accompanied this code.
4690#
4691# This code is distributed in the hope that it will be useful, but WITHOUT
4692# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4693# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4694# version 2 for more details (a copy is included in the LICENSE file that
4695# accompanied this code).
4696#
4697# You should have received a copy of the GNU General Public License version
4698# 2 along with this work; if not, write to the Free Software Foundation,
4699# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4700#
4701# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4702# or visit www.oracle.com if you need additional information or have any
4703# questions.
4704#
4705
4706################################################################################
4707# Build the freetype lib from source
4708################################################################################
4709
4710
4711################################################################################
4712# Check if a potential freeype library match is correct and usable
4713################################################################################
4714
4715
4716################################################################################
4717# Setup freetype (The FreeType2 font rendering library)
4718################################################################################
4719
4720
4721#
4722# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4723# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4724#
4725# This code is free software; you can redistribute it and/or modify it
4726# under the terms of the GNU General Public License version 2 only, as
4727# published by the Free Software Foundation.  Oracle designates this
4728# particular file as subject to the "Classpath" exception as provided
4729# by Oracle in the LICENSE file that accompanied this code.
4730#
4731# This code is distributed in the hope that it will be useful, but WITHOUT
4732# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4733# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4734# version 2 for more details (a copy is included in the LICENSE file that
4735# accompanied this code).
4736#
4737# You should have received a copy of the GNU General Public License version
4738# 2 along with this work; if not, write to the Free Software Foundation,
4739# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4740#
4741# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4742# or visit www.oracle.com if you need additional information or have any
4743# questions.
4744#
4745
4746################################################################################
4747# Setup the standard C/C++ runtime libraries.
4748#
4749# Most importantly, determine if stdc++ should be linked statically or
4750# dynamically.
4751################################################################################
4752
4753
4754#
4755# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4756# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4757#
4758# This code is free software; you can redistribute it and/or modify it
4759# under the terms of the GNU General Public License version 2 only, as
4760# published by the Free Software Foundation.  Oracle designates this
4761# particular file as subject to the "Classpath" exception as provided
4762# by Oracle in the LICENSE file that accompanied this code.
4763#
4764# This code is distributed in the hope that it will be useful, but WITHOUT
4765# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4766# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4767# version 2 for more details (a copy is included in the LICENSE file that
4768# accompanied this code).
4769#
4770# You should have received a copy of the GNU General Public License version
4771# 2 along with this work; if not, write to the Free Software Foundation,
4772# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4773#
4774# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4775# or visit www.oracle.com if you need additional information or have any
4776# questions.
4777#
4778
4779################################################################################
4780# Setup X11 Windows system
4781################################################################################
4782
4783
4784#
4785# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4786# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4787#
4788# This code is free software; you can redistribute it and/or modify it
4789# under the terms of the GNU General Public License version 2 only, as
4790# published by the Free Software Foundation.  Oracle designates this
4791# particular file as subject to the "Classpath" exception as provided
4792# by Oracle in the LICENSE file that accompanied this code.
4793#
4794# This code is distributed in the hope that it will be useful, but WITHOUT
4795# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4796# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4797# version 2 for more details (a copy is included in the LICENSE file that
4798# accompanied this code).
4799#
4800# You should have received a copy of the GNU General Public License version
4801# 2 along with this work; if not, write to the Free Software Foundation,
4802# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4803#
4804# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4805# or visit www.oracle.com if you need additional information or have any
4806# questions.
4807#
4808
4809################################################################################
4810# Setup libelf (ELF library)
4811################################################################################
4812
4813
4814
4815################################################################################
4816# Determine which libraries are needed for this configuration
4817################################################################################
4818
4819
4820################################################################################
4821# Parse library options, and setup needed libraries
4822################################################################################
4823
4824
4825################################################################################
4826# Setup llvm (Low-Level VM)
4827################################################################################
4828
4829
4830################################################################################
4831# Setup various libraries, typically small system libraries
4832################################################################################
4833
4834
4835################################################################################
4836# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4837# redistribute it in the test image.
4838################################################################################
4839
4840
4841
4842#
4843# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4844# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4845#
4846# This code is free software; you can redistribute it and/or modify it
4847# under the terms of the GNU General Public License version 2 only, as
4848# published by the Free Software Foundation.  Oracle designates this
4849# particular file as subject to the "Classpath" exception as provided
4850# by Oracle in the LICENSE file that accompanied this code.
4851#
4852# This code is distributed in the hope that it will be useful, but WITHOUT
4853# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4854# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4855# version 2 for more details (a copy is included in the LICENSE file that
4856# accompanied this code).
4857#
4858# You should have received a copy of the GNU General Public License version
4859# 2 along with this work; if not, write to the Free Software Foundation,
4860# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4861#
4862# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4863# or visit www.oracle.com if you need additional information or have any
4864# questions.
4865#
4866
4867# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4868# Converts autoconf style CPU name to OpenJDK style, into
4869# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4870
4871
4872# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4873# Converts autoconf style OS name to OpenJDK style, into
4874# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4875
4876
4877# Expects $host_os $host_cpu $build_os and $build_cpu
4878# and $with_target_bits to have been setup!
4879#
4880# Translate the standard triplet(quadruplet) definition
4881# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4882# OPENJDK_BUILD_OS, etc.
4883
4884
4885# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4886# accordingly. Must be done after setting up build and target system, but before
4887# doing anything else with these values.
4888
4889
4890# Setup the legacy variables, for controlling the old makefiles.
4891#
4892
4893
4894# $1 - Either TARGET or BUILD to setup the variables for.
4895
4896
4897
4898
4899#%%% Build and target systems %%%
4900
4901
4902
4903
4904# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4905# Add -mX to various FLAGS variables.
4906
4907
4908
4909
4910
4911
4912#
4913# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4914# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4915#
4916# This code is free software; you can redistribute it and/or modify it
4917# under the terms of the GNU General Public License version 2 only, as
4918# published by the Free Software Foundation.  Oracle designates this
4919# particular file as subject to the "Classpath" exception as provided
4920# by Oracle in the LICENSE file that accompanied this code.
4921#
4922# This code is distributed in the hope that it will be useful, but WITHOUT
4923# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4924# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4925# version 2 for more details (a copy is included in the LICENSE file that
4926# accompanied this code).
4927#
4928# You should have received a copy of the GNU General Public License version
4929# 2 along with this work; if not, write to the Free Software Foundation,
4930# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4931#
4932# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4933# or visit www.oracle.com if you need additional information or have any
4934# questions.
4935#
4936
4937
4938
4939
4940
4941
4942
4943################################################################################
4944# Define a mechanism for importing extra prebuilt modules
4945#
4946
4947
4948
4949#
4950# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4951# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4952#
4953# This code is free software; you can redistribute it and/or modify it
4954# under the terms of the GNU General Public License version 2 only, as
4955# published by the Free Software Foundation.  Oracle designates this
4956# particular file as subject to the "Classpath" exception as provided
4957# by Oracle in the LICENSE file that accompanied this code.
4958#
4959# This code is distributed in the hope that it will be useful, but WITHOUT
4960# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4961# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4962# version 2 for more details (a copy is included in the LICENSE file that
4963# accompanied this code).
4964#
4965# You should have received a copy of the GNU General Public License version
4966# 2 along with this work; if not, write to the Free Software Foundation,
4967# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4968#
4969# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4970# or visit www.oracle.com if you need additional information or have any
4971# questions.
4972#
4973
4974########################################################################
4975# This file is responsible for detecting, verifying and setting up the
4976# toolchain, i.e. the compiler, linker and related utilities. It will setup
4977# proper paths to the binaries, but it will not setup any flags.
4978#
4979# The binaries used is determined by the toolchain type, which is the family of
4980# compilers and related tools that are used.
4981########################################################################
4982
4983
4984# All valid toolchains, regardless of platform (used by help.m4)
4985VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4986
4987# These toolchains are valid on different platforms
4988VALID_TOOLCHAINS_linux="gcc clang"
4989VALID_TOOLCHAINS_solaris="solstudio"
4990VALID_TOOLCHAINS_macosx="gcc clang"
4991VALID_TOOLCHAINS_aix="xlc"
4992VALID_TOOLCHAINS_windows="microsoft"
4993
4994# Toolchain descriptions
4995TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4996TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4997TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4998TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4999TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5000
5001# Minimum supported versions, empty means unspecified
5002TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5003TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5004TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5005TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5006TOOLCHAIN_MINIMUM_VERSION_xlc=""
5007
5008# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5009# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5010# $1 - optional variable prefix for compiler and version variables (BUILD_)
5011# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5012
5013
5014# Check if the configured compiler (C and C++) is of a specific version or
5015# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5016#
5017# Arguments:
5018#   VERSION:   The version string to check against the found version
5019#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5020#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5021#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5022
5023
5024
5025
5026# Setup a number of variables describing how native output files are
5027# named on this platform/toolchain.
5028
5029
5030# Determine which toolchain type to use, and make sure it is valid for this
5031# platform. Setup various information about the selected toolchain.
5032
5033
5034# Before we start detecting the toolchain executables, we might need some
5035# special setup, e.g. additional paths etc.
5036
5037
5038# Restore path, etc
5039
5040
5041# Check if a compiler is of the toolchain type we expect, and save the version
5042# information from it. If the compiler does not match the expected type,
5043# this function will abort using AC_MSG_ERROR. If it matches, the version will
5044# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5045# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5046#
5047# $1 = compiler to test (CC or CXX)
5048# $2 = human readable name of compiler (C or C++)
5049
5050
5051# Try to locate the given C or C++ compiler in the path, or otherwise.
5052#
5053# $1 = compiler to test (CC or CXX)
5054# $2 = human readable name of compiler (C or C++)
5055# $3 = compiler name to search for
5056
5057
5058# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5059# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5060# archiver (AR). Verify that the compilers are correct according to the
5061# toolchain type.
5062
5063
5064# Setup additional tools that is considered a part of the toolchain, but not the
5065# core part. Many of these are highly platform-specific and do not exist,
5066# and/or are not needed on all platforms.
5067
5068
5069# Setup the build tools (i.e, the compiler and linker used to build programs
5070# that should be run on the build platform, not the target platform, as a build
5071# helper). Since the non-cross-compile case uses the normal, target compilers
5072# for this, we can only do this after these have been setup.
5073
5074
5075# Do some additional checks on the detected tools.
5076
5077
5078# Setup the JTReg Regression Test Harness.
5079
5080
5081#
5082# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5083# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5084#
5085# This code is free software; you can redistribute it and/or modify it
5086# under the terms of the GNU General Public License version 2 only, as
5087# published by the Free Software Foundation.  Oracle designates this
5088# particular file as subject to the "Classpath" exception as provided
5089# by Oracle in the LICENSE file that accompanied this code.
5090#
5091# This code is distributed in the hope that it will be useful, but WITHOUT
5092# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5093# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5094# version 2 for more details (a copy is included in the LICENSE file that
5095# accompanied this code).
5096#
5097# You should have received a copy of the GNU General Public License version
5098# 2 along with this work; if not, write to the Free Software Foundation,
5099# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5100#
5101# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5102# or visit www.oracle.com if you need additional information or have any
5103# questions.
5104#
5105
5106################################################################################
5107# The order of these defines the priority by which we try to find them.
5108VALID_VS_VERSIONS="2013 2012 2010"
5109
5110VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5111VS_VERSION_INTERNAL_2010=100
5112VS_MSVCR_2010=msvcr100.dll
5113# We don't use msvcp on Visual Studio 2010
5114#VS_MSVCP_2010=msvcp100.dll
5115VS_ENVVAR_2010="VS100COMNTOOLS"
5116VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5117VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5118VS_VS_PLATFORM_NAME_2010="v100"
5119VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5120
5121VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5122VS_VERSION_INTERNAL_2012=110
5123VS_MSVCR_2012=msvcr110.dll
5124VS_MSVCP_2012=msvcp110.dll
5125VS_ENVVAR_2012="VS110COMNTOOLS"
5126VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5127VS_SDK_INSTALLDIR_2012=
5128VS_VS_PLATFORM_NAME_2012="v110"
5129VS_SDK_PLATFORM_NAME_2012=
5130
5131VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5132VS_VERSION_INTERNAL_2013=120
5133VS_MSVCR_2013=msvcr120.dll
5134VS_MSVCP_2013=msvcp120.dll
5135VS_ENVVAR_2013="VS120COMNTOOLS"
5136VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5137VS_SDK_INSTALLDIR_2013=
5138VS_VS_PLATFORM_NAME_2013="v120"
5139VS_SDK_PLATFORM_NAME_2013=
5140
5141################################################################################
5142
5143
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5151# build environment and assigns it to VS_ENV_CMD
5152
5153
5154################################################################################
5155
5156
5157
5158################################################################################
5159# Check if the VS env variables were setup prior to running configure.
5160# If not, then find vcvarsall.bat and run it automatically, and integrate
5161# the set env variables into the spec file.
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176# This line needs to be here, verbatim, after all includes and the dummy hook
5177# definitions. It is replaced with custom functionality when building
5178# custom sources.
5179#CUSTOM_AUTOCONF_INCLUDE
5180
5181# Do not change or remove the following line, it is needed for consistency checks:
5182DATE_WHEN_GENERATED=1492700323
5183
5184###############################################################################
5185#
5186# Initialization / Boot-strapping
5187#
5188# The bootstrapping process needs to solve the "chicken or the egg" problem,
5189# thus it jumps back and forth, each time gaining something needed later on.
5190#
5191###############################################################################
5192
5193# If we are requested to print additional help, do that and then exit.
5194# This must be the very first call.
5195
5196  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5197
5198    # Print available toolchains
5199    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5200    $PRINTF "Which are valid to use depends on the build platform.\n"
5201    for toolchain in $VALID_TOOLCHAINS_all; do
5202      # Use indirect variable referencing
5203      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5204      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5205      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5206    done
5207    $PRINTF "\n"
5208
5209    # Print available jvm features
5210    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5211    $PRINTF "Which are valid to use depends on the target platform.\n  "
5212    $PRINTF "%s " $VALID_JVM_FEATURES
5213    $PRINTF "\n"
5214
5215    # And now exit directly
5216    exit 0
5217  fi
5218
5219
5220# Basic initialization that must happen first of all in the normal process.
5221
5222  # Save the original command line. This is passed to us by the wrapper configure script.
5223
5224  # Save the path variable before it gets changed
5225  ORIGINAL_PATH="$PATH"
5226
5227  DATE_WHEN_CONFIGURED=`LANG=C date`
5228
5229  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5230$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5232$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5233
5234
5235  # Start with tools that do not need have cross compilation support
5236  # and can be expected to be found in the default PATH. These tools are
5237  # used by configure.
5238
5239  # First are all the simple required tools.
5240
5241
5242
5243  # Publish this variable in the help.
5244
5245
5246  if [ -z "${BASENAME+x}" ]; then
5247    # The variable is not set by user, try to locate tool using the code snippet
5248    for ac_prog in basename
5249do
5250  # Extract the first word of "$ac_prog", so it can be a program name with args.
5251set dummy $ac_prog; ac_word=$2
5252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5253$as_echo_n "checking for $ac_word... " >&6; }
5254if ${ac_cv_path_BASENAME+:} false; then :
5255  $as_echo_n "(cached) " >&6
5256else
5257  case $BASENAME in
5258  [\\/]* | ?:[\\/]*)
5259  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5260  ;;
5261  *)
5262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5263for as_dir in $PATH
5264do
5265  IFS=$as_save_IFS
5266  test -z "$as_dir" && as_dir=.
5267    for ac_exec_ext in '' $ac_executable_extensions; do
5268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5269    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5271    break 2
5272  fi
5273done
5274  done
5275IFS=$as_save_IFS
5276
5277  ;;
5278esac
5279fi
5280BASENAME=$ac_cv_path_BASENAME
5281if test -n "$BASENAME"; then
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5283$as_echo "$BASENAME" >&6; }
5284else
5285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5286$as_echo "no" >&6; }
5287fi
5288
5289
5290  test -n "$BASENAME" && break
5291done
5292
5293  else
5294    # The variable is set, but is it from the command line or the environment?
5295
5296    # Try to remove the string !BASENAME! from our list.
5297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5299      # If it failed, the variable was not from the command line. Ignore it,
5300      # but warn the user (except for BASH, which is always set by the calling BASH).
5301      if test "xBASENAME" != xBASH; then
5302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5303$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5304      fi
5305      # Try to locate tool using the code snippet
5306      for ac_prog in basename
5307do
5308  # Extract the first word of "$ac_prog", so it can be a program name with args.
5309set dummy $ac_prog; ac_word=$2
5310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5311$as_echo_n "checking for $ac_word... " >&6; }
5312if ${ac_cv_path_BASENAME+:} false; then :
5313  $as_echo_n "(cached) " >&6
5314else
5315  case $BASENAME in
5316  [\\/]* | ?:[\\/]*)
5317  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5318  ;;
5319  *)
5320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5321for as_dir in $PATH
5322do
5323  IFS=$as_save_IFS
5324  test -z "$as_dir" && as_dir=.
5325    for ac_exec_ext in '' $ac_executable_extensions; do
5326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5327    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5329    break 2
5330  fi
5331done
5332  done
5333IFS=$as_save_IFS
5334
5335  ;;
5336esac
5337fi
5338BASENAME=$ac_cv_path_BASENAME
5339if test -n "$BASENAME"; then
5340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5341$as_echo "$BASENAME" >&6; }
5342else
5343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5344$as_echo "no" >&6; }
5345fi
5346
5347
5348  test -n "$BASENAME" && break
5349done
5350
5351    else
5352      # If it succeeded, then it was overridden by the user. We will use it
5353      # for the tool.
5354
5355      # First remove it from the list of overridden variables, so we can test
5356      # for unknown variables in the end.
5357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5358
5359      # Check if we try to supply an empty value
5360      if test "x$BASENAME" = x; then
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5362$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5364$as_echo_n "checking for BASENAME... " >&6; }
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5366$as_echo "disabled" >&6; }
5367      else
5368        # Check if the provided tool contains a complete path.
5369        tool_specified="$BASENAME"
5370        tool_basename="${tool_specified##*/}"
5371        if test "x$tool_basename" = "x$tool_specified"; then
5372          # A command without a complete path is provided, search $PATH.
5373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5374$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5375          # Extract the first word of "$tool_basename", so it can be a program name with args.
5376set dummy $tool_basename; ac_word=$2
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378$as_echo_n "checking for $ac_word... " >&6; }
5379if ${ac_cv_path_BASENAME+:} false; then :
5380  $as_echo_n "(cached) " >&6
5381else
5382  case $BASENAME in
5383  [\\/]* | ?:[\\/]*)
5384  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5385  ;;
5386  *)
5387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388for as_dir in $PATH
5389do
5390  IFS=$as_save_IFS
5391  test -z "$as_dir" && as_dir=.
5392    for ac_exec_ext in '' $ac_executable_extensions; do
5393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5394    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5396    break 2
5397  fi
5398done
5399  done
5400IFS=$as_save_IFS
5401
5402  ;;
5403esac
5404fi
5405BASENAME=$ac_cv_path_BASENAME
5406if test -n "$BASENAME"; then
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5408$as_echo "$BASENAME" >&6; }
5409else
5410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
5412fi
5413
5414
5415          if test "x$BASENAME" = x; then
5416            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5417          fi
5418        else
5419          # Otherwise we believe it is a complete path. Use it as it is.
5420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5421$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5422          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5423$as_echo_n "checking for BASENAME... " >&6; }
5424          if test ! -x "$tool_specified"; then
5425            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5426$as_echo "not found" >&6; }
5427            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5428          fi
5429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5430$as_echo "$tool_specified" >&6; }
5431        fi
5432      fi
5433    fi
5434
5435  fi
5436
5437
5438
5439  if test "x$BASENAME" = x; then
5440    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5441  fi
5442
5443
5444
5445
5446
5447  # Publish this variable in the help.
5448
5449
5450  if [ -z "${BASH+x}" ]; then
5451    # The variable is not set by user, try to locate tool using the code snippet
5452    for ac_prog in bash
5453do
5454  # Extract the first word of "$ac_prog", so it can be a program name with args.
5455set dummy $ac_prog; ac_word=$2
5456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5457$as_echo_n "checking for $ac_word... " >&6; }
5458if ${ac_cv_path_BASH+:} false; then :
5459  $as_echo_n "(cached) " >&6
5460else
5461  case $BASH in
5462  [\\/]* | ?:[\\/]*)
5463  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5464  ;;
5465  *)
5466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5467for as_dir in $PATH
5468do
5469  IFS=$as_save_IFS
5470  test -z "$as_dir" && as_dir=.
5471    for ac_exec_ext in '' $ac_executable_extensions; do
5472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5473    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5475    break 2
5476  fi
5477done
5478  done
5479IFS=$as_save_IFS
5480
5481  ;;
5482esac
5483fi
5484BASH=$ac_cv_path_BASH
5485if test -n "$BASH"; then
5486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5487$as_echo "$BASH" >&6; }
5488else
5489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5490$as_echo "no" >&6; }
5491fi
5492
5493
5494  test -n "$BASH" && break
5495done
5496
5497  else
5498    # The variable is set, but is it from the command line or the environment?
5499
5500    # Try to remove the string !BASH! from our list.
5501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5503      # If it failed, the variable was not from the command line. Ignore it,
5504      # but warn the user (except for BASH, which is always set by the calling BASH).
5505      if test "xBASH" != xBASH; then
5506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5507$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5508      fi
5509      # Try to locate tool using the code snippet
5510      for ac_prog in bash
5511do
5512  # Extract the first word of "$ac_prog", so it can be a program name with args.
5513set dummy $ac_prog; ac_word=$2
5514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5515$as_echo_n "checking for $ac_word... " >&6; }
5516if ${ac_cv_path_BASH+:} false; then :
5517  $as_echo_n "(cached) " >&6
5518else
5519  case $BASH in
5520  [\\/]* | ?:[\\/]*)
5521  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5522  ;;
5523  *)
5524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5525for as_dir in $PATH
5526do
5527  IFS=$as_save_IFS
5528  test -z "$as_dir" && as_dir=.
5529    for ac_exec_ext in '' $ac_executable_extensions; do
5530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5531    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5533    break 2
5534  fi
5535done
5536  done
5537IFS=$as_save_IFS
5538
5539  ;;
5540esac
5541fi
5542BASH=$ac_cv_path_BASH
5543if test -n "$BASH"; then
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5545$as_echo "$BASH" >&6; }
5546else
5547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5548$as_echo "no" >&6; }
5549fi
5550
5551
5552  test -n "$BASH" && break
5553done
5554
5555    else
5556      # If it succeeded, then it was overridden by the user. We will use it
5557      # for the tool.
5558
5559      # First remove it from the list of overridden variables, so we can test
5560      # for unknown variables in the end.
5561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5562
5563      # Check if we try to supply an empty value
5564      if test "x$BASH" = x; then
5565        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5566$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5568$as_echo_n "checking for BASH... " >&6; }
5569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5570$as_echo "disabled" >&6; }
5571      else
5572        # Check if the provided tool contains a complete path.
5573        tool_specified="$BASH"
5574        tool_basename="${tool_specified##*/}"
5575        if test "x$tool_basename" = "x$tool_specified"; then
5576          # A command without a complete path is provided, search $PATH.
5577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5578$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5579          # Extract the first word of "$tool_basename", so it can be a program name with args.
5580set dummy $tool_basename; ac_word=$2
5581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5582$as_echo_n "checking for $ac_word... " >&6; }
5583if ${ac_cv_path_BASH+:} false; then :
5584  $as_echo_n "(cached) " >&6
5585else
5586  case $BASH in
5587  [\\/]* | ?:[\\/]*)
5588  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5589  ;;
5590  *)
5591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5592for as_dir in $PATH
5593do
5594  IFS=$as_save_IFS
5595  test -z "$as_dir" && as_dir=.
5596    for ac_exec_ext in '' $ac_executable_extensions; do
5597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5598    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5600    break 2
5601  fi
5602done
5603  done
5604IFS=$as_save_IFS
5605
5606  ;;
5607esac
5608fi
5609BASH=$ac_cv_path_BASH
5610if test -n "$BASH"; then
5611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5612$as_echo "$BASH" >&6; }
5613else
5614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5615$as_echo "no" >&6; }
5616fi
5617
5618
5619          if test "x$BASH" = x; then
5620            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5621          fi
5622        else
5623          # Otherwise we believe it is a complete path. Use it as it is.
5624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5625$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5626          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5627$as_echo_n "checking for BASH... " >&6; }
5628          if test ! -x "$tool_specified"; then
5629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5630$as_echo "not found" >&6; }
5631            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5632          fi
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5634$as_echo "$tool_specified" >&6; }
5635        fi
5636      fi
5637    fi
5638
5639  fi
5640
5641
5642
5643  if test "x$BASH" = x; then
5644    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5645  fi
5646
5647
5648
5649
5650
5651  # Publish this variable in the help.
5652
5653
5654  if [ -z "${CAT+x}" ]; then
5655    # The variable is not set by user, try to locate tool using the code snippet
5656    for ac_prog in cat
5657do
5658  # Extract the first word of "$ac_prog", so it can be a program name with args.
5659set dummy $ac_prog; ac_word=$2
5660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5661$as_echo_n "checking for $ac_word... " >&6; }
5662if ${ac_cv_path_CAT+:} false; then :
5663  $as_echo_n "(cached) " >&6
5664else
5665  case $CAT in
5666  [\\/]* | ?:[\\/]*)
5667  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5668  ;;
5669  *)
5670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5671for as_dir in $PATH
5672do
5673  IFS=$as_save_IFS
5674  test -z "$as_dir" && as_dir=.
5675    for ac_exec_ext in '' $ac_executable_extensions; do
5676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5677    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5679    break 2
5680  fi
5681done
5682  done
5683IFS=$as_save_IFS
5684
5685  ;;
5686esac
5687fi
5688CAT=$ac_cv_path_CAT
5689if test -n "$CAT"; then
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5691$as_echo "$CAT" >&6; }
5692else
5693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5694$as_echo "no" >&6; }
5695fi
5696
5697
5698  test -n "$CAT" && break
5699done
5700
5701  else
5702    # The variable is set, but is it from the command line or the environment?
5703
5704    # Try to remove the string !CAT! from our list.
5705    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5706    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5707      # If it failed, the variable was not from the command line. Ignore it,
5708      # but warn the user (except for BASH, which is always set by the calling BASH).
5709      if test "xCAT" != xBASH; then
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5711$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5712      fi
5713      # Try to locate tool using the code snippet
5714      for ac_prog in cat
5715do
5716  # Extract the first word of "$ac_prog", so it can be a program name with args.
5717set dummy $ac_prog; ac_word=$2
5718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5719$as_echo_n "checking for $ac_word... " >&6; }
5720if ${ac_cv_path_CAT+:} false; then :
5721  $as_echo_n "(cached) " >&6
5722else
5723  case $CAT in
5724  [\\/]* | ?:[\\/]*)
5725  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5726  ;;
5727  *)
5728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5729for as_dir in $PATH
5730do
5731  IFS=$as_save_IFS
5732  test -z "$as_dir" && as_dir=.
5733    for ac_exec_ext in '' $ac_executable_extensions; do
5734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5735    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5737    break 2
5738  fi
5739done
5740  done
5741IFS=$as_save_IFS
5742
5743  ;;
5744esac
5745fi
5746CAT=$ac_cv_path_CAT
5747if test -n "$CAT"; then
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5749$as_echo "$CAT" >&6; }
5750else
5751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5752$as_echo "no" >&6; }
5753fi
5754
5755
5756  test -n "$CAT" && break
5757done
5758
5759    else
5760      # If it succeeded, then it was overridden by the user. We will use it
5761      # for the tool.
5762
5763      # First remove it from the list of overridden variables, so we can test
5764      # for unknown variables in the end.
5765      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5766
5767      # Check if we try to supply an empty value
5768      if test "x$CAT" = x; then
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5770$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5772$as_echo_n "checking for CAT... " >&6; }
5773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5774$as_echo "disabled" >&6; }
5775      else
5776        # Check if the provided tool contains a complete path.
5777        tool_specified="$CAT"
5778        tool_basename="${tool_specified##*/}"
5779        if test "x$tool_basename" = "x$tool_specified"; then
5780          # A command without a complete path is provided, search $PATH.
5781          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5782$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5783          # Extract the first word of "$tool_basename", so it can be a program name with args.
5784set dummy $tool_basename; ac_word=$2
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5786$as_echo_n "checking for $ac_word... " >&6; }
5787if ${ac_cv_path_CAT+:} false; then :
5788  $as_echo_n "(cached) " >&6
5789else
5790  case $CAT in
5791  [\\/]* | ?:[\\/]*)
5792  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5793  ;;
5794  *)
5795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5796for as_dir in $PATH
5797do
5798  IFS=$as_save_IFS
5799  test -z "$as_dir" && as_dir=.
5800    for ac_exec_ext in '' $ac_executable_extensions; do
5801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5802    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5804    break 2
5805  fi
5806done
5807  done
5808IFS=$as_save_IFS
5809
5810  ;;
5811esac
5812fi
5813CAT=$ac_cv_path_CAT
5814if test -n "$CAT"; then
5815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5816$as_echo "$CAT" >&6; }
5817else
5818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
5820fi
5821
5822
5823          if test "x$CAT" = x; then
5824            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5825          fi
5826        else
5827          # Otherwise we believe it is a complete path. Use it as it is.
5828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5829$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5830          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5831$as_echo_n "checking for CAT... " >&6; }
5832          if test ! -x "$tool_specified"; then
5833            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5834$as_echo "not found" >&6; }
5835            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5836          fi
5837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5838$as_echo "$tool_specified" >&6; }
5839        fi
5840      fi
5841    fi
5842
5843  fi
5844
5845
5846
5847  if test "x$CAT" = x; then
5848    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5849  fi
5850
5851
5852
5853
5854
5855  # Publish this variable in the help.
5856
5857
5858  if [ -z "${CHMOD+x}" ]; then
5859    # The variable is not set by user, try to locate tool using the code snippet
5860    for ac_prog in chmod
5861do
5862  # Extract the first word of "$ac_prog", so it can be a program name with args.
5863set dummy $ac_prog; ac_word=$2
5864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5865$as_echo_n "checking for $ac_word... " >&6; }
5866if ${ac_cv_path_CHMOD+:} false; then :
5867  $as_echo_n "(cached) " >&6
5868else
5869  case $CHMOD in
5870  [\\/]* | ?:[\\/]*)
5871  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5872  ;;
5873  *)
5874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5875for as_dir in $PATH
5876do
5877  IFS=$as_save_IFS
5878  test -z "$as_dir" && as_dir=.
5879    for ac_exec_ext in '' $ac_executable_extensions; do
5880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5881    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5883    break 2
5884  fi
5885done
5886  done
5887IFS=$as_save_IFS
5888
5889  ;;
5890esac
5891fi
5892CHMOD=$ac_cv_path_CHMOD
5893if test -n "$CHMOD"; then
5894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5895$as_echo "$CHMOD" >&6; }
5896else
5897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5898$as_echo "no" >&6; }
5899fi
5900
5901
5902  test -n "$CHMOD" && break
5903done
5904
5905  else
5906    # The variable is set, but is it from the command line or the environment?
5907
5908    # Try to remove the string !CHMOD! from our list.
5909    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5910    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5911      # If it failed, the variable was not from the command line. Ignore it,
5912      # but warn the user (except for BASH, which is always set by the calling BASH).
5913      if test "xCHMOD" != xBASH; then
5914        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5915$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5916      fi
5917      # Try to locate tool using the code snippet
5918      for ac_prog in chmod
5919do
5920  # Extract the first word of "$ac_prog", so it can be a program name with args.
5921set dummy $ac_prog; ac_word=$2
5922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923$as_echo_n "checking for $ac_word... " >&6; }
5924if ${ac_cv_path_CHMOD+:} false; then :
5925  $as_echo_n "(cached) " >&6
5926else
5927  case $CHMOD in
5928  [\\/]* | ?:[\\/]*)
5929  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5930  ;;
5931  *)
5932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933for as_dir in $PATH
5934do
5935  IFS=$as_save_IFS
5936  test -z "$as_dir" && as_dir=.
5937    for ac_exec_ext in '' $ac_executable_extensions; do
5938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5939    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941    break 2
5942  fi
5943done
5944  done
5945IFS=$as_save_IFS
5946
5947  ;;
5948esac
5949fi
5950CHMOD=$ac_cv_path_CHMOD
5951if test -n "$CHMOD"; then
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5953$as_echo "$CHMOD" >&6; }
5954else
5955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956$as_echo "no" >&6; }
5957fi
5958
5959
5960  test -n "$CHMOD" && break
5961done
5962
5963    else
5964      # If it succeeded, then it was overridden by the user. We will use it
5965      # for the tool.
5966
5967      # First remove it from the list of overridden variables, so we can test
5968      # for unknown variables in the end.
5969      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5970
5971      # Check if we try to supply an empty value
5972      if test "x$CHMOD" = x; then
5973        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5974$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5976$as_echo_n "checking for CHMOD... " >&6; }
5977        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5978$as_echo "disabled" >&6; }
5979      else
5980        # Check if the provided tool contains a complete path.
5981        tool_specified="$CHMOD"
5982        tool_basename="${tool_specified##*/}"
5983        if test "x$tool_basename" = "x$tool_specified"; then
5984          # A command without a complete path is provided, search $PATH.
5985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5986$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5987          # Extract the first word of "$tool_basename", so it can be a program name with args.
5988set dummy $tool_basename; ac_word=$2
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5990$as_echo_n "checking for $ac_word... " >&6; }
5991if ${ac_cv_path_CHMOD+:} false; then :
5992  $as_echo_n "(cached) " >&6
5993else
5994  case $CHMOD in
5995  [\\/]* | ?:[\\/]*)
5996  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5997  ;;
5998  *)
5999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6000for as_dir in $PATH
6001do
6002  IFS=$as_save_IFS
6003  test -z "$as_dir" && as_dir=.
6004    for ac_exec_ext in '' $ac_executable_extensions; do
6005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6006    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6008    break 2
6009  fi
6010done
6011  done
6012IFS=$as_save_IFS
6013
6014  ;;
6015esac
6016fi
6017CHMOD=$ac_cv_path_CHMOD
6018if test -n "$CHMOD"; then
6019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6020$as_echo "$CHMOD" >&6; }
6021else
6022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6023$as_echo "no" >&6; }
6024fi
6025
6026
6027          if test "x$CHMOD" = x; then
6028            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6029          fi
6030        else
6031          # Otherwise we believe it is a complete path. Use it as it is.
6032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6033$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6034          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6035$as_echo_n "checking for CHMOD... " >&6; }
6036          if test ! -x "$tool_specified"; then
6037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6038$as_echo "not found" >&6; }
6039            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6040          fi
6041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6042$as_echo "$tool_specified" >&6; }
6043        fi
6044      fi
6045    fi
6046
6047  fi
6048
6049
6050
6051  if test "x$CHMOD" = x; then
6052    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6053  fi
6054
6055
6056
6057
6058
6059  # Publish this variable in the help.
6060
6061
6062  if [ -z "${CMP+x}" ]; then
6063    # The variable is not set by user, try to locate tool using the code snippet
6064    for ac_prog in cmp
6065do
6066  # Extract the first word of "$ac_prog", so it can be a program name with args.
6067set dummy $ac_prog; ac_word=$2
6068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6069$as_echo_n "checking for $ac_word... " >&6; }
6070if ${ac_cv_path_CMP+:} false; then :
6071  $as_echo_n "(cached) " >&6
6072else
6073  case $CMP in
6074  [\\/]* | ?:[\\/]*)
6075  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6076  ;;
6077  *)
6078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6079for as_dir in $PATH
6080do
6081  IFS=$as_save_IFS
6082  test -z "$as_dir" && as_dir=.
6083    for ac_exec_ext in '' $ac_executable_extensions; do
6084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6085    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6087    break 2
6088  fi
6089done
6090  done
6091IFS=$as_save_IFS
6092
6093  ;;
6094esac
6095fi
6096CMP=$ac_cv_path_CMP
6097if test -n "$CMP"; then
6098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6099$as_echo "$CMP" >&6; }
6100else
6101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102$as_echo "no" >&6; }
6103fi
6104
6105
6106  test -n "$CMP" && break
6107done
6108
6109  else
6110    # The variable is set, but is it from the command line or the environment?
6111
6112    # Try to remove the string !CMP! from our list.
6113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6115      # If it failed, the variable was not from the command line. Ignore it,
6116      # but warn the user (except for BASH, which is always set by the calling BASH).
6117      if test "xCMP" != xBASH; then
6118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6119$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6120      fi
6121      # Try to locate tool using the code snippet
6122      for ac_prog in cmp
6123do
6124  # Extract the first word of "$ac_prog", so it can be a program name with args.
6125set dummy $ac_prog; ac_word=$2
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6127$as_echo_n "checking for $ac_word... " >&6; }
6128if ${ac_cv_path_CMP+:} false; then :
6129  $as_echo_n "(cached) " >&6
6130else
6131  case $CMP in
6132  [\\/]* | ?:[\\/]*)
6133  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6134  ;;
6135  *)
6136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6137for as_dir in $PATH
6138do
6139  IFS=$as_save_IFS
6140  test -z "$as_dir" && as_dir=.
6141    for ac_exec_ext in '' $ac_executable_extensions; do
6142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6143    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6145    break 2
6146  fi
6147done
6148  done
6149IFS=$as_save_IFS
6150
6151  ;;
6152esac
6153fi
6154CMP=$ac_cv_path_CMP
6155if test -n "$CMP"; then
6156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6157$as_echo "$CMP" >&6; }
6158else
6159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
6161fi
6162
6163
6164  test -n "$CMP" && break
6165done
6166
6167    else
6168      # If it succeeded, then it was overridden by the user. We will use it
6169      # for the tool.
6170
6171      # First remove it from the list of overridden variables, so we can test
6172      # for unknown variables in the end.
6173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6174
6175      # Check if we try to supply an empty value
6176      if test "x$CMP" = x; then
6177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6178$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6180$as_echo_n "checking for CMP... " >&6; }
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6182$as_echo "disabled" >&6; }
6183      else
6184        # Check if the provided tool contains a complete path.
6185        tool_specified="$CMP"
6186        tool_basename="${tool_specified##*/}"
6187        if test "x$tool_basename" = "x$tool_specified"; then
6188          # A command without a complete path is provided, search $PATH.
6189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6190$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6191          # Extract the first word of "$tool_basename", so it can be a program name with args.
6192set dummy $tool_basename; ac_word=$2
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6194$as_echo_n "checking for $ac_word... " >&6; }
6195if ${ac_cv_path_CMP+:} false; then :
6196  $as_echo_n "(cached) " >&6
6197else
6198  case $CMP in
6199  [\\/]* | ?:[\\/]*)
6200  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6201  ;;
6202  *)
6203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6204for as_dir in $PATH
6205do
6206  IFS=$as_save_IFS
6207  test -z "$as_dir" && as_dir=.
6208    for ac_exec_ext in '' $ac_executable_extensions; do
6209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6210    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6212    break 2
6213  fi
6214done
6215  done
6216IFS=$as_save_IFS
6217
6218  ;;
6219esac
6220fi
6221CMP=$ac_cv_path_CMP
6222if test -n "$CMP"; then
6223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6224$as_echo "$CMP" >&6; }
6225else
6226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6227$as_echo "no" >&6; }
6228fi
6229
6230
6231          if test "x$CMP" = x; then
6232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6233          fi
6234        else
6235          # Otherwise we believe it is a complete path. Use it as it is.
6236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6237$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6239$as_echo_n "checking for CMP... " >&6; }
6240          if test ! -x "$tool_specified"; then
6241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6242$as_echo "not found" >&6; }
6243            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6244          fi
6245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6246$as_echo "$tool_specified" >&6; }
6247        fi
6248      fi
6249    fi
6250
6251  fi
6252
6253
6254
6255  if test "x$CMP" = x; then
6256    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6257  fi
6258
6259
6260
6261
6262
6263  # Publish this variable in the help.
6264
6265
6266  if [ -z "${COMM+x}" ]; then
6267    # The variable is not set by user, try to locate tool using the code snippet
6268    for ac_prog in comm
6269do
6270  # Extract the first word of "$ac_prog", so it can be a program name with args.
6271set dummy $ac_prog; ac_word=$2
6272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6273$as_echo_n "checking for $ac_word... " >&6; }
6274if ${ac_cv_path_COMM+:} false; then :
6275  $as_echo_n "(cached) " >&6
6276else
6277  case $COMM in
6278  [\\/]* | ?:[\\/]*)
6279  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6280  ;;
6281  *)
6282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6283for as_dir in $PATH
6284do
6285  IFS=$as_save_IFS
6286  test -z "$as_dir" && as_dir=.
6287    for ac_exec_ext in '' $ac_executable_extensions; do
6288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6289    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6291    break 2
6292  fi
6293done
6294  done
6295IFS=$as_save_IFS
6296
6297  ;;
6298esac
6299fi
6300COMM=$ac_cv_path_COMM
6301if test -n "$COMM"; then
6302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6303$as_echo "$COMM" >&6; }
6304else
6305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6306$as_echo "no" >&6; }
6307fi
6308
6309
6310  test -n "$COMM" && break
6311done
6312
6313  else
6314    # The variable is set, but is it from the command line or the environment?
6315
6316    # Try to remove the string !COMM! from our list.
6317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6319      # If it failed, the variable was not from the command line. Ignore it,
6320      # but warn the user (except for BASH, which is always set by the calling BASH).
6321      if test "xCOMM" != xBASH; then
6322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6323$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6324      fi
6325      # Try to locate tool using the code snippet
6326      for ac_prog in comm
6327do
6328  # Extract the first word of "$ac_prog", so it can be a program name with args.
6329set dummy $ac_prog; ac_word=$2
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6331$as_echo_n "checking for $ac_word... " >&6; }
6332if ${ac_cv_path_COMM+:} false; then :
6333  $as_echo_n "(cached) " >&6
6334else
6335  case $COMM in
6336  [\\/]* | ?:[\\/]*)
6337  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6338  ;;
6339  *)
6340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341for as_dir in $PATH
6342do
6343  IFS=$as_save_IFS
6344  test -z "$as_dir" && as_dir=.
6345    for ac_exec_ext in '' $ac_executable_extensions; do
6346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6347    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349    break 2
6350  fi
6351done
6352  done
6353IFS=$as_save_IFS
6354
6355  ;;
6356esac
6357fi
6358COMM=$ac_cv_path_COMM
6359if test -n "$COMM"; then
6360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6361$as_echo "$COMM" >&6; }
6362else
6363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6364$as_echo "no" >&6; }
6365fi
6366
6367
6368  test -n "$COMM" && break
6369done
6370
6371    else
6372      # If it succeeded, then it was overridden by the user. We will use it
6373      # for the tool.
6374
6375      # First remove it from the list of overridden variables, so we can test
6376      # for unknown variables in the end.
6377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6378
6379      # Check if we try to supply an empty value
6380      if test "x$COMM" = x; then
6381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6382$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6384$as_echo_n "checking for COMM... " >&6; }
6385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6386$as_echo "disabled" >&6; }
6387      else
6388        # Check if the provided tool contains a complete path.
6389        tool_specified="$COMM"
6390        tool_basename="${tool_specified##*/}"
6391        if test "x$tool_basename" = "x$tool_specified"; then
6392          # A command without a complete path is provided, search $PATH.
6393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6394$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6395          # Extract the first word of "$tool_basename", so it can be a program name with args.
6396set dummy $tool_basename; ac_word=$2
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6398$as_echo_n "checking for $ac_word... " >&6; }
6399if ${ac_cv_path_COMM+:} false; then :
6400  $as_echo_n "(cached) " >&6
6401else
6402  case $COMM in
6403  [\\/]* | ?:[\\/]*)
6404  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6405  ;;
6406  *)
6407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408for as_dir in $PATH
6409do
6410  IFS=$as_save_IFS
6411  test -z "$as_dir" && as_dir=.
6412    for ac_exec_ext in '' $ac_executable_extensions; do
6413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6414    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6416    break 2
6417  fi
6418done
6419  done
6420IFS=$as_save_IFS
6421
6422  ;;
6423esac
6424fi
6425COMM=$ac_cv_path_COMM
6426if test -n "$COMM"; then
6427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6428$as_echo "$COMM" >&6; }
6429else
6430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
6434
6435          if test "x$COMM" = x; then
6436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6437          fi
6438        else
6439          # Otherwise we believe it is a complete path. Use it as it is.
6440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6441$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6443$as_echo_n "checking for COMM... " >&6; }
6444          if test ! -x "$tool_specified"; then
6445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6446$as_echo "not found" >&6; }
6447            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6448          fi
6449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6450$as_echo "$tool_specified" >&6; }
6451        fi
6452      fi
6453    fi
6454
6455  fi
6456
6457
6458
6459  if test "x$COMM" = x; then
6460    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6461  fi
6462
6463
6464
6465
6466
6467  # Publish this variable in the help.
6468
6469
6470  if [ -z "${CP+x}" ]; then
6471    # The variable is not set by user, try to locate tool using the code snippet
6472    for ac_prog in cp
6473do
6474  # Extract the first word of "$ac_prog", so it can be a program name with args.
6475set dummy $ac_prog; ac_word=$2
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6477$as_echo_n "checking for $ac_word... " >&6; }
6478if ${ac_cv_path_CP+:} false; then :
6479  $as_echo_n "(cached) " >&6
6480else
6481  case $CP in
6482  [\\/]* | ?:[\\/]*)
6483  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6484  ;;
6485  *)
6486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487for as_dir in $PATH
6488do
6489  IFS=$as_save_IFS
6490  test -z "$as_dir" && as_dir=.
6491    for ac_exec_ext in '' $ac_executable_extensions; do
6492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495    break 2
6496  fi
6497done
6498  done
6499IFS=$as_save_IFS
6500
6501  ;;
6502esac
6503fi
6504CP=$ac_cv_path_CP
6505if test -n "$CP"; then
6506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6507$as_echo "$CP" >&6; }
6508else
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510$as_echo "no" >&6; }
6511fi
6512
6513
6514  test -n "$CP" && break
6515done
6516
6517  else
6518    # The variable is set, but is it from the command line or the environment?
6519
6520    # Try to remove the string !CP! from our list.
6521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6523      # If it failed, the variable was not from the command line. Ignore it,
6524      # but warn the user (except for BASH, which is always set by the calling BASH).
6525      if test "xCP" != xBASH; then
6526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6527$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6528      fi
6529      # Try to locate tool using the code snippet
6530      for ac_prog in cp
6531do
6532  # Extract the first word of "$ac_prog", so it can be a program name with args.
6533set dummy $ac_prog; ac_word=$2
6534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6535$as_echo_n "checking for $ac_word... " >&6; }
6536if ${ac_cv_path_CP+:} false; then :
6537  $as_echo_n "(cached) " >&6
6538else
6539  case $CP in
6540  [\\/]* | ?:[\\/]*)
6541  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6542  ;;
6543  *)
6544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6545for as_dir in $PATH
6546do
6547  IFS=$as_save_IFS
6548  test -z "$as_dir" && as_dir=.
6549    for ac_exec_ext in '' $ac_executable_extensions; do
6550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6551    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6553    break 2
6554  fi
6555done
6556  done
6557IFS=$as_save_IFS
6558
6559  ;;
6560esac
6561fi
6562CP=$ac_cv_path_CP
6563if test -n "$CP"; then
6564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6565$as_echo "$CP" >&6; }
6566else
6567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6568$as_echo "no" >&6; }
6569fi
6570
6571
6572  test -n "$CP" && break
6573done
6574
6575    else
6576      # If it succeeded, then it was overridden by the user. We will use it
6577      # for the tool.
6578
6579      # First remove it from the list of overridden variables, so we can test
6580      # for unknown variables in the end.
6581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6582
6583      # Check if we try to supply an empty value
6584      if test "x$CP" = x; then
6585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6586$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6588$as_echo_n "checking for CP... " >&6; }
6589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6590$as_echo "disabled" >&6; }
6591      else
6592        # Check if the provided tool contains a complete path.
6593        tool_specified="$CP"
6594        tool_basename="${tool_specified##*/}"
6595        if test "x$tool_basename" = "x$tool_specified"; then
6596          # A command without a complete path is provided, search $PATH.
6597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6598$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6599          # Extract the first word of "$tool_basename", so it can be a program name with args.
6600set dummy $tool_basename; ac_word=$2
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6602$as_echo_n "checking for $ac_word... " >&6; }
6603if ${ac_cv_path_CP+:} false; then :
6604  $as_echo_n "(cached) " >&6
6605else
6606  case $CP in
6607  [\\/]* | ?:[\\/]*)
6608  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6609  ;;
6610  *)
6611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6612for as_dir in $PATH
6613do
6614  IFS=$as_save_IFS
6615  test -z "$as_dir" && as_dir=.
6616    for ac_exec_ext in '' $ac_executable_extensions; do
6617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6618    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6620    break 2
6621  fi
6622done
6623  done
6624IFS=$as_save_IFS
6625
6626  ;;
6627esac
6628fi
6629CP=$ac_cv_path_CP
6630if test -n "$CP"; then
6631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6632$as_echo "$CP" >&6; }
6633else
6634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6635$as_echo "no" >&6; }
6636fi
6637
6638
6639          if test "x$CP" = x; then
6640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6641          fi
6642        else
6643          # Otherwise we believe it is a complete path. Use it as it is.
6644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6645$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6647$as_echo_n "checking for CP... " >&6; }
6648          if test ! -x "$tool_specified"; then
6649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6650$as_echo "not found" >&6; }
6651            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6652          fi
6653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6654$as_echo "$tool_specified" >&6; }
6655        fi
6656      fi
6657    fi
6658
6659  fi
6660
6661
6662
6663  if test "x$CP" = x; then
6664    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6665  fi
6666
6667
6668
6669
6670
6671  # Publish this variable in the help.
6672
6673
6674  if [ -z "${CUT+x}" ]; then
6675    # The variable is not set by user, try to locate tool using the code snippet
6676    for ac_prog in cut
6677do
6678  # Extract the first word of "$ac_prog", so it can be a program name with args.
6679set dummy $ac_prog; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_CUT+:} false; then :
6683  $as_echo_n "(cached) " >&6
6684else
6685  case $CUT in
6686  [\\/]* | ?:[\\/]*)
6687  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6688  ;;
6689  *)
6690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in $PATH
6692do
6693  IFS=$as_save_IFS
6694  test -z "$as_dir" && as_dir=.
6695    for ac_exec_ext in '' $ac_executable_extensions; do
6696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699    break 2
6700  fi
6701done
6702  done
6703IFS=$as_save_IFS
6704
6705  ;;
6706esac
6707fi
6708CUT=$ac_cv_path_CUT
6709if test -n "$CUT"; then
6710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6711$as_echo "$CUT" >&6; }
6712else
6713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6714$as_echo "no" >&6; }
6715fi
6716
6717
6718  test -n "$CUT" && break
6719done
6720
6721  else
6722    # The variable is set, but is it from the command line or the environment?
6723
6724    # Try to remove the string !CUT! from our list.
6725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6727      # If it failed, the variable was not from the command line. Ignore it,
6728      # but warn the user (except for BASH, which is always set by the calling BASH).
6729      if test "xCUT" != xBASH; then
6730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6731$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6732      fi
6733      # Try to locate tool using the code snippet
6734      for ac_prog in cut
6735do
6736  # Extract the first word of "$ac_prog", so it can be a program name with args.
6737set dummy $ac_prog; ac_word=$2
6738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6739$as_echo_n "checking for $ac_word... " >&6; }
6740if ${ac_cv_path_CUT+:} false; then :
6741  $as_echo_n "(cached) " >&6
6742else
6743  case $CUT in
6744  [\\/]* | ?:[\\/]*)
6745  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6746  ;;
6747  *)
6748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6749for as_dir in $PATH
6750do
6751  IFS=$as_save_IFS
6752  test -z "$as_dir" && as_dir=.
6753    for ac_exec_ext in '' $ac_executable_extensions; do
6754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6755    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6757    break 2
6758  fi
6759done
6760  done
6761IFS=$as_save_IFS
6762
6763  ;;
6764esac
6765fi
6766CUT=$ac_cv_path_CUT
6767if test -n "$CUT"; then
6768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6769$as_echo "$CUT" >&6; }
6770else
6771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6772$as_echo "no" >&6; }
6773fi
6774
6775
6776  test -n "$CUT" && break
6777done
6778
6779    else
6780      # If it succeeded, then it was overridden by the user. We will use it
6781      # for the tool.
6782
6783      # First remove it from the list of overridden variables, so we can test
6784      # for unknown variables in the end.
6785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6786
6787      # Check if we try to supply an empty value
6788      if test "x$CUT" = x; then
6789        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6790$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6792$as_echo_n "checking for CUT... " >&6; }
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6794$as_echo "disabled" >&6; }
6795      else
6796        # Check if the provided tool contains a complete path.
6797        tool_specified="$CUT"
6798        tool_basename="${tool_specified##*/}"
6799        if test "x$tool_basename" = "x$tool_specified"; then
6800          # A command without a complete path is provided, search $PATH.
6801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6802$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6803          # Extract the first word of "$tool_basename", so it can be a program name with args.
6804set dummy $tool_basename; ac_word=$2
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6806$as_echo_n "checking for $ac_word... " >&6; }
6807if ${ac_cv_path_CUT+:} false; then :
6808  $as_echo_n "(cached) " >&6
6809else
6810  case $CUT in
6811  [\\/]* | ?:[\\/]*)
6812  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6813  ;;
6814  *)
6815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6816for as_dir in $PATH
6817do
6818  IFS=$as_save_IFS
6819  test -z "$as_dir" && as_dir=.
6820    for ac_exec_ext in '' $ac_executable_extensions; do
6821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6822    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6824    break 2
6825  fi
6826done
6827  done
6828IFS=$as_save_IFS
6829
6830  ;;
6831esac
6832fi
6833CUT=$ac_cv_path_CUT
6834if test -n "$CUT"; then
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6836$as_echo "$CUT" >&6; }
6837else
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839$as_echo "no" >&6; }
6840fi
6841
6842
6843          if test "x$CUT" = x; then
6844            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6845          fi
6846        else
6847          # Otherwise we believe it is a complete path. Use it as it is.
6848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6849$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6850          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6851$as_echo_n "checking for CUT... " >&6; }
6852          if test ! -x "$tool_specified"; then
6853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6854$as_echo "not found" >&6; }
6855            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6856          fi
6857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6858$as_echo "$tool_specified" >&6; }
6859        fi
6860      fi
6861    fi
6862
6863  fi
6864
6865
6866
6867  if test "x$CUT" = x; then
6868    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6869  fi
6870
6871
6872
6873
6874
6875  # Publish this variable in the help.
6876
6877
6878  if [ -z "${DATE+x}" ]; then
6879    # The variable is not set by user, try to locate tool using the code snippet
6880    for ac_prog in date
6881do
6882  # Extract the first word of "$ac_prog", so it can be a program name with args.
6883set dummy $ac_prog; ac_word=$2
6884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6885$as_echo_n "checking for $ac_word... " >&6; }
6886if ${ac_cv_path_DATE+:} false; then :
6887  $as_echo_n "(cached) " >&6
6888else
6889  case $DATE in
6890  [\\/]* | ?:[\\/]*)
6891  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6892  ;;
6893  *)
6894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6895for as_dir in $PATH
6896do
6897  IFS=$as_save_IFS
6898  test -z "$as_dir" && as_dir=.
6899    for ac_exec_ext in '' $ac_executable_extensions; do
6900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6901    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6903    break 2
6904  fi
6905done
6906  done
6907IFS=$as_save_IFS
6908
6909  ;;
6910esac
6911fi
6912DATE=$ac_cv_path_DATE
6913if test -n "$DATE"; then
6914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6915$as_echo "$DATE" >&6; }
6916else
6917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6918$as_echo "no" >&6; }
6919fi
6920
6921
6922  test -n "$DATE" && break
6923done
6924
6925  else
6926    # The variable is set, but is it from the command line or the environment?
6927
6928    # Try to remove the string !DATE! from our list.
6929    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6930    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6931      # If it failed, the variable was not from the command line. Ignore it,
6932      # but warn the user (except for BASH, which is always set by the calling BASH).
6933      if test "xDATE" != xBASH; then
6934        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6935$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6936      fi
6937      # Try to locate tool using the code snippet
6938      for ac_prog in date
6939do
6940  # Extract the first word of "$ac_prog", so it can be a program name with args.
6941set dummy $ac_prog; ac_word=$2
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6943$as_echo_n "checking for $ac_word... " >&6; }
6944if ${ac_cv_path_DATE+:} false; then :
6945  $as_echo_n "(cached) " >&6
6946else
6947  case $DATE in
6948  [\\/]* | ?:[\\/]*)
6949  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6950  ;;
6951  *)
6952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6953for as_dir in $PATH
6954do
6955  IFS=$as_save_IFS
6956  test -z "$as_dir" && as_dir=.
6957    for ac_exec_ext in '' $ac_executable_extensions; do
6958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6959    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6961    break 2
6962  fi
6963done
6964  done
6965IFS=$as_save_IFS
6966
6967  ;;
6968esac
6969fi
6970DATE=$ac_cv_path_DATE
6971if test -n "$DATE"; then
6972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6973$as_echo "$DATE" >&6; }
6974else
6975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6976$as_echo "no" >&6; }
6977fi
6978
6979
6980  test -n "$DATE" && break
6981done
6982
6983    else
6984      # If it succeeded, then it was overridden by the user. We will use it
6985      # for the tool.
6986
6987      # First remove it from the list of overridden variables, so we can test
6988      # for unknown variables in the end.
6989      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6990
6991      # Check if we try to supply an empty value
6992      if test "x$DATE" = x; then
6993        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6994$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6996$as_echo_n "checking for DATE... " >&6; }
6997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6998$as_echo "disabled" >&6; }
6999      else
7000        # Check if the provided tool contains a complete path.
7001        tool_specified="$DATE"
7002        tool_basename="${tool_specified##*/}"
7003        if test "x$tool_basename" = "x$tool_specified"; then
7004          # A command without a complete path is provided, search $PATH.
7005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7006$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7007          # Extract the first word of "$tool_basename", so it can be a program name with args.
7008set dummy $tool_basename; ac_word=$2
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7010$as_echo_n "checking for $ac_word... " >&6; }
7011if ${ac_cv_path_DATE+:} false; then :
7012  $as_echo_n "(cached) " >&6
7013else
7014  case $DATE in
7015  [\\/]* | ?:[\\/]*)
7016  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7017  ;;
7018  *)
7019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7020for as_dir in $PATH
7021do
7022  IFS=$as_save_IFS
7023  test -z "$as_dir" && as_dir=.
7024    for ac_exec_ext in '' $ac_executable_extensions; do
7025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7026    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7028    break 2
7029  fi
7030done
7031  done
7032IFS=$as_save_IFS
7033
7034  ;;
7035esac
7036fi
7037DATE=$ac_cv_path_DATE
7038if test -n "$DATE"; then
7039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7040$as_echo "$DATE" >&6; }
7041else
7042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7043$as_echo "no" >&6; }
7044fi
7045
7046
7047          if test "x$DATE" = x; then
7048            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7049          fi
7050        else
7051          # Otherwise we believe it is a complete path. Use it as it is.
7052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7053$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7054          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7055$as_echo_n "checking for DATE... " >&6; }
7056          if test ! -x "$tool_specified"; then
7057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7058$as_echo "not found" >&6; }
7059            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7060          fi
7061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7062$as_echo "$tool_specified" >&6; }
7063        fi
7064      fi
7065    fi
7066
7067  fi
7068
7069
7070
7071  if test "x$DATE" = x; then
7072    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7073  fi
7074
7075
7076
7077
7078
7079  # Publish this variable in the help.
7080
7081
7082  if [ -z "${DIFF+x}" ]; then
7083    # The variable is not set by user, try to locate tool using the code snippet
7084    for ac_prog in gdiff diff
7085do
7086  # Extract the first word of "$ac_prog", so it can be a program name with args.
7087set dummy $ac_prog; ac_word=$2
7088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7089$as_echo_n "checking for $ac_word... " >&6; }
7090if ${ac_cv_path_DIFF+:} false; then :
7091  $as_echo_n "(cached) " >&6
7092else
7093  case $DIFF in
7094  [\\/]* | ?:[\\/]*)
7095  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7096  ;;
7097  *)
7098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7099for as_dir in $PATH
7100do
7101  IFS=$as_save_IFS
7102  test -z "$as_dir" && as_dir=.
7103    for ac_exec_ext in '' $ac_executable_extensions; do
7104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7105    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7107    break 2
7108  fi
7109done
7110  done
7111IFS=$as_save_IFS
7112
7113  ;;
7114esac
7115fi
7116DIFF=$ac_cv_path_DIFF
7117if test -n "$DIFF"; then
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7119$as_echo "$DIFF" >&6; }
7120else
7121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7122$as_echo "no" >&6; }
7123fi
7124
7125
7126  test -n "$DIFF" && break
7127done
7128
7129  else
7130    # The variable is set, but is it from the command line or the environment?
7131
7132    # Try to remove the string !DIFF! from our list.
7133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7135      # If it failed, the variable was not from the command line. Ignore it,
7136      # but warn the user (except for BASH, which is always set by the calling BASH).
7137      if test "xDIFF" != xBASH; then
7138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7139$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7140      fi
7141      # Try to locate tool using the code snippet
7142      for ac_prog in gdiff diff
7143do
7144  # Extract the first word of "$ac_prog", so it can be a program name with args.
7145set dummy $ac_prog; ac_word=$2
7146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7147$as_echo_n "checking for $ac_word... " >&6; }
7148if ${ac_cv_path_DIFF+:} false; then :
7149  $as_echo_n "(cached) " >&6
7150else
7151  case $DIFF in
7152  [\\/]* | ?:[\\/]*)
7153  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7154  ;;
7155  *)
7156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7157for as_dir in $PATH
7158do
7159  IFS=$as_save_IFS
7160  test -z "$as_dir" && as_dir=.
7161    for ac_exec_ext in '' $ac_executable_extensions; do
7162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7163    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7165    break 2
7166  fi
7167done
7168  done
7169IFS=$as_save_IFS
7170
7171  ;;
7172esac
7173fi
7174DIFF=$ac_cv_path_DIFF
7175if test -n "$DIFF"; then
7176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7177$as_echo "$DIFF" >&6; }
7178else
7179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7180$as_echo "no" >&6; }
7181fi
7182
7183
7184  test -n "$DIFF" && break
7185done
7186
7187    else
7188      # If it succeeded, then it was overridden by the user. We will use it
7189      # for the tool.
7190
7191      # First remove it from the list of overridden variables, so we can test
7192      # for unknown variables in the end.
7193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7194
7195      # Check if we try to supply an empty value
7196      if test "x$DIFF" = x; then
7197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7198$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7200$as_echo_n "checking for DIFF... " >&6; }
7201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7202$as_echo "disabled" >&6; }
7203      else
7204        # Check if the provided tool contains a complete path.
7205        tool_specified="$DIFF"
7206        tool_basename="${tool_specified##*/}"
7207        if test "x$tool_basename" = "x$tool_specified"; then
7208          # A command without a complete path is provided, search $PATH.
7209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7210$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7211          # Extract the first word of "$tool_basename", so it can be a program name with args.
7212set dummy $tool_basename; ac_word=$2
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7214$as_echo_n "checking for $ac_word... " >&6; }
7215if ${ac_cv_path_DIFF+:} false; then :
7216  $as_echo_n "(cached) " >&6
7217else
7218  case $DIFF in
7219  [\\/]* | ?:[\\/]*)
7220  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7221  ;;
7222  *)
7223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7224for as_dir in $PATH
7225do
7226  IFS=$as_save_IFS
7227  test -z "$as_dir" && as_dir=.
7228    for ac_exec_ext in '' $ac_executable_extensions; do
7229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7230    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7232    break 2
7233  fi
7234done
7235  done
7236IFS=$as_save_IFS
7237
7238  ;;
7239esac
7240fi
7241DIFF=$ac_cv_path_DIFF
7242if test -n "$DIFF"; then
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7244$as_echo "$DIFF" >&6; }
7245else
7246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7247$as_echo "no" >&6; }
7248fi
7249
7250
7251          if test "x$DIFF" = x; then
7252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7253          fi
7254        else
7255          # Otherwise we believe it is a complete path. Use it as it is.
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7257$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7259$as_echo_n "checking for DIFF... " >&6; }
7260          if test ! -x "$tool_specified"; then
7261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7262$as_echo "not found" >&6; }
7263            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7264          fi
7265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7266$as_echo "$tool_specified" >&6; }
7267        fi
7268      fi
7269    fi
7270
7271  fi
7272
7273
7274
7275  if test "x$DIFF" = x; then
7276    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7277  fi
7278
7279
7280
7281
7282
7283  # Publish this variable in the help.
7284
7285
7286  if [ -z "${DIRNAME+x}" ]; then
7287    # The variable is not set by user, try to locate tool using the code snippet
7288    for ac_prog in dirname
7289do
7290  # Extract the first word of "$ac_prog", so it can be a program name with args.
7291set dummy $ac_prog; ac_word=$2
7292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7293$as_echo_n "checking for $ac_word... " >&6; }
7294if ${ac_cv_path_DIRNAME+:} false; then :
7295  $as_echo_n "(cached) " >&6
7296else
7297  case $DIRNAME in
7298  [\\/]* | ?:[\\/]*)
7299  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7300  ;;
7301  *)
7302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7303for as_dir in $PATH
7304do
7305  IFS=$as_save_IFS
7306  test -z "$as_dir" && as_dir=.
7307    for ac_exec_ext in '' $ac_executable_extensions; do
7308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7309    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7311    break 2
7312  fi
7313done
7314  done
7315IFS=$as_save_IFS
7316
7317  ;;
7318esac
7319fi
7320DIRNAME=$ac_cv_path_DIRNAME
7321if test -n "$DIRNAME"; then
7322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7323$as_echo "$DIRNAME" >&6; }
7324else
7325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7326$as_echo "no" >&6; }
7327fi
7328
7329
7330  test -n "$DIRNAME" && break
7331done
7332
7333  else
7334    # The variable is set, but is it from the command line or the environment?
7335
7336    # Try to remove the string !DIRNAME! from our list.
7337    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7338    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7339      # If it failed, the variable was not from the command line. Ignore it,
7340      # but warn the user (except for BASH, which is always set by the calling BASH).
7341      if test "xDIRNAME" != xBASH; then
7342        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7343$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7344      fi
7345      # Try to locate tool using the code snippet
7346      for ac_prog in dirname
7347do
7348  # Extract the first word of "$ac_prog", so it can be a program name with args.
7349set dummy $ac_prog; ac_word=$2
7350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7351$as_echo_n "checking for $ac_word... " >&6; }
7352if ${ac_cv_path_DIRNAME+:} false; then :
7353  $as_echo_n "(cached) " >&6
7354else
7355  case $DIRNAME in
7356  [\\/]* | ?:[\\/]*)
7357  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7358  ;;
7359  *)
7360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7361for as_dir in $PATH
7362do
7363  IFS=$as_save_IFS
7364  test -z "$as_dir" && as_dir=.
7365    for ac_exec_ext in '' $ac_executable_extensions; do
7366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7367    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7369    break 2
7370  fi
7371done
7372  done
7373IFS=$as_save_IFS
7374
7375  ;;
7376esac
7377fi
7378DIRNAME=$ac_cv_path_DIRNAME
7379if test -n "$DIRNAME"; then
7380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7381$as_echo "$DIRNAME" >&6; }
7382else
7383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7384$as_echo "no" >&6; }
7385fi
7386
7387
7388  test -n "$DIRNAME" && break
7389done
7390
7391    else
7392      # If it succeeded, then it was overridden by the user. We will use it
7393      # for the tool.
7394
7395      # First remove it from the list of overridden variables, so we can test
7396      # for unknown variables in the end.
7397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7398
7399      # Check if we try to supply an empty value
7400      if test "x$DIRNAME" = x; then
7401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7402$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7404$as_echo_n "checking for DIRNAME... " >&6; }
7405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7406$as_echo "disabled" >&6; }
7407      else
7408        # Check if the provided tool contains a complete path.
7409        tool_specified="$DIRNAME"
7410        tool_basename="${tool_specified##*/}"
7411        if test "x$tool_basename" = "x$tool_specified"; then
7412          # A command without a complete path is provided, search $PATH.
7413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7414$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7415          # Extract the first word of "$tool_basename", so it can be a program name with args.
7416set dummy $tool_basename; ac_word=$2
7417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7418$as_echo_n "checking for $ac_word... " >&6; }
7419if ${ac_cv_path_DIRNAME+:} false; then :
7420  $as_echo_n "(cached) " >&6
7421else
7422  case $DIRNAME in
7423  [\\/]* | ?:[\\/]*)
7424  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7425  ;;
7426  *)
7427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7428for as_dir in $PATH
7429do
7430  IFS=$as_save_IFS
7431  test -z "$as_dir" && as_dir=.
7432    for ac_exec_ext in '' $ac_executable_extensions; do
7433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7434    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7436    break 2
7437  fi
7438done
7439  done
7440IFS=$as_save_IFS
7441
7442  ;;
7443esac
7444fi
7445DIRNAME=$ac_cv_path_DIRNAME
7446if test -n "$DIRNAME"; then
7447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7448$as_echo "$DIRNAME" >&6; }
7449else
7450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7451$as_echo "no" >&6; }
7452fi
7453
7454
7455          if test "x$DIRNAME" = x; then
7456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7457          fi
7458        else
7459          # Otherwise we believe it is a complete path. Use it as it is.
7460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7461$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7463$as_echo_n "checking for DIRNAME... " >&6; }
7464          if test ! -x "$tool_specified"; then
7465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7466$as_echo "not found" >&6; }
7467            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7468          fi
7469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7470$as_echo "$tool_specified" >&6; }
7471        fi
7472      fi
7473    fi
7474
7475  fi
7476
7477
7478
7479  if test "x$DIRNAME" = x; then
7480    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7481  fi
7482
7483
7484
7485
7486
7487  # Publish this variable in the help.
7488
7489
7490  if [ -z "${ECHO+x}" ]; then
7491    # The variable is not set by user, try to locate tool using the code snippet
7492    for ac_prog in echo
7493do
7494  # Extract the first word of "$ac_prog", so it can be a program name with args.
7495set dummy $ac_prog; ac_word=$2
7496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7497$as_echo_n "checking for $ac_word... " >&6; }
7498if ${ac_cv_path_ECHO+:} false; then :
7499  $as_echo_n "(cached) " >&6
7500else
7501  case $ECHO in
7502  [\\/]* | ?:[\\/]*)
7503  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7504  ;;
7505  *)
7506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7507for as_dir in $PATH
7508do
7509  IFS=$as_save_IFS
7510  test -z "$as_dir" && as_dir=.
7511    for ac_exec_ext in '' $ac_executable_extensions; do
7512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7513    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7515    break 2
7516  fi
7517done
7518  done
7519IFS=$as_save_IFS
7520
7521  ;;
7522esac
7523fi
7524ECHO=$ac_cv_path_ECHO
7525if test -n "$ECHO"; then
7526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7527$as_echo "$ECHO" >&6; }
7528else
7529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7530$as_echo "no" >&6; }
7531fi
7532
7533
7534  test -n "$ECHO" && break
7535done
7536
7537  else
7538    # The variable is set, but is it from the command line or the environment?
7539
7540    # Try to remove the string !ECHO! from our list.
7541    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7542    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7543      # If it failed, the variable was not from the command line. Ignore it,
7544      # but warn the user (except for BASH, which is always set by the calling BASH).
7545      if test "xECHO" != xBASH; then
7546        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7547$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7548      fi
7549      # Try to locate tool using the code snippet
7550      for ac_prog in echo
7551do
7552  # Extract the first word of "$ac_prog", so it can be a program name with args.
7553set dummy $ac_prog; ac_word=$2
7554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7555$as_echo_n "checking for $ac_word... " >&6; }
7556if ${ac_cv_path_ECHO+:} false; then :
7557  $as_echo_n "(cached) " >&6
7558else
7559  case $ECHO in
7560  [\\/]* | ?:[\\/]*)
7561  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7562  ;;
7563  *)
7564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7565for as_dir in $PATH
7566do
7567  IFS=$as_save_IFS
7568  test -z "$as_dir" && as_dir=.
7569    for ac_exec_ext in '' $ac_executable_extensions; do
7570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7571    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7573    break 2
7574  fi
7575done
7576  done
7577IFS=$as_save_IFS
7578
7579  ;;
7580esac
7581fi
7582ECHO=$ac_cv_path_ECHO
7583if test -n "$ECHO"; then
7584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7585$as_echo "$ECHO" >&6; }
7586else
7587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7588$as_echo "no" >&6; }
7589fi
7590
7591
7592  test -n "$ECHO" && break
7593done
7594
7595    else
7596      # If it succeeded, then it was overridden by the user. We will use it
7597      # for the tool.
7598
7599      # First remove it from the list of overridden variables, so we can test
7600      # for unknown variables in the end.
7601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7602
7603      # Check if we try to supply an empty value
7604      if test "x$ECHO" = x; then
7605        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7606$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7608$as_echo_n "checking for ECHO... " >&6; }
7609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7610$as_echo "disabled" >&6; }
7611      else
7612        # Check if the provided tool contains a complete path.
7613        tool_specified="$ECHO"
7614        tool_basename="${tool_specified##*/}"
7615        if test "x$tool_basename" = "x$tool_specified"; then
7616          # A command without a complete path is provided, search $PATH.
7617          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7618$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7619          # Extract the first word of "$tool_basename", so it can be a program name with args.
7620set dummy $tool_basename; ac_word=$2
7621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7622$as_echo_n "checking for $ac_word... " >&6; }
7623if ${ac_cv_path_ECHO+:} false; then :
7624  $as_echo_n "(cached) " >&6
7625else
7626  case $ECHO in
7627  [\\/]* | ?:[\\/]*)
7628  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7629  ;;
7630  *)
7631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7632for as_dir in $PATH
7633do
7634  IFS=$as_save_IFS
7635  test -z "$as_dir" && as_dir=.
7636    for ac_exec_ext in '' $ac_executable_extensions; do
7637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7638    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7640    break 2
7641  fi
7642done
7643  done
7644IFS=$as_save_IFS
7645
7646  ;;
7647esac
7648fi
7649ECHO=$ac_cv_path_ECHO
7650if test -n "$ECHO"; then
7651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7652$as_echo "$ECHO" >&6; }
7653else
7654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7655$as_echo "no" >&6; }
7656fi
7657
7658
7659          if test "x$ECHO" = x; then
7660            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7661          fi
7662        else
7663          # Otherwise we believe it is a complete path. Use it as it is.
7664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7665$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7666          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7667$as_echo_n "checking for ECHO... " >&6; }
7668          if test ! -x "$tool_specified"; then
7669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7670$as_echo "not found" >&6; }
7671            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7672          fi
7673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7674$as_echo "$tool_specified" >&6; }
7675        fi
7676      fi
7677    fi
7678
7679  fi
7680
7681
7682
7683  if test "x$ECHO" = x; then
7684    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7685  fi
7686
7687
7688
7689
7690
7691  # Publish this variable in the help.
7692
7693
7694  if [ -z "${EXPR+x}" ]; then
7695    # The variable is not set by user, try to locate tool using the code snippet
7696    for ac_prog in expr
7697do
7698  # Extract the first word of "$ac_prog", so it can be a program name with args.
7699set dummy $ac_prog; ac_word=$2
7700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7701$as_echo_n "checking for $ac_word... " >&6; }
7702if ${ac_cv_path_EXPR+:} false; then :
7703  $as_echo_n "(cached) " >&6
7704else
7705  case $EXPR in
7706  [\\/]* | ?:[\\/]*)
7707  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7708  ;;
7709  *)
7710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7711for as_dir in $PATH
7712do
7713  IFS=$as_save_IFS
7714  test -z "$as_dir" && as_dir=.
7715    for ac_exec_ext in '' $ac_executable_extensions; do
7716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7717    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7719    break 2
7720  fi
7721done
7722  done
7723IFS=$as_save_IFS
7724
7725  ;;
7726esac
7727fi
7728EXPR=$ac_cv_path_EXPR
7729if test -n "$EXPR"; then
7730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7731$as_echo "$EXPR" >&6; }
7732else
7733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7734$as_echo "no" >&6; }
7735fi
7736
7737
7738  test -n "$EXPR" && break
7739done
7740
7741  else
7742    # The variable is set, but is it from the command line or the environment?
7743
7744    # Try to remove the string !EXPR! from our list.
7745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7747      # If it failed, the variable was not from the command line. Ignore it,
7748      # but warn the user (except for BASH, which is always set by the calling BASH).
7749      if test "xEXPR" != xBASH; then
7750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7751$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7752      fi
7753      # Try to locate tool using the code snippet
7754      for ac_prog in expr
7755do
7756  # Extract the first word of "$ac_prog", so it can be a program name with args.
7757set dummy $ac_prog; ac_word=$2
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759$as_echo_n "checking for $ac_word... " >&6; }
7760if ${ac_cv_path_EXPR+:} false; then :
7761  $as_echo_n "(cached) " >&6
7762else
7763  case $EXPR in
7764  [\\/]* | ?:[\\/]*)
7765  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7766  ;;
7767  *)
7768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7769for as_dir in $PATH
7770do
7771  IFS=$as_save_IFS
7772  test -z "$as_dir" && as_dir=.
7773    for ac_exec_ext in '' $ac_executable_extensions; do
7774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7775    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7777    break 2
7778  fi
7779done
7780  done
7781IFS=$as_save_IFS
7782
7783  ;;
7784esac
7785fi
7786EXPR=$ac_cv_path_EXPR
7787if test -n "$EXPR"; then
7788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7789$as_echo "$EXPR" >&6; }
7790else
7791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792$as_echo "no" >&6; }
7793fi
7794
7795
7796  test -n "$EXPR" && break
7797done
7798
7799    else
7800      # If it succeeded, then it was overridden by the user. We will use it
7801      # for the tool.
7802
7803      # First remove it from the list of overridden variables, so we can test
7804      # for unknown variables in the end.
7805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7806
7807      # Check if we try to supply an empty value
7808      if test "x$EXPR" = x; then
7809        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7810$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7812$as_echo_n "checking for EXPR... " >&6; }
7813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7814$as_echo "disabled" >&6; }
7815      else
7816        # Check if the provided tool contains a complete path.
7817        tool_specified="$EXPR"
7818        tool_basename="${tool_specified##*/}"
7819        if test "x$tool_basename" = "x$tool_specified"; then
7820          # A command without a complete path is provided, search $PATH.
7821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7822$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7823          # Extract the first word of "$tool_basename", so it can be a program name with args.
7824set dummy $tool_basename; ac_word=$2
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7826$as_echo_n "checking for $ac_word... " >&6; }
7827if ${ac_cv_path_EXPR+:} false; then :
7828  $as_echo_n "(cached) " >&6
7829else
7830  case $EXPR in
7831  [\\/]* | ?:[\\/]*)
7832  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7833  ;;
7834  *)
7835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7836for as_dir in $PATH
7837do
7838  IFS=$as_save_IFS
7839  test -z "$as_dir" && as_dir=.
7840    for ac_exec_ext in '' $ac_executable_extensions; do
7841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7842    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7844    break 2
7845  fi
7846done
7847  done
7848IFS=$as_save_IFS
7849
7850  ;;
7851esac
7852fi
7853EXPR=$ac_cv_path_EXPR
7854if test -n "$EXPR"; then
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7856$as_echo "$EXPR" >&6; }
7857else
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
7860fi
7861
7862
7863          if test "x$EXPR" = x; then
7864            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7865          fi
7866        else
7867          # Otherwise we believe it is a complete path. Use it as it is.
7868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7869$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7870          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7871$as_echo_n "checking for EXPR... " >&6; }
7872          if test ! -x "$tool_specified"; then
7873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7874$as_echo "not found" >&6; }
7875            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7876          fi
7877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7878$as_echo "$tool_specified" >&6; }
7879        fi
7880      fi
7881    fi
7882
7883  fi
7884
7885
7886
7887  if test "x$EXPR" = x; then
7888    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7889  fi
7890
7891
7892
7893
7894
7895  # Publish this variable in the help.
7896
7897
7898  if [ -z "${FILE+x}" ]; then
7899    # The variable is not set by user, try to locate tool using the code snippet
7900    for ac_prog in file
7901do
7902  # Extract the first word of "$ac_prog", so it can be a program name with args.
7903set dummy $ac_prog; ac_word=$2
7904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7905$as_echo_n "checking for $ac_word... " >&6; }
7906if ${ac_cv_path_FILE+:} false; then :
7907  $as_echo_n "(cached) " >&6
7908else
7909  case $FILE in
7910  [\\/]* | ?:[\\/]*)
7911  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7912  ;;
7913  *)
7914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7915for as_dir in $PATH
7916do
7917  IFS=$as_save_IFS
7918  test -z "$as_dir" && as_dir=.
7919    for ac_exec_ext in '' $ac_executable_extensions; do
7920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7921    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7923    break 2
7924  fi
7925done
7926  done
7927IFS=$as_save_IFS
7928
7929  ;;
7930esac
7931fi
7932FILE=$ac_cv_path_FILE
7933if test -n "$FILE"; then
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7935$as_echo "$FILE" >&6; }
7936else
7937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7938$as_echo "no" >&6; }
7939fi
7940
7941
7942  test -n "$FILE" && break
7943done
7944
7945  else
7946    # The variable is set, but is it from the command line or the environment?
7947
7948    # Try to remove the string !FILE! from our list.
7949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7951      # If it failed, the variable was not from the command line. Ignore it,
7952      # but warn the user (except for BASH, which is always set by the calling BASH).
7953      if test "xFILE" != xBASH; then
7954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7955$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7956      fi
7957      # Try to locate tool using the code snippet
7958      for ac_prog in file
7959do
7960  # Extract the first word of "$ac_prog", so it can be a program name with args.
7961set dummy $ac_prog; ac_word=$2
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7963$as_echo_n "checking for $ac_word... " >&6; }
7964if ${ac_cv_path_FILE+:} false; then :
7965  $as_echo_n "(cached) " >&6
7966else
7967  case $FILE in
7968  [\\/]* | ?:[\\/]*)
7969  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7970  ;;
7971  *)
7972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7973for as_dir in $PATH
7974do
7975  IFS=$as_save_IFS
7976  test -z "$as_dir" && as_dir=.
7977    for ac_exec_ext in '' $ac_executable_extensions; do
7978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7979    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7981    break 2
7982  fi
7983done
7984  done
7985IFS=$as_save_IFS
7986
7987  ;;
7988esac
7989fi
7990FILE=$ac_cv_path_FILE
7991if test -n "$FILE"; then
7992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7993$as_echo "$FILE" >&6; }
7994else
7995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7996$as_echo "no" >&6; }
7997fi
7998
7999
8000  test -n "$FILE" && break
8001done
8002
8003    else
8004      # If it succeeded, then it was overridden by the user. We will use it
8005      # for the tool.
8006
8007      # First remove it from the list of overridden variables, so we can test
8008      # for unknown variables in the end.
8009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8010
8011      # Check if we try to supply an empty value
8012      if test "x$FILE" = x; then
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8014$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8016$as_echo_n "checking for FILE... " >&6; }
8017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8018$as_echo "disabled" >&6; }
8019      else
8020        # Check if the provided tool contains a complete path.
8021        tool_specified="$FILE"
8022        tool_basename="${tool_specified##*/}"
8023        if test "x$tool_basename" = "x$tool_specified"; then
8024          # A command without a complete path is provided, search $PATH.
8025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8026$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8027          # Extract the first word of "$tool_basename", so it can be a program name with args.
8028set dummy $tool_basename; ac_word=$2
8029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8030$as_echo_n "checking for $ac_word... " >&6; }
8031if ${ac_cv_path_FILE+:} false; then :
8032  $as_echo_n "(cached) " >&6
8033else
8034  case $FILE in
8035  [\\/]* | ?:[\\/]*)
8036  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8037  ;;
8038  *)
8039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8040for as_dir in $PATH
8041do
8042  IFS=$as_save_IFS
8043  test -z "$as_dir" && as_dir=.
8044    for ac_exec_ext in '' $ac_executable_extensions; do
8045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8046    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8048    break 2
8049  fi
8050done
8051  done
8052IFS=$as_save_IFS
8053
8054  ;;
8055esac
8056fi
8057FILE=$ac_cv_path_FILE
8058if test -n "$FILE"; then
8059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8060$as_echo "$FILE" >&6; }
8061else
8062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8063$as_echo "no" >&6; }
8064fi
8065
8066
8067          if test "x$FILE" = x; then
8068            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8069          fi
8070        else
8071          # Otherwise we believe it is a complete path. Use it as it is.
8072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8073$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8074          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8075$as_echo_n "checking for FILE... " >&6; }
8076          if test ! -x "$tool_specified"; then
8077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8078$as_echo "not found" >&6; }
8079            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8080          fi
8081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8082$as_echo "$tool_specified" >&6; }
8083        fi
8084      fi
8085    fi
8086
8087  fi
8088
8089
8090
8091  if test "x$FILE" = x; then
8092    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8093  fi
8094
8095
8096
8097
8098
8099  # Publish this variable in the help.
8100
8101
8102  if [ -z "${FIND+x}" ]; then
8103    # The variable is not set by user, try to locate tool using the code snippet
8104    for ac_prog in find
8105do
8106  # Extract the first word of "$ac_prog", so it can be a program name with args.
8107set dummy $ac_prog; ac_word=$2
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8109$as_echo_n "checking for $ac_word... " >&6; }
8110if ${ac_cv_path_FIND+:} false; then :
8111  $as_echo_n "(cached) " >&6
8112else
8113  case $FIND in
8114  [\\/]* | ?:[\\/]*)
8115  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8116  ;;
8117  *)
8118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8119for as_dir in $PATH
8120do
8121  IFS=$as_save_IFS
8122  test -z "$as_dir" && as_dir=.
8123    for ac_exec_ext in '' $ac_executable_extensions; do
8124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8125    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8127    break 2
8128  fi
8129done
8130  done
8131IFS=$as_save_IFS
8132
8133  ;;
8134esac
8135fi
8136FIND=$ac_cv_path_FIND
8137if test -n "$FIND"; then
8138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8139$as_echo "$FIND" >&6; }
8140else
8141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8142$as_echo "no" >&6; }
8143fi
8144
8145
8146  test -n "$FIND" && break
8147done
8148
8149  else
8150    # The variable is set, but is it from the command line or the environment?
8151
8152    # Try to remove the string !FIND! from our list.
8153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8155      # If it failed, the variable was not from the command line. Ignore it,
8156      # but warn the user (except for BASH, which is always set by the calling BASH).
8157      if test "xFIND" != xBASH; then
8158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8159$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8160      fi
8161      # Try to locate tool using the code snippet
8162      for ac_prog in find
8163do
8164  # Extract the first word of "$ac_prog", so it can be a program name with args.
8165set dummy $ac_prog; ac_word=$2
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8167$as_echo_n "checking for $ac_word... " >&6; }
8168if ${ac_cv_path_FIND+:} false; then :
8169  $as_echo_n "(cached) " >&6
8170else
8171  case $FIND in
8172  [\\/]* | ?:[\\/]*)
8173  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8174  ;;
8175  *)
8176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8177for as_dir in $PATH
8178do
8179  IFS=$as_save_IFS
8180  test -z "$as_dir" && as_dir=.
8181    for ac_exec_ext in '' $ac_executable_extensions; do
8182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8183    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8185    break 2
8186  fi
8187done
8188  done
8189IFS=$as_save_IFS
8190
8191  ;;
8192esac
8193fi
8194FIND=$ac_cv_path_FIND
8195if test -n "$FIND"; then
8196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8197$as_echo "$FIND" >&6; }
8198else
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8200$as_echo "no" >&6; }
8201fi
8202
8203
8204  test -n "$FIND" && break
8205done
8206
8207    else
8208      # If it succeeded, then it was overridden by the user. We will use it
8209      # for the tool.
8210
8211      # First remove it from the list of overridden variables, so we can test
8212      # for unknown variables in the end.
8213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8214
8215      # Check if we try to supply an empty value
8216      if test "x$FIND" = x; then
8217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8218$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8220$as_echo_n "checking for FIND... " >&6; }
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8222$as_echo "disabled" >&6; }
8223      else
8224        # Check if the provided tool contains a complete path.
8225        tool_specified="$FIND"
8226        tool_basename="${tool_specified##*/}"
8227        if test "x$tool_basename" = "x$tool_specified"; then
8228          # A command without a complete path is provided, search $PATH.
8229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8230$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8231          # Extract the first word of "$tool_basename", so it can be a program name with args.
8232set dummy $tool_basename; ac_word=$2
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8234$as_echo_n "checking for $ac_word... " >&6; }
8235if ${ac_cv_path_FIND+:} false; then :
8236  $as_echo_n "(cached) " >&6
8237else
8238  case $FIND in
8239  [\\/]* | ?:[\\/]*)
8240  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8241  ;;
8242  *)
8243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8244for as_dir in $PATH
8245do
8246  IFS=$as_save_IFS
8247  test -z "$as_dir" && as_dir=.
8248    for ac_exec_ext in '' $ac_executable_extensions; do
8249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8250    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8252    break 2
8253  fi
8254done
8255  done
8256IFS=$as_save_IFS
8257
8258  ;;
8259esac
8260fi
8261FIND=$ac_cv_path_FIND
8262if test -n "$FIND"; then
8263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8264$as_echo "$FIND" >&6; }
8265else
8266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267$as_echo "no" >&6; }
8268fi
8269
8270
8271          if test "x$FIND" = x; then
8272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8273          fi
8274        else
8275          # Otherwise we believe it is a complete path. Use it as it is.
8276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8277$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8279$as_echo_n "checking for FIND... " >&6; }
8280          if test ! -x "$tool_specified"; then
8281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8282$as_echo "not found" >&6; }
8283            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8284          fi
8285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8286$as_echo "$tool_specified" >&6; }
8287        fi
8288      fi
8289    fi
8290
8291  fi
8292
8293
8294
8295  if test "x$FIND" = x; then
8296    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8297  fi
8298
8299
8300
8301
8302
8303  # Publish this variable in the help.
8304
8305
8306  if [ -z "${HEAD+x}" ]; then
8307    # The variable is not set by user, try to locate tool using the code snippet
8308    for ac_prog in head
8309do
8310  # Extract the first word of "$ac_prog", so it can be a program name with args.
8311set dummy $ac_prog; ac_word=$2
8312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8313$as_echo_n "checking for $ac_word... " >&6; }
8314if ${ac_cv_path_HEAD+:} false; then :
8315  $as_echo_n "(cached) " >&6
8316else
8317  case $HEAD in
8318  [\\/]* | ?:[\\/]*)
8319  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8320  ;;
8321  *)
8322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8323for as_dir in $PATH
8324do
8325  IFS=$as_save_IFS
8326  test -z "$as_dir" && as_dir=.
8327    for ac_exec_ext in '' $ac_executable_extensions; do
8328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8329    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8331    break 2
8332  fi
8333done
8334  done
8335IFS=$as_save_IFS
8336
8337  ;;
8338esac
8339fi
8340HEAD=$ac_cv_path_HEAD
8341if test -n "$HEAD"; then
8342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8343$as_echo "$HEAD" >&6; }
8344else
8345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8346$as_echo "no" >&6; }
8347fi
8348
8349
8350  test -n "$HEAD" && break
8351done
8352
8353  else
8354    # The variable is set, but is it from the command line or the environment?
8355
8356    # Try to remove the string !HEAD! from our list.
8357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8359      # If it failed, the variable was not from the command line. Ignore it,
8360      # but warn the user (except for BASH, which is always set by the calling BASH).
8361      if test "xHEAD" != xBASH; then
8362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8363$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8364      fi
8365      # Try to locate tool using the code snippet
8366      for ac_prog in head
8367do
8368  # Extract the first word of "$ac_prog", so it can be a program name with args.
8369set dummy $ac_prog; ac_word=$2
8370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8371$as_echo_n "checking for $ac_word... " >&6; }
8372if ${ac_cv_path_HEAD+:} false; then :
8373  $as_echo_n "(cached) " >&6
8374else
8375  case $HEAD in
8376  [\\/]* | ?:[\\/]*)
8377  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8378  ;;
8379  *)
8380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8381for as_dir in $PATH
8382do
8383  IFS=$as_save_IFS
8384  test -z "$as_dir" && as_dir=.
8385    for ac_exec_ext in '' $ac_executable_extensions; do
8386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8387    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8389    break 2
8390  fi
8391done
8392  done
8393IFS=$as_save_IFS
8394
8395  ;;
8396esac
8397fi
8398HEAD=$ac_cv_path_HEAD
8399if test -n "$HEAD"; then
8400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8401$as_echo "$HEAD" >&6; }
8402else
8403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404$as_echo "no" >&6; }
8405fi
8406
8407
8408  test -n "$HEAD" && break
8409done
8410
8411    else
8412      # If it succeeded, then it was overridden by the user. We will use it
8413      # for the tool.
8414
8415      # First remove it from the list of overridden variables, so we can test
8416      # for unknown variables in the end.
8417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8418
8419      # Check if we try to supply an empty value
8420      if test "x$HEAD" = x; then
8421        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8422$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8423        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8424$as_echo_n "checking for HEAD... " >&6; }
8425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8426$as_echo "disabled" >&6; }
8427      else
8428        # Check if the provided tool contains a complete path.
8429        tool_specified="$HEAD"
8430        tool_basename="${tool_specified##*/}"
8431        if test "x$tool_basename" = "x$tool_specified"; then
8432          # A command without a complete path is provided, search $PATH.
8433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8434$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8435          # Extract the first word of "$tool_basename", so it can be a program name with args.
8436set dummy $tool_basename; ac_word=$2
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8438$as_echo_n "checking for $ac_word... " >&6; }
8439if ${ac_cv_path_HEAD+:} false; then :
8440  $as_echo_n "(cached) " >&6
8441else
8442  case $HEAD in
8443  [\\/]* | ?:[\\/]*)
8444  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8445  ;;
8446  *)
8447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8448for as_dir in $PATH
8449do
8450  IFS=$as_save_IFS
8451  test -z "$as_dir" && as_dir=.
8452    for ac_exec_ext in '' $ac_executable_extensions; do
8453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8454    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8456    break 2
8457  fi
8458done
8459  done
8460IFS=$as_save_IFS
8461
8462  ;;
8463esac
8464fi
8465HEAD=$ac_cv_path_HEAD
8466if test -n "$HEAD"; then
8467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8468$as_echo "$HEAD" >&6; }
8469else
8470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8471$as_echo "no" >&6; }
8472fi
8473
8474
8475          if test "x$HEAD" = x; then
8476            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8477          fi
8478        else
8479          # Otherwise we believe it is a complete path. Use it as it is.
8480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8481$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8482          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8483$as_echo_n "checking for HEAD... " >&6; }
8484          if test ! -x "$tool_specified"; then
8485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8486$as_echo "not found" >&6; }
8487            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8488          fi
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8490$as_echo "$tool_specified" >&6; }
8491        fi
8492      fi
8493    fi
8494
8495  fi
8496
8497
8498
8499  if test "x$HEAD" = x; then
8500    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8501  fi
8502
8503
8504
8505
8506
8507  # Publish this variable in the help.
8508
8509
8510  if [ -z "${GUNZIP+x}" ]; then
8511    # The variable is not set by user, try to locate tool using the code snippet
8512    for ac_prog in gunzip
8513do
8514  # Extract the first word of "$ac_prog", so it can be a program name with args.
8515set dummy $ac_prog; ac_word=$2
8516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8517$as_echo_n "checking for $ac_word... " >&6; }
8518if ${ac_cv_path_GUNZIP+:} false; then :
8519  $as_echo_n "(cached) " >&6
8520else
8521  case $GUNZIP in
8522  [\\/]* | ?:[\\/]*)
8523  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8524  ;;
8525  *)
8526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8527for as_dir in $PATH
8528do
8529  IFS=$as_save_IFS
8530  test -z "$as_dir" && as_dir=.
8531    for ac_exec_ext in '' $ac_executable_extensions; do
8532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8533    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8535    break 2
8536  fi
8537done
8538  done
8539IFS=$as_save_IFS
8540
8541  ;;
8542esac
8543fi
8544GUNZIP=$ac_cv_path_GUNZIP
8545if test -n "$GUNZIP"; then
8546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8547$as_echo "$GUNZIP" >&6; }
8548else
8549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8550$as_echo "no" >&6; }
8551fi
8552
8553
8554  test -n "$GUNZIP" && break
8555done
8556
8557  else
8558    # The variable is set, but is it from the command line or the environment?
8559
8560    # Try to remove the string !GUNZIP! from our list.
8561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8563      # If it failed, the variable was not from the command line. Ignore it,
8564      # but warn the user (except for BASH, which is always set by the calling BASH).
8565      if test "xGUNZIP" != xBASH; then
8566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8567$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8568      fi
8569      # Try to locate tool using the code snippet
8570      for ac_prog in gunzip
8571do
8572  # Extract the first word of "$ac_prog", so it can be a program name with args.
8573set dummy $ac_prog; ac_word=$2
8574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8575$as_echo_n "checking for $ac_word... " >&6; }
8576if ${ac_cv_path_GUNZIP+:} false; then :
8577  $as_echo_n "(cached) " >&6
8578else
8579  case $GUNZIP in
8580  [\\/]* | ?:[\\/]*)
8581  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8582  ;;
8583  *)
8584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8585for as_dir in $PATH
8586do
8587  IFS=$as_save_IFS
8588  test -z "$as_dir" && as_dir=.
8589    for ac_exec_ext in '' $ac_executable_extensions; do
8590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8591    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8593    break 2
8594  fi
8595done
8596  done
8597IFS=$as_save_IFS
8598
8599  ;;
8600esac
8601fi
8602GUNZIP=$ac_cv_path_GUNZIP
8603if test -n "$GUNZIP"; then
8604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8605$as_echo "$GUNZIP" >&6; }
8606else
8607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8608$as_echo "no" >&6; }
8609fi
8610
8611
8612  test -n "$GUNZIP" && break
8613done
8614
8615    else
8616      # If it succeeded, then it was overridden by the user. We will use it
8617      # for the tool.
8618
8619      # First remove it from the list of overridden variables, so we can test
8620      # for unknown variables in the end.
8621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8622
8623      # Check if we try to supply an empty value
8624      if test "x$GUNZIP" = x; then
8625        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8626$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8627        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8628$as_echo_n "checking for GUNZIP... " >&6; }
8629        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8630$as_echo "disabled" >&6; }
8631      else
8632        # Check if the provided tool contains a complete path.
8633        tool_specified="$GUNZIP"
8634        tool_basename="${tool_specified##*/}"
8635        if test "x$tool_basename" = "x$tool_specified"; then
8636          # A command without a complete path is provided, search $PATH.
8637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8638$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8639          # Extract the first word of "$tool_basename", so it can be a program name with args.
8640set dummy $tool_basename; ac_word=$2
8641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8642$as_echo_n "checking for $ac_word... " >&6; }
8643if ${ac_cv_path_GUNZIP+:} false; then :
8644  $as_echo_n "(cached) " >&6
8645else
8646  case $GUNZIP in
8647  [\\/]* | ?:[\\/]*)
8648  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8649  ;;
8650  *)
8651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8652for as_dir in $PATH
8653do
8654  IFS=$as_save_IFS
8655  test -z "$as_dir" && as_dir=.
8656    for ac_exec_ext in '' $ac_executable_extensions; do
8657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8658    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8660    break 2
8661  fi
8662done
8663  done
8664IFS=$as_save_IFS
8665
8666  ;;
8667esac
8668fi
8669GUNZIP=$ac_cv_path_GUNZIP
8670if test -n "$GUNZIP"; then
8671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8672$as_echo "$GUNZIP" >&6; }
8673else
8674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8675$as_echo "no" >&6; }
8676fi
8677
8678
8679          if test "x$GUNZIP" = x; then
8680            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8681          fi
8682        else
8683          # Otherwise we believe it is a complete path. Use it as it is.
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8685$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8686          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8687$as_echo_n "checking for GUNZIP... " >&6; }
8688          if test ! -x "$tool_specified"; then
8689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8690$as_echo "not found" >&6; }
8691            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8692          fi
8693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8694$as_echo "$tool_specified" >&6; }
8695        fi
8696      fi
8697    fi
8698
8699  fi
8700
8701
8702
8703  if test "x$GUNZIP" = x; then
8704    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8705  fi
8706
8707
8708
8709
8710
8711  # Publish this variable in the help.
8712
8713
8714  if [ -z "${GZIP+x}" ]; then
8715    # The variable is not set by user, try to locate tool using the code snippet
8716    for ac_prog in pigz gzip
8717do
8718  # Extract the first word of "$ac_prog", so it can be a program name with args.
8719set dummy $ac_prog; ac_word=$2
8720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8721$as_echo_n "checking for $ac_word... " >&6; }
8722if ${ac_cv_path_GZIP+:} false; then :
8723  $as_echo_n "(cached) " >&6
8724else
8725  case $GZIP in
8726  [\\/]* | ?:[\\/]*)
8727  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8728  ;;
8729  *)
8730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8731for as_dir in $PATH
8732do
8733  IFS=$as_save_IFS
8734  test -z "$as_dir" && as_dir=.
8735    for ac_exec_ext in '' $ac_executable_extensions; do
8736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8737    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8739    break 2
8740  fi
8741done
8742  done
8743IFS=$as_save_IFS
8744
8745  ;;
8746esac
8747fi
8748GZIP=$ac_cv_path_GZIP
8749if test -n "$GZIP"; then
8750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8751$as_echo "$GZIP" >&6; }
8752else
8753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8754$as_echo "no" >&6; }
8755fi
8756
8757
8758  test -n "$GZIP" && break
8759done
8760
8761  else
8762    # The variable is set, but is it from the command line or the environment?
8763
8764    # Try to remove the string !GZIP! from our list.
8765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8767      # If it failed, the variable was not from the command line. Ignore it,
8768      # but warn the user (except for BASH, which is always set by the calling BASH).
8769      if test "xGZIP" != xBASH; then
8770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8771$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8772      fi
8773      # Try to locate tool using the code snippet
8774      for ac_prog in pigz gzip
8775do
8776  # Extract the first word of "$ac_prog", so it can be a program name with args.
8777set dummy $ac_prog; ac_word=$2
8778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8779$as_echo_n "checking for $ac_word... " >&6; }
8780if ${ac_cv_path_GZIP+:} false; then :
8781  $as_echo_n "(cached) " >&6
8782else
8783  case $GZIP in
8784  [\\/]* | ?:[\\/]*)
8785  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8786  ;;
8787  *)
8788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8789for as_dir in $PATH
8790do
8791  IFS=$as_save_IFS
8792  test -z "$as_dir" && as_dir=.
8793    for ac_exec_ext in '' $ac_executable_extensions; do
8794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8795    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8797    break 2
8798  fi
8799done
8800  done
8801IFS=$as_save_IFS
8802
8803  ;;
8804esac
8805fi
8806GZIP=$ac_cv_path_GZIP
8807if test -n "$GZIP"; then
8808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8809$as_echo "$GZIP" >&6; }
8810else
8811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8812$as_echo "no" >&6; }
8813fi
8814
8815
8816  test -n "$GZIP" && break
8817done
8818
8819    else
8820      # If it succeeded, then it was overridden by the user. We will use it
8821      # for the tool.
8822
8823      # First remove it from the list of overridden variables, so we can test
8824      # for unknown variables in the end.
8825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8826
8827      # Check if we try to supply an empty value
8828      if test "x$GZIP" = x; then
8829        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8830$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8832$as_echo_n "checking for GZIP... " >&6; }
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8834$as_echo "disabled" >&6; }
8835      else
8836        # Check if the provided tool contains a complete path.
8837        tool_specified="$GZIP"
8838        tool_basename="${tool_specified##*/}"
8839        if test "x$tool_basename" = "x$tool_specified"; then
8840          # A command without a complete path is provided, search $PATH.
8841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8842$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8843          # Extract the first word of "$tool_basename", so it can be a program name with args.
8844set dummy $tool_basename; ac_word=$2
8845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8846$as_echo_n "checking for $ac_word... " >&6; }
8847if ${ac_cv_path_GZIP+:} false; then :
8848  $as_echo_n "(cached) " >&6
8849else
8850  case $GZIP in
8851  [\\/]* | ?:[\\/]*)
8852  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8853  ;;
8854  *)
8855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8856for as_dir in $PATH
8857do
8858  IFS=$as_save_IFS
8859  test -z "$as_dir" && as_dir=.
8860    for ac_exec_ext in '' $ac_executable_extensions; do
8861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8862    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8864    break 2
8865  fi
8866done
8867  done
8868IFS=$as_save_IFS
8869
8870  ;;
8871esac
8872fi
8873GZIP=$ac_cv_path_GZIP
8874if test -n "$GZIP"; then
8875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8876$as_echo "$GZIP" >&6; }
8877else
8878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8879$as_echo "no" >&6; }
8880fi
8881
8882
8883          if test "x$GZIP" = x; then
8884            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8885          fi
8886        else
8887          # Otherwise we believe it is a complete path. Use it as it is.
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8889$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8890          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8891$as_echo_n "checking for GZIP... " >&6; }
8892          if test ! -x "$tool_specified"; then
8893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8894$as_echo "not found" >&6; }
8895            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8896          fi
8897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8898$as_echo "$tool_specified" >&6; }
8899        fi
8900      fi
8901    fi
8902
8903  fi
8904
8905
8906
8907  if test "x$GZIP" = x; then
8908    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8909  fi
8910
8911
8912
8913
8914
8915  # Publish this variable in the help.
8916
8917
8918  if [ -z "${LN+x}" ]; then
8919    # The variable is not set by user, try to locate tool using the code snippet
8920    for ac_prog in ln
8921do
8922  # Extract the first word of "$ac_prog", so it can be a program name with args.
8923set dummy $ac_prog; ac_word=$2
8924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8925$as_echo_n "checking for $ac_word... " >&6; }
8926if ${ac_cv_path_LN+:} false; then :
8927  $as_echo_n "(cached) " >&6
8928else
8929  case $LN in
8930  [\\/]* | ?:[\\/]*)
8931  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8932  ;;
8933  *)
8934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8935for as_dir in $PATH
8936do
8937  IFS=$as_save_IFS
8938  test -z "$as_dir" && as_dir=.
8939    for ac_exec_ext in '' $ac_executable_extensions; do
8940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8941    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8943    break 2
8944  fi
8945done
8946  done
8947IFS=$as_save_IFS
8948
8949  ;;
8950esac
8951fi
8952LN=$ac_cv_path_LN
8953if test -n "$LN"; then
8954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8955$as_echo "$LN" >&6; }
8956else
8957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8958$as_echo "no" >&6; }
8959fi
8960
8961
8962  test -n "$LN" && break
8963done
8964
8965  else
8966    # The variable is set, but is it from the command line or the environment?
8967
8968    # Try to remove the string !LN! from our list.
8969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8971      # If it failed, the variable was not from the command line. Ignore it,
8972      # but warn the user (except for BASH, which is always set by the calling BASH).
8973      if test "xLN" != xBASH; then
8974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8975$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8976      fi
8977      # Try to locate tool using the code snippet
8978      for ac_prog in ln
8979do
8980  # Extract the first word of "$ac_prog", so it can be a program name with args.
8981set dummy $ac_prog; ac_word=$2
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8983$as_echo_n "checking for $ac_word... " >&6; }
8984if ${ac_cv_path_LN+:} false; then :
8985  $as_echo_n "(cached) " >&6
8986else
8987  case $LN in
8988  [\\/]* | ?:[\\/]*)
8989  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8990  ;;
8991  *)
8992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8993for as_dir in $PATH
8994do
8995  IFS=$as_save_IFS
8996  test -z "$as_dir" && as_dir=.
8997    for ac_exec_ext in '' $ac_executable_extensions; do
8998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8999    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9001    break 2
9002  fi
9003done
9004  done
9005IFS=$as_save_IFS
9006
9007  ;;
9008esac
9009fi
9010LN=$ac_cv_path_LN
9011if test -n "$LN"; then
9012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9013$as_echo "$LN" >&6; }
9014else
9015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9016$as_echo "no" >&6; }
9017fi
9018
9019
9020  test -n "$LN" && break
9021done
9022
9023    else
9024      # If it succeeded, then it was overridden by the user. We will use it
9025      # for the tool.
9026
9027      # First remove it from the list of overridden variables, so we can test
9028      # for unknown variables in the end.
9029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9030
9031      # Check if we try to supply an empty value
9032      if test "x$LN" = x; then
9033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9034$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9036$as_echo_n "checking for LN... " >&6; }
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9038$as_echo "disabled" >&6; }
9039      else
9040        # Check if the provided tool contains a complete path.
9041        tool_specified="$LN"
9042        tool_basename="${tool_specified##*/}"
9043        if test "x$tool_basename" = "x$tool_specified"; then
9044          # A command without a complete path is provided, search $PATH.
9045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9046$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9047          # Extract the first word of "$tool_basename", so it can be a program name with args.
9048set dummy $tool_basename; ac_word=$2
9049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9050$as_echo_n "checking for $ac_word... " >&6; }
9051if ${ac_cv_path_LN+:} false; then :
9052  $as_echo_n "(cached) " >&6
9053else
9054  case $LN in
9055  [\\/]* | ?:[\\/]*)
9056  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9057  ;;
9058  *)
9059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9060for as_dir in $PATH
9061do
9062  IFS=$as_save_IFS
9063  test -z "$as_dir" && as_dir=.
9064    for ac_exec_ext in '' $ac_executable_extensions; do
9065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9066    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9068    break 2
9069  fi
9070done
9071  done
9072IFS=$as_save_IFS
9073
9074  ;;
9075esac
9076fi
9077LN=$ac_cv_path_LN
9078if test -n "$LN"; then
9079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9080$as_echo "$LN" >&6; }
9081else
9082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9083$as_echo "no" >&6; }
9084fi
9085
9086
9087          if test "x$LN" = x; then
9088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9089          fi
9090        else
9091          # Otherwise we believe it is a complete path. Use it as it is.
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9093$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9095$as_echo_n "checking for LN... " >&6; }
9096          if test ! -x "$tool_specified"; then
9097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9098$as_echo "not found" >&6; }
9099            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9100          fi
9101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9102$as_echo "$tool_specified" >&6; }
9103        fi
9104      fi
9105    fi
9106
9107  fi
9108
9109
9110
9111  if test "x$LN" = x; then
9112    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9113  fi
9114
9115
9116
9117
9118
9119  # Publish this variable in the help.
9120
9121
9122  if [ -z "${LS+x}" ]; then
9123    # The variable is not set by user, try to locate tool using the code snippet
9124    for ac_prog in ls
9125do
9126  # Extract the first word of "$ac_prog", so it can be a program name with args.
9127set dummy $ac_prog; ac_word=$2
9128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9129$as_echo_n "checking for $ac_word... " >&6; }
9130if ${ac_cv_path_LS+:} false; then :
9131  $as_echo_n "(cached) " >&6
9132else
9133  case $LS in
9134  [\\/]* | ?:[\\/]*)
9135  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9136  ;;
9137  *)
9138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9139for as_dir in $PATH
9140do
9141  IFS=$as_save_IFS
9142  test -z "$as_dir" && as_dir=.
9143    for ac_exec_ext in '' $ac_executable_extensions; do
9144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9145    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9147    break 2
9148  fi
9149done
9150  done
9151IFS=$as_save_IFS
9152
9153  ;;
9154esac
9155fi
9156LS=$ac_cv_path_LS
9157if test -n "$LS"; then
9158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9159$as_echo "$LS" >&6; }
9160else
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9162$as_echo "no" >&6; }
9163fi
9164
9165
9166  test -n "$LS" && break
9167done
9168
9169  else
9170    # The variable is set, but is it from the command line or the environment?
9171
9172    # Try to remove the string !LS! from our list.
9173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9175      # If it failed, the variable was not from the command line. Ignore it,
9176      # but warn the user (except for BASH, which is always set by the calling BASH).
9177      if test "xLS" != xBASH; then
9178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9179$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9180      fi
9181      # Try to locate tool using the code snippet
9182      for ac_prog in ls
9183do
9184  # Extract the first word of "$ac_prog", so it can be a program name with args.
9185set dummy $ac_prog; ac_word=$2
9186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9187$as_echo_n "checking for $ac_word... " >&6; }
9188if ${ac_cv_path_LS+:} false; then :
9189  $as_echo_n "(cached) " >&6
9190else
9191  case $LS in
9192  [\\/]* | ?:[\\/]*)
9193  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9194  ;;
9195  *)
9196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9197for as_dir in $PATH
9198do
9199  IFS=$as_save_IFS
9200  test -z "$as_dir" && as_dir=.
9201    for ac_exec_ext in '' $ac_executable_extensions; do
9202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9203    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9205    break 2
9206  fi
9207done
9208  done
9209IFS=$as_save_IFS
9210
9211  ;;
9212esac
9213fi
9214LS=$ac_cv_path_LS
9215if test -n "$LS"; then
9216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9217$as_echo "$LS" >&6; }
9218else
9219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9220$as_echo "no" >&6; }
9221fi
9222
9223
9224  test -n "$LS" && break
9225done
9226
9227    else
9228      # If it succeeded, then it was overridden by the user. We will use it
9229      # for the tool.
9230
9231      # First remove it from the list of overridden variables, so we can test
9232      # for unknown variables in the end.
9233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9234
9235      # Check if we try to supply an empty value
9236      if test "x$LS" = x; then
9237        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9238$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9240$as_echo_n "checking for LS... " >&6; }
9241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9242$as_echo "disabled" >&6; }
9243      else
9244        # Check if the provided tool contains a complete path.
9245        tool_specified="$LS"
9246        tool_basename="${tool_specified##*/}"
9247        if test "x$tool_basename" = "x$tool_specified"; then
9248          # A command without a complete path is provided, search $PATH.
9249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9250$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9251          # Extract the first word of "$tool_basename", so it can be a program name with args.
9252set dummy $tool_basename; ac_word=$2
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9254$as_echo_n "checking for $ac_word... " >&6; }
9255if ${ac_cv_path_LS+:} false; then :
9256  $as_echo_n "(cached) " >&6
9257else
9258  case $LS in
9259  [\\/]* | ?:[\\/]*)
9260  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9261  ;;
9262  *)
9263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9264for as_dir in $PATH
9265do
9266  IFS=$as_save_IFS
9267  test -z "$as_dir" && as_dir=.
9268    for ac_exec_ext in '' $ac_executable_extensions; do
9269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9270    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9272    break 2
9273  fi
9274done
9275  done
9276IFS=$as_save_IFS
9277
9278  ;;
9279esac
9280fi
9281LS=$ac_cv_path_LS
9282if test -n "$LS"; then
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9284$as_echo "$LS" >&6; }
9285else
9286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287$as_echo "no" >&6; }
9288fi
9289
9290
9291          if test "x$LS" = x; then
9292            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9293          fi
9294        else
9295          # Otherwise we believe it is a complete path. Use it as it is.
9296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9297$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9298          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9299$as_echo_n "checking for LS... " >&6; }
9300          if test ! -x "$tool_specified"; then
9301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9302$as_echo "not found" >&6; }
9303            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9304          fi
9305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9306$as_echo "$tool_specified" >&6; }
9307        fi
9308      fi
9309    fi
9310
9311  fi
9312
9313
9314
9315  if test "x$LS" = x; then
9316    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9317  fi
9318
9319
9320
9321
9322
9323  # Publish this variable in the help.
9324
9325
9326  if [ -z "${MKDIR+x}" ]; then
9327    # The variable is not set by user, try to locate tool using the code snippet
9328    for ac_prog in mkdir
9329do
9330  # Extract the first word of "$ac_prog", so it can be a program name with args.
9331set dummy $ac_prog; ac_word=$2
9332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9333$as_echo_n "checking for $ac_word... " >&6; }
9334if ${ac_cv_path_MKDIR+:} false; then :
9335  $as_echo_n "(cached) " >&6
9336else
9337  case $MKDIR in
9338  [\\/]* | ?:[\\/]*)
9339  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9340  ;;
9341  *)
9342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9343for as_dir in $PATH
9344do
9345  IFS=$as_save_IFS
9346  test -z "$as_dir" && as_dir=.
9347    for ac_exec_ext in '' $ac_executable_extensions; do
9348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9349    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9351    break 2
9352  fi
9353done
9354  done
9355IFS=$as_save_IFS
9356
9357  ;;
9358esac
9359fi
9360MKDIR=$ac_cv_path_MKDIR
9361if test -n "$MKDIR"; then
9362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9363$as_echo "$MKDIR" >&6; }
9364else
9365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
9367fi
9368
9369
9370  test -n "$MKDIR" && break
9371done
9372
9373  else
9374    # The variable is set, but is it from the command line or the environment?
9375
9376    # Try to remove the string !MKDIR! from our list.
9377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9379      # If it failed, the variable was not from the command line. Ignore it,
9380      # but warn the user (except for BASH, which is always set by the calling BASH).
9381      if test "xMKDIR" != xBASH; then
9382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9383$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9384      fi
9385      # Try to locate tool using the code snippet
9386      for ac_prog in mkdir
9387do
9388  # Extract the first word of "$ac_prog", so it can be a program name with args.
9389set dummy $ac_prog; ac_word=$2
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9391$as_echo_n "checking for $ac_word... " >&6; }
9392if ${ac_cv_path_MKDIR+:} false; then :
9393  $as_echo_n "(cached) " >&6
9394else
9395  case $MKDIR in
9396  [\\/]* | ?:[\\/]*)
9397  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9398  ;;
9399  *)
9400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9401for as_dir in $PATH
9402do
9403  IFS=$as_save_IFS
9404  test -z "$as_dir" && as_dir=.
9405    for ac_exec_ext in '' $ac_executable_extensions; do
9406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9407    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9409    break 2
9410  fi
9411done
9412  done
9413IFS=$as_save_IFS
9414
9415  ;;
9416esac
9417fi
9418MKDIR=$ac_cv_path_MKDIR
9419if test -n "$MKDIR"; then
9420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9421$as_echo "$MKDIR" >&6; }
9422else
9423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9424$as_echo "no" >&6; }
9425fi
9426
9427
9428  test -n "$MKDIR" && break
9429done
9430
9431    else
9432      # If it succeeded, then it was overridden by the user. We will use it
9433      # for the tool.
9434
9435      # First remove it from the list of overridden variables, so we can test
9436      # for unknown variables in the end.
9437      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9438
9439      # Check if we try to supply an empty value
9440      if test "x$MKDIR" = x; then
9441        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9442$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9444$as_echo_n "checking for MKDIR... " >&6; }
9445        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9446$as_echo "disabled" >&6; }
9447      else
9448        # Check if the provided tool contains a complete path.
9449        tool_specified="$MKDIR"
9450        tool_basename="${tool_specified##*/}"
9451        if test "x$tool_basename" = "x$tool_specified"; then
9452          # A command without a complete path is provided, search $PATH.
9453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9454$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9455          # Extract the first word of "$tool_basename", so it can be a program name with args.
9456set dummy $tool_basename; ac_word=$2
9457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9458$as_echo_n "checking for $ac_word... " >&6; }
9459if ${ac_cv_path_MKDIR+:} false; then :
9460  $as_echo_n "(cached) " >&6
9461else
9462  case $MKDIR in
9463  [\\/]* | ?:[\\/]*)
9464  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9465  ;;
9466  *)
9467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9468for as_dir in $PATH
9469do
9470  IFS=$as_save_IFS
9471  test -z "$as_dir" && as_dir=.
9472    for ac_exec_ext in '' $ac_executable_extensions; do
9473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9474    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9476    break 2
9477  fi
9478done
9479  done
9480IFS=$as_save_IFS
9481
9482  ;;
9483esac
9484fi
9485MKDIR=$ac_cv_path_MKDIR
9486if test -n "$MKDIR"; then
9487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9488$as_echo "$MKDIR" >&6; }
9489else
9490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9491$as_echo "no" >&6; }
9492fi
9493
9494
9495          if test "x$MKDIR" = x; then
9496            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9497          fi
9498        else
9499          # Otherwise we believe it is a complete path. Use it as it is.
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9501$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9502          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9503$as_echo_n "checking for MKDIR... " >&6; }
9504          if test ! -x "$tool_specified"; then
9505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9506$as_echo "not found" >&6; }
9507            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9508          fi
9509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9510$as_echo "$tool_specified" >&6; }
9511        fi
9512      fi
9513    fi
9514
9515  fi
9516
9517
9518
9519  if test "x$MKDIR" = x; then
9520    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9521  fi
9522
9523
9524
9525
9526
9527  # Publish this variable in the help.
9528
9529
9530  if [ -z "${MKTEMP+x}" ]; then
9531    # The variable is not set by user, try to locate tool using the code snippet
9532    for ac_prog in mktemp
9533do
9534  # Extract the first word of "$ac_prog", so it can be a program name with args.
9535set dummy $ac_prog; ac_word=$2
9536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9537$as_echo_n "checking for $ac_word... " >&6; }
9538if ${ac_cv_path_MKTEMP+:} false; then :
9539  $as_echo_n "(cached) " >&6
9540else
9541  case $MKTEMP in
9542  [\\/]* | ?:[\\/]*)
9543  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9544  ;;
9545  *)
9546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9547for as_dir in $PATH
9548do
9549  IFS=$as_save_IFS
9550  test -z "$as_dir" && as_dir=.
9551    for ac_exec_ext in '' $ac_executable_extensions; do
9552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9553    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9555    break 2
9556  fi
9557done
9558  done
9559IFS=$as_save_IFS
9560
9561  ;;
9562esac
9563fi
9564MKTEMP=$ac_cv_path_MKTEMP
9565if test -n "$MKTEMP"; then
9566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9567$as_echo "$MKTEMP" >&6; }
9568else
9569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9570$as_echo "no" >&6; }
9571fi
9572
9573
9574  test -n "$MKTEMP" && break
9575done
9576
9577  else
9578    # The variable is set, but is it from the command line or the environment?
9579
9580    # Try to remove the string !MKTEMP! from our list.
9581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9583      # If it failed, the variable was not from the command line. Ignore it,
9584      # but warn the user (except for BASH, which is always set by the calling BASH).
9585      if test "xMKTEMP" != xBASH; then
9586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9587$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9588      fi
9589      # Try to locate tool using the code snippet
9590      for ac_prog in mktemp
9591do
9592  # Extract the first word of "$ac_prog", so it can be a program name with args.
9593set dummy $ac_prog; ac_word=$2
9594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9595$as_echo_n "checking for $ac_word... " >&6; }
9596if ${ac_cv_path_MKTEMP+:} false; then :
9597  $as_echo_n "(cached) " >&6
9598else
9599  case $MKTEMP in
9600  [\\/]* | ?:[\\/]*)
9601  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9602  ;;
9603  *)
9604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9605for as_dir in $PATH
9606do
9607  IFS=$as_save_IFS
9608  test -z "$as_dir" && as_dir=.
9609    for ac_exec_ext in '' $ac_executable_extensions; do
9610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9611    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9613    break 2
9614  fi
9615done
9616  done
9617IFS=$as_save_IFS
9618
9619  ;;
9620esac
9621fi
9622MKTEMP=$ac_cv_path_MKTEMP
9623if test -n "$MKTEMP"; then
9624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9625$as_echo "$MKTEMP" >&6; }
9626else
9627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9628$as_echo "no" >&6; }
9629fi
9630
9631
9632  test -n "$MKTEMP" && break
9633done
9634
9635    else
9636      # If it succeeded, then it was overridden by the user. We will use it
9637      # for the tool.
9638
9639      # First remove it from the list of overridden variables, so we can test
9640      # for unknown variables in the end.
9641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9642
9643      # Check if we try to supply an empty value
9644      if test "x$MKTEMP" = x; then
9645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9646$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9648$as_echo_n "checking for MKTEMP... " >&6; }
9649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9650$as_echo "disabled" >&6; }
9651      else
9652        # Check if the provided tool contains a complete path.
9653        tool_specified="$MKTEMP"
9654        tool_basename="${tool_specified##*/}"
9655        if test "x$tool_basename" = "x$tool_specified"; then
9656          # A command without a complete path is provided, search $PATH.
9657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9658$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9659          # Extract the first word of "$tool_basename", so it can be a program name with args.
9660set dummy $tool_basename; ac_word=$2
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9662$as_echo_n "checking for $ac_word... " >&6; }
9663if ${ac_cv_path_MKTEMP+:} false; then :
9664  $as_echo_n "(cached) " >&6
9665else
9666  case $MKTEMP in
9667  [\\/]* | ?:[\\/]*)
9668  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9669  ;;
9670  *)
9671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672for as_dir in $PATH
9673do
9674  IFS=$as_save_IFS
9675  test -z "$as_dir" && as_dir=.
9676    for ac_exec_ext in '' $ac_executable_extensions; do
9677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9678    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9680    break 2
9681  fi
9682done
9683  done
9684IFS=$as_save_IFS
9685
9686  ;;
9687esac
9688fi
9689MKTEMP=$ac_cv_path_MKTEMP
9690if test -n "$MKTEMP"; then
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9692$as_echo "$MKTEMP" >&6; }
9693else
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
9696fi
9697
9698
9699          if test "x$MKTEMP" = x; then
9700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9701          fi
9702        else
9703          # Otherwise we believe it is a complete path. Use it as it is.
9704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9705$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9707$as_echo_n "checking for MKTEMP... " >&6; }
9708          if test ! -x "$tool_specified"; then
9709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9710$as_echo "not found" >&6; }
9711            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9712          fi
9713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9714$as_echo "$tool_specified" >&6; }
9715        fi
9716      fi
9717    fi
9718
9719  fi
9720
9721
9722
9723  if test "x$MKTEMP" = x; then
9724    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9725  fi
9726
9727
9728
9729
9730
9731  # Publish this variable in the help.
9732
9733
9734  if [ -z "${MV+x}" ]; then
9735    # The variable is not set by user, try to locate tool using the code snippet
9736    for ac_prog in mv
9737do
9738  # Extract the first word of "$ac_prog", so it can be a program name with args.
9739set dummy $ac_prog; ac_word=$2
9740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9741$as_echo_n "checking for $ac_word... " >&6; }
9742if ${ac_cv_path_MV+:} false; then :
9743  $as_echo_n "(cached) " >&6
9744else
9745  case $MV in
9746  [\\/]* | ?:[\\/]*)
9747  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9748  ;;
9749  *)
9750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9751for as_dir in $PATH
9752do
9753  IFS=$as_save_IFS
9754  test -z "$as_dir" && as_dir=.
9755    for ac_exec_ext in '' $ac_executable_extensions; do
9756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9757    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9759    break 2
9760  fi
9761done
9762  done
9763IFS=$as_save_IFS
9764
9765  ;;
9766esac
9767fi
9768MV=$ac_cv_path_MV
9769if test -n "$MV"; then
9770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9771$as_echo "$MV" >&6; }
9772else
9773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9774$as_echo "no" >&6; }
9775fi
9776
9777
9778  test -n "$MV" && break
9779done
9780
9781  else
9782    # The variable is set, but is it from the command line or the environment?
9783
9784    # Try to remove the string !MV! from our list.
9785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9787      # If it failed, the variable was not from the command line. Ignore it,
9788      # but warn the user (except for BASH, which is always set by the calling BASH).
9789      if test "xMV" != xBASH; then
9790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9791$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9792      fi
9793      # Try to locate tool using the code snippet
9794      for ac_prog in mv
9795do
9796  # Extract the first word of "$ac_prog", so it can be a program name with args.
9797set dummy $ac_prog; ac_word=$2
9798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9799$as_echo_n "checking for $ac_word... " >&6; }
9800if ${ac_cv_path_MV+:} false; then :
9801  $as_echo_n "(cached) " >&6
9802else
9803  case $MV in
9804  [\\/]* | ?:[\\/]*)
9805  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9806  ;;
9807  *)
9808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9809for as_dir in $PATH
9810do
9811  IFS=$as_save_IFS
9812  test -z "$as_dir" && as_dir=.
9813    for ac_exec_ext in '' $ac_executable_extensions; do
9814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9815    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9817    break 2
9818  fi
9819done
9820  done
9821IFS=$as_save_IFS
9822
9823  ;;
9824esac
9825fi
9826MV=$ac_cv_path_MV
9827if test -n "$MV"; then
9828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9829$as_echo "$MV" >&6; }
9830else
9831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9832$as_echo "no" >&6; }
9833fi
9834
9835
9836  test -n "$MV" && break
9837done
9838
9839    else
9840      # If it succeeded, then it was overridden by the user. We will use it
9841      # for the tool.
9842
9843      # First remove it from the list of overridden variables, so we can test
9844      # for unknown variables in the end.
9845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9846
9847      # Check if we try to supply an empty value
9848      if test "x$MV" = x; then
9849        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9850$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9852$as_echo_n "checking for MV... " >&6; }
9853        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9854$as_echo "disabled" >&6; }
9855      else
9856        # Check if the provided tool contains a complete path.
9857        tool_specified="$MV"
9858        tool_basename="${tool_specified##*/}"
9859        if test "x$tool_basename" = "x$tool_specified"; then
9860          # A command without a complete path is provided, search $PATH.
9861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9862$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9863          # Extract the first word of "$tool_basename", so it can be a program name with args.
9864set dummy $tool_basename; ac_word=$2
9865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9866$as_echo_n "checking for $ac_word... " >&6; }
9867if ${ac_cv_path_MV+:} false; then :
9868  $as_echo_n "(cached) " >&6
9869else
9870  case $MV in
9871  [\\/]* | ?:[\\/]*)
9872  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9873  ;;
9874  *)
9875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9876for as_dir in $PATH
9877do
9878  IFS=$as_save_IFS
9879  test -z "$as_dir" && as_dir=.
9880    for ac_exec_ext in '' $ac_executable_extensions; do
9881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9882    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9884    break 2
9885  fi
9886done
9887  done
9888IFS=$as_save_IFS
9889
9890  ;;
9891esac
9892fi
9893MV=$ac_cv_path_MV
9894if test -n "$MV"; then
9895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9896$as_echo "$MV" >&6; }
9897else
9898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899$as_echo "no" >&6; }
9900fi
9901
9902
9903          if test "x$MV" = x; then
9904            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9905          fi
9906        else
9907          # Otherwise we believe it is a complete path. Use it as it is.
9908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9909$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9910          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9911$as_echo_n "checking for MV... " >&6; }
9912          if test ! -x "$tool_specified"; then
9913            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9914$as_echo "not found" >&6; }
9915            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9916          fi
9917          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9918$as_echo "$tool_specified" >&6; }
9919        fi
9920      fi
9921    fi
9922
9923  fi
9924
9925
9926
9927  if test "x$MV" = x; then
9928    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9929  fi
9930
9931
9932
9933
9934
9935  # Publish this variable in the help.
9936
9937
9938  if [ -z "${NAWK+x}" ]; then
9939    # The variable is not set by user, try to locate tool using the code snippet
9940    for ac_prog in nawk gawk awk
9941do
9942  # Extract the first word of "$ac_prog", so it can be a program name with args.
9943set dummy $ac_prog; ac_word=$2
9944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9945$as_echo_n "checking for $ac_word... " >&6; }
9946if ${ac_cv_path_NAWK+:} false; then :
9947  $as_echo_n "(cached) " >&6
9948else
9949  case $NAWK in
9950  [\\/]* | ?:[\\/]*)
9951  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9952  ;;
9953  *)
9954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9955for as_dir in $PATH
9956do
9957  IFS=$as_save_IFS
9958  test -z "$as_dir" && as_dir=.
9959    for ac_exec_ext in '' $ac_executable_extensions; do
9960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9961    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9963    break 2
9964  fi
9965done
9966  done
9967IFS=$as_save_IFS
9968
9969  ;;
9970esac
9971fi
9972NAWK=$ac_cv_path_NAWK
9973if test -n "$NAWK"; then
9974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9975$as_echo "$NAWK" >&6; }
9976else
9977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9978$as_echo "no" >&6; }
9979fi
9980
9981
9982  test -n "$NAWK" && break
9983done
9984
9985  else
9986    # The variable is set, but is it from the command line or the environment?
9987
9988    # Try to remove the string !NAWK! from our list.
9989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9991      # If it failed, the variable was not from the command line. Ignore it,
9992      # but warn the user (except for BASH, which is always set by the calling BASH).
9993      if test "xNAWK" != xBASH; then
9994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9995$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9996      fi
9997      # Try to locate tool using the code snippet
9998      for ac_prog in nawk gawk awk
9999do
10000  # Extract the first word of "$ac_prog", so it can be a program name with args.
10001set dummy $ac_prog; ac_word=$2
10002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10003$as_echo_n "checking for $ac_word... " >&6; }
10004if ${ac_cv_path_NAWK+:} false; then :
10005  $as_echo_n "(cached) " >&6
10006else
10007  case $NAWK in
10008  [\\/]* | ?:[\\/]*)
10009  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10010  ;;
10011  *)
10012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10013for as_dir in $PATH
10014do
10015  IFS=$as_save_IFS
10016  test -z "$as_dir" && as_dir=.
10017    for ac_exec_ext in '' $ac_executable_extensions; do
10018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10019    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10021    break 2
10022  fi
10023done
10024  done
10025IFS=$as_save_IFS
10026
10027  ;;
10028esac
10029fi
10030NAWK=$ac_cv_path_NAWK
10031if test -n "$NAWK"; then
10032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10033$as_echo "$NAWK" >&6; }
10034else
10035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10036$as_echo "no" >&6; }
10037fi
10038
10039
10040  test -n "$NAWK" && break
10041done
10042
10043    else
10044      # If it succeeded, then it was overridden by the user. We will use it
10045      # for the tool.
10046
10047      # First remove it from the list of overridden variables, so we can test
10048      # for unknown variables in the end.
10049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10050
10051      # Check if we try to supply an empty value
10052      if test "x$NAWK" = x; then
10053        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10054$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10056$as_echo_n "checking for NAWK... " >&6; }
10057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10058$as_echo "disabled" >&6; }
10059      else
10060        # Check if the provided tool contains a complete path.
10061        tool_specified="$NAWK"
10062        tool_basename="${tool_specified##*/}"
10063        if test "x$tool_basename" = "x$tool_specified"; then
10064          # A command without a complete path is provided, search $PATH.
10065          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10066$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10067          # Extract the first word of "$tool_basename", so it can be a program name with args.
10068set dummy $tool_basename; ac_word=$2
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10070$as_echo_n "checking for $ac_word... " >&6; }
10071if ${ac_cv_path_NAWK+:} false; then :
10072  $as_echo_n "(cached) " >&6
10073else
10074  case $NAWK in
10075  [\\/]* | ?:[\\/]*)
10076  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10077  ;;
10078  *)
10079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10080for as_dir in $PATH
10081do
10082  IFS=$as_save_IFS
10083  test -z "$as_dir" && as_dir=.
10084    for ac_exec_ext in '' $ac_executable_extensions; do
10085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10086    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10088    break 2
10089  fi
10090done
10091  done
10092IFS=$as_save_IFS
10093
10094  ;;
10095esac
10096fi
10097NAWK=$ac_cv_path_NAWK
10098if test -n "$NAWK"; then
10099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10100$as_echo "$NAWK" >&6; }
10101else
10102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
10104fi
10105
10106
10107          if test "x$NAWK" = x; then
10108            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10109          fi
10110        else
10111          # Otherwise we believe it is a complete path. Use it as it is.
10112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10113$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10114          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10115$as_echo_n "checking for NAWK... " >&6; }
10116          if test ! -x "$tool_specified"; then
10117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10118$as_echo "not found" >&6; }
10119            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10120          fi
10121          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10122$as_echo "$tool_specified" >&6; }
10123        fi
10124      fi
10125    fi
10126
10127  fi
10128
10129
10130
10131  if test "x$NAWK" = x; then
10132    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10133  fi
10134
10135
10136
10137
10138
10139  # Publish this variable in the help.
10140
10141
10142  if [ -z "${PRINTF+x}" ]; then
10143    # The variable is not set by user, try to locate tool using the code snippet
10144    for ac_prog in printf
10145do
10146  # Extract the first word of "$ac_prog", so it can be a program name with args.
10147set dummy $ac_prog; ac_word=$2
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10149$as_echo_n "checking for $ac_word... " >&6; }
10150if ${ac_cv_path_PRINTF+:} false; then :
10151  $as_echo_n "(cached) " >&6
10152else
10153  case $PRINTF in
10154  [\\/]* | ?:[\\/]*)
10155  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10156  ;;
10157  *)
10158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10159for as_dir in $PATH
10160do
10161  IFS=$as_save_IFS
10162  test -z "$as_dir" && as_dir=.
10163    for ac_exec_ext in '' $ac_executable_extensions; do
10164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10165    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10167    break 2
10168  fi
10169done
10170  done
10171IFS=$as_save_IFS
10172
10173  ;;
10174esac
10175fi
10176PRINTF=$ac_cv_path_PRINTF
10177if test -n "$PRINTF"; then
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10179$as_echo "$PRINTF" >&6; }
10180else
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10182$as_echo "no" >&6; }
10183fi
10184
10185
10186  test -n "$PRINTF" && break
10187done
10188
10189  else
10190    # The variable is set, but is it from the command line or the environment?
10191
10192    # Try to remove the string !PRINTF! from our list.
10193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10195      # If it failed, the variable was not from the command line. Ignore it,
10196      # but warn the user (except for BASH, which is always set by the calling BASH).
10197      if test "xPRINTF" != xBASH; then
10198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10199$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10200      fi
10201      # Try to locate tool using the code snippet
10202      for ac_prog in printf
10203do
10204  # Extract the first word of "$ac_prog", so it can be a program name with args.
10205set dummy $ac_prog; ac_word=$2
10206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10207$as_echo_n "checking for $ac_word... " >&6; }
10208if ${ac_cv_path_PRINTF+:} false; then :
10209  $as_echo_n "(cached) " >&6
10210else
10211  case $PRINTF in
10212  [\\/]* | ?:[\\/]*)
10213  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10214  ;;
10215  *)
10216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10217for as_dir in $PATH
10218do
10219  IFS=$as_save_IFS
10220  test -z "$as_dir" && as_dir=.
10221    for ac_exec_ext in '' $ac_executable_extensions; do
10222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10223    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10225    break 2
10226  fi
10227done
10228  done
10229IFS=$as_save_IFS
10230
10231  ;;
10232esac
10233fi
10234PRINTF=$ac_cv_path_PRINTF
10235if test -n "$PRINTF"; then
10236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10237$as_echo "$PRINTF" >&6; }
10238else
10239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10240$as_echo "no" >&6; }
10241fi
10242
10243
10244  test -n "$PRINTF" && break
10245done
10246
10247    else
10248      # If it succeeded, then it was overridden by the user. We will use it
10249      # for the tool.
10250
10251      # First remove it from the list of overridden variables, so we can test
10252      # for unknown variables in the end.
10253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10254
10255      # Check if we try to supply an empty value
10256      if test "x$PRINTF" = x; then
10257        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10258$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10260$as_echo_n "checking for PRINTF... " >&6; }
10261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10262$as_echo "disabled" >&6; }
10263      else
10264        # Check if the provided tool contains a complete path.
10265        tool_specified="$PRINTF"
10266        tool_basename="${tool_specified##*/}"
10267        if test "x$tool_basename" = "x$tool_specified"; then
10268          # A command without a complete path is provided, search $PATH.
10269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10270$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10271          # Extract the first word of "$tool_basename", so it can be a program name with args.
10272set dummy $tool_basename; ac_word=$2
10273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10274$as_echo_n "checking for $ac_word... " >&6; }
10275if ${ac_cv_path_PRINTF+:} false; then :
10276  $as_echo_n "(cached) " >&6
10277else
10278  case $PRINTF in
10279  [\\/]* | ?:[\\/]*)
10280  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10281  ;;
10282  *)
10283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10284for as_dir in $PATH
10285do
10286  IFS=$as_save_IFS
10287  test -z "$as_dir" && as_dir=.
10288    for ac_exec_ext in '' $ac_executable_extensions; do
10289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10290    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10292    break 2
10293  fi
10294done
10295  done
10296IFS=$as_save_IFS
10297
10298  ;;
10299esac
10300fi
10301PRINTF=$ac_cv_path_PRINTF
10302if test -n "$PRINTF"; then
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10304$as_echo "$PRINTF" >&6; }
10305else
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308fi
10309
10310
10311          if test "x$PRINTF" = x; then
10312            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10313          fi
10314        else
10315          # Otherwise we believe it is a complete path. Use it as it is.
10316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10317$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10319$as_echo_n "checking for PRINTF... " >&6; }
10320          if test ! -x "$tool_specified"; then
10321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10322$as_echo "not found" >&6; }
10323            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10324          fi
10325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10326$as_echo "$tool_specified" >&6; }
10327        fi
10328      fi
10329    fi
10330
10331  fi
10332
10333
10334
10335  if test "x$PRINTF" = x; then
10336    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10337  fi
10338
10339
10340
10341
10342
10343  # Publish this variable in the help.
10344
10345
10346  if [ -z "${RM+x}" ]; then
10347    # The variable is not set by user, try to locate tool using the code snippet
10348    for ac_prog in rm
10349do
10350  # Extract the first word of "$ac_prog", so it can be a program name with args.
10351set dummy $ac_prog; ac_word=$2
10352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10353$as_echo_n "checking for $ac_word... " >&6; }
10354if ${ac_cv_path_RM+:} false; then :
10355  $as_echo_n "(cached) " >&6
10356else
10357  case $RM in
10358  [\\/]* | ?:[\\/]*)
10359  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10360  ;;
10361  *)
10362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363for as_dir in $PATH
10364do
10365  IFS=$as_save_IFS
10366  test -z "$as_dir" && as_dir=.
10367    for ac_exec_ext in '' $ac_executable_extensions; do
10368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10369    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371    break 2
10372  fi
10373done
10374  done
10375IFS=$as_save_IFS
10376
10377  ;;
10378esac
10379fi
10380RM=$ac_cv_path_RM
10381if test -n "$RM"; then
10382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10383$as_echo "$RM" >&6; }
10384else
10385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386$as_echo "no" >&6; }
10387fi
10388
10389
10390  test -n "$RM" && break
10391done
10392
10393  else
10394    # The variable is set, but is it from the command line or the environment?
10395
10396    # Try to remove the string !RM! from our list.
10397    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10398    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10399      # If it failed, the variable was not from the command line. Ignore it,
10400      # but warn the user (except for BASH, which is always set by the calling BASH).
10401      if test "xRM" != xBASH; then
10402        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10403$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10404      fi
10405      # Try to locate tool using the code snippet
10406      for ac_prog in rm
10407do
10408  # Extract the first word of "$ac_prog", so it can be a program name with args.
10409set dummy $ac_prog; ac_word=$2
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411$as_echo_n "checking for $ac_word... " >&6; }
10412if ${ac_cv_path_RM+:} false; then :
10413  $as_echo_n "(cached) " >&6
10414else
10415  case $RM in
10416  [\\/]* | ?:[\\/]*)
10417  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10418  ;;
10419  *)
10420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421for as_dir in $PATH
10422do
10423  IFS=$as_save_IFS
10424  test -z "$as_dir" && as_dir=.
10425    for ac_exec_ext in '' $ac_executable_extensions; do
10426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10427    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429    break 2
10430  fi
10431done
10432  done
10433IFS=$as_save_IFS
10434
10435  ;;
10436esac
10437fi
10438RM=$ac_cv_path_RM
10439if test -n "$RM"; then
10440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10441$as_echo "$RM" >&6; }
10442else
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444$as_echo "no" >&6; }
10445fi
10446
10447
10448  test -n "$RM" && break
10449done
10450
10451    else
10452      # If it succeeded, then it was overridden by the user. We will use it
10453      # for the tool.
10454
10455      # First remove it from the list of overridden variables, so we can test
10456      # for unknown variables in the end.
10457      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10458
10459      # Check if we try to supply an empty value
10460      if test "x$RM" = x; then
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10462$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10463        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10464$as_echo_n "checking for RM... " >&6; }
10465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10466$as_echo "disabled" >&6; }
10467      else
10468        # Check if the provided tool contains a complete path.
10469        tool_specified="$RM"
10470        tool_basename="${tool_specified##*/}"
10471        if test "x$tool_basename" = "x$tool_specified"; then
10472          # A command without a complete path is provided, search $PATH.
10473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10474$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10475          # Extract the first word of "$tool_basename", so it can be a program name with args.
10476set dummy $tool_basename; ac_word=$2
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10478$as_echo_n "checking for $ac_word... " >&6; }
10479if ${ac_cv_path_RM+:} false; then :
10480  $as_echo_n "(cached) " >&6
10481else
10482  case $RM in
10483  [\\/]* | ?:[\\/]*)
10484  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10485  ;;
10486  *)
10487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10488for as_dir in $PATH
10489do
10490  IFS=$as_save_IFS
10491  test -z "$as_dir" && as_dir=.
10492    for ac_exec_ext in '' $ac_executable_extensions; do
10493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10494    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10496    break 2
10497  fi
10498done
10499  done
10500IFS=$as_save_IFS
10501
10502  ;;
10503esac
10504fi
10505RM=$ac_cv_path_RM
10506if test -n "$RM"; then
10507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10508$as_echo "$RM" >&6; }
10509else
10510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511$as_echo "no" >&6; }
10512fi
10513
10514
10515          if test "x$RM" = x; then
10516            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10517          fi
10518        else
10519          # Otherwise we believe it is a complete path. Use it as it is.
10520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10521$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10522          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10523$as_echo_n "checking for RM... " >&6; }
10524          if test ! -x "$tool_specified"; then
10525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10526$as_echo "not found" >&6; }
10527            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10528          fi
10529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10530$as_echo "$tool_specified" >&6; }
10531        fi
10532      fi
10533    fi
10534
10535  fi
10536
10537
10538
10539  if test "x$RM" = x; then
10540    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10541  fi
10542
10543
10544
10545
10546
10547  # Publish this variable in the help.
10548
10549
10550  if [ -z "${RMDIR+x}" ]; then
10551    # The variable is not set by user, try to locate tool using the code snippet
10552    for ac_prog in rmdir
10553do
10554  # Extract the first word of "$ac_prog", so it can be a program name with args.
10555set dummy $ac_prog; ac_word=$2
10556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10557$as_echo_n "checking for $ac_word... " >&6; }
10558if ${ac_cv_path_RMDIR+:} false; then :
10559  $as_echo_n "(cached) " >&6
10560else
10561  case $RMDIR in
10562  [\\/]* | ?:[\\/]*)
10563  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10564  ;;
10565  *)
10566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10567for as_dir in $PATH
10568do
10569  IFS=$as_save_IFS
10570  test -z "$as_dir" && as_dir=.
10571    for ac_exec_ext in '' $ac_executable_extensions; do
10572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10573    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10575    break 2
10576  fi
10577done
10578  done
10579IFS=$as_save_IFS
10580
10581  ;;
10582esac
10583fi
10584RMDIR=$ac_cv_path_RMDIR
10585if test -n "$RMDIR"; then
10586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10587$as_echo "$RMDIR" >&6; }
10588else
10589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10590$as_echo "no" >&6; }
10591fi
10592
10593
10594  test -n "$RMDIR" && break
10595done
10596
10597  else
10598    # The variable is set, but is it from the command line or the environment?
10599
10600    # Try to remove the string !RMDIR! from our list.
10601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10603      # If it failed, the variable was not from the command line. Ignore it,
10604      # but warn the user (except for BASH, which is always set by the calling BASH).
10605      if test "xRMDIR" != xBASH; then
10606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10607$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10608      fi
10609      # Try to locate tool using the code snippet
10610      for ac_prog in rmdir
10611do
10612  # Extract the first word of "$ac_prog", so it can be a program name with args.
10613set dummy $ac_prog; ac_word=$2
10614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10615$as_echo_n "checking for $ac_word... " >&6; }
10616if ${ac_cv_path_RMDIR+:} false; then :
10617  $as_echo_n "(cached) " >&6
10618else
10619  case $RMDIR in
10620  [\\/]* | ?:[\\/]*)
10621  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10622  ;;
10623  *)
10624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10625for as_dir in $PATH
10626do
10627  IFS=$as_save_IFS
10628  test -z "$as_dir" && as_dir=.
10629    for ac_exec_ext in '' $ac_executable_extensions; do
10630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10631    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10633    break 2
10634  fi
10635done
10636  done
10637IFS=$as_save_IFS
10638
10639  ;;
10640esac
10641fi
10642RMDIR=$ac_cv_path_RMDIR
10643if test -n "$RMDIR"; then
10644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10645$as_echo "$RMDIR" >&6; }
10646else
10647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648$as_echo "no" >&6; }
10649fi
10650
10651
10652  test -n "$RMDIR" && break
10653done
10654
10655    else
10656      # If it succeeded, then it was overridden by the user. We will use it
10657      # for the tool.
10658
10659      # First remove it from the list of overridden variables, so we can test
10660      # for unknown variables in the end.
10661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10662
10663      # Check if we try to supply an empty value
10664      if test "x$RMDIR" = x; then
10665        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10666$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10668$as_echo_n "checking for RMDIR... " >&6; }
10669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10670$as_echo "disabled" >&6; }
10671      else
10672        # Check if the provided tool contains a complete path.
10673        tool_specified="$RMDIR"
10674        tool_basename="${tool_specified##*/}"
10675        if test "x$tool_basename" = "x$tool_specified"; then
10676          # A command without a complete path is provided, search $PATH.
10677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10678$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10679          # Extract the first word of "$tool_basename", so it can be a program name with args.
10680set dummy $tool_basename; ac_word=$2
10681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10682$as_echo_n "checking for $ac_word... " >&6; }
10683if ${ac_cv_path_RMDIR+:} false; then :
10684  $as_echo_n "(cached) " >&6
10685else
10686  case $RMDIR in
10687  [\\/]* | ?:[\\/]*)
10688  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10689  ;;
10690  *)
10691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10692for as_dir in $PATH
10693do
10694  IFS=$as_save_IFS
10695  test -z "$as_dir" && as_dir=.
10696    for ac_exec_ext in '' $ac_executable_extensions; do
10697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10698    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10700    break 2
10701  fi
10702done
10703  done
10704IFS=$as_save_IFS
10705
10706  ;;
10707esac
10708fi
10709RMDIR=$ac_cv_path_RMDIR
10710if test -n "$RMDIR"; then
10711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10712$as_echo "$RMDIR" >&6; }
10713else
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
10716fi
10717
10718
10719          if test "x$RMDIR" = x; then
10720            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10721          fi
10722        else
10723          # Otherwise we believe it is a complete path. Use it as it is.
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10725$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10726          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10727$as_echo_n "checking for RMDIR... " >&6; }
10728          if test ! -x "$tool_specified"; then
10729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10730$as_echo "not found" >&6; }
10731            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10732          fi
10733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10734$as_echo "$tool_specified" >&6; }
10735        fi
10736      fi
10737    fi
10738
10739  fi
10740
10741
10742
10743  if test "x$RMDIR" = x; then
10744    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10745  fi
10746
10747
10748
10749
10750
10751  # Publish this variable in the help.
10752
10753
10754  if [ -z "${SH+x}" ]; then
10755    # The variable is not set by user, try to locate tool using the code snippet
10756    for ac_prog in sh
10757do
10758  # Extract the first word of "$ac_prog", so it can be a program name with args.
10759set dummy $ac_prog; ac_word=$2
10760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10761$as_echo_n "checking for $ac_word... " >&6; }
10762if ${ac_cv_path_SH+:} false; then :
10763  $as_echo_n "(cached) " >&6
10764else
10765  case $SH in
10766  [\\/]* | ?:[\\/]*)
10767  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10768  ;;
10769  *)
10770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10771for as_dir in $PATH
10772do
10773  IFS=$as_save_IFS
10774  test -z "$as_dir" && as_dir=.
10775    for ac_exec_ext in '' $ac_executable_extensions; do
10776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10777    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10779    break 2
10780  fi
10781done
10782  done
10783IFS=$as_save_IFS
10784
10785  ;;
10786esac
10787fi
10788SH=$ac_cv_path_SH
10789if test -n "$SH"; then
10790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10791$as_echo "$SH" >&6; }
10792else
10793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794$as_echo "no" >&6; }
10795fi
10796
10797
10798  test -n "$SH" && break
10799done
10800
10801  else
10802    # The variable is set, but is it from the command line or the environment?
10803
10804    # Try to remove the string !SH! from our list.
10805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10807      # If it failed, the variable was not from the command line. Ignore it,
10808      # but warn the user (except for BASH, which is always set by the calling BASH).
10809      if test "xSH" != xBASH; then
10810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10811$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10812      fi
10813      # Try to locate tool using the code snippet
10814      for ac_prog in sh
10815do
10816  # Extract the first word of "$ac_prog", so it can be a program name with args.
10817set dummy $ac_prog; ac_word=$2
10818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10819$as_echo_n "checking for $ac_word... " >&6; }
10820if ${ac_cv_path_SH+:} false; then :
10821  $as_echo_n "(cached) " >&6
10822else
10823  case $SH in
10824  [\\/]* | ?:[\\/]*)
10825  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10826  ;;
10827  *)
10828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10829for as_dir in $PATH
10830do
10831  IFS=$as_save_IFS
10832  test -z "$as_dir" && as_dir=.
10833    for ac_exec_ext in '' $ac_executable_extensions; do
10834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10835    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10837    break 2
10838  fi
10839done
10840  done
10841IFS=$as_save_IFS
10842
10843  ;;
10844esac
10845fi
10846SH=$ac_cv_path_SH
10847if test -n "$SH"; then
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10849$as_echo "$SH" >&6; }
10850else
10851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10852$as_echo "no" >&6; }
10853fi
10854
10855
10856  test -n "$SH" && break
10857done
10858
10859    else
10860      # If it succeeded, then it was overridden by the user. We will use it
10861      # for the tool.
10862
10863      # First remove it from the list of overridden variables, so we can test
10864      # for unknown variables in the end.
10865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10866
10867      # Check if we try to supply an empty value
10868      if test "x$SH" = x; then
10869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10870$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10872$as_echo_n "checking for SH... " >&6; }
10873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10874$as_echo "disabled" >&6; }
10875      else
10876        # Check if the provided tool contains a complete path.
10877        tool_specified="$SH"
10878        tool_basename="${tool_specified##*/}"
10879        if test "x$tool_basename" = "x$tool_specified"; then
10880          # A command without a complete path is provided, search $PATH.
10881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10882$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10883          # Extract the first word of "$tool_basename", so it can be a program name with args.
10884set dummy $tool_basename; ac_word=$2
10885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10886$as_echo_n "checking for $ac_word... " >&6; }
10887if ${ac_cv_path_SH+:} false; then :
10888  $as_echo_n "(cached) " >&6
10889else
10890  case $SH in
10891  [\\/]* | ?:[\\/]*)
10892  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10893  ;;
10894  *)
10895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10896for as_dir in $PATH
10897do
10898  IFS=$as_save_IFS
10899  test -z "$as_dir" && as_dir=.
10900    for ac_exec_ext in '' $ac_executable_extensions; do
10901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10902    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10904    break 2
10905  fi
10906done
10907  done
10908IFS=$as_save_IFS
10909
10910  ;;
10911esac
10912fi
10913SH=$ac_cv_path_SH
10914if test -n "$SH"; then
10915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10916$as_echo "$SH" >&6; }
10917else
10918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10919$as_echo "no" >&6; }
10920fi
10921
10922
10923          if test "x$SH" = x; then
10924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10925          fi
10926        else
10927          # Otherwise we believe it is a complete path. Use it as it is.
10928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10929$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10931$as_echo_n "checking for SH... " >&6; }
10932          if test ! -x "$tool_specified"; then
10933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10934$as_echo "not found" >&6; }
10935            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10936          fi
10937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10938$as_echo "$tool_specified" >&6; }
10939        fi
10940      fi
10941    fi
10942
10943  fi
10944
10945
10946
10947  if test "x$SH" = x; then
10948    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10949  fi
10950
10951
10952
10953
10954
10955  # Publish this variable in the help.
10956
10957
10958  if [ -z "${SORT+x}" ]; then
10959    # The variable is not set by user, try to locate tool using the code snippet
10960    for ac_prog in sort
10961do
10962  # Extract the first word of "$ac_prog", so it can be a program name with args.
10963set dummy $ac_prog; ac_word=$2
10964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10965$as_echo_n "checking for $ac_word... " >&6; }
10966if ${ac_cv_path_SORT+:} false; then :
10967  $as_echo_n "(cached) " >&6
10968else
10969  case $SORT in
10970  [\\/]* | ?:[\\/]*)
10971  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10972  ;;
10973  *)
10974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10975for as_dir in $PATH
10976do
10977  IFS=$as_save_IFS
10978  test -z "$as_dir" && as_dir=.
10979    for ac_exec_ext in '' $ac_executable_extensions; do
10980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10981    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10983    break 2
10984  fi
10985done
10986  done
10987IFS=$as_save_IFS
10988
10989  ;;
10990esac
10991fi
10992SORT=$ac_cv_path_SORT
10993if test -n "$SORT"; then
10994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10995$as_echo "$SORT" >&6; }
10996else
10997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10998$as_echo "no" >&6; }
10999fi
11000
11001
11002  test -n "$SORT" && break
11003done
11004
11005  else
11006    # The variable is set, but is it from the command line or the environment?
11007
11008    # Try to remove the string !SORT! from our list.
11009    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11010    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11011      # If it failed, the variable was not from the command line. Ignore it,
11012      # but warn the user (except for BASH, which is always set by the calling BASH).
11013      if test "xSORT" != xBASH; then
11014        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11015$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11016      fi
11017      # Try to locate tool using the code snippet
11018      for ac_prog in sort
11019do
11020  # Extract the first word of "$ac_prog", so it can be a program name with args.
11021set dummy $ac_prog; ac_word=$2
11022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11023$as_echo_n "checking for $ac_word... " >&6; }
11024if ${ac_cv_path_SORT+:} false; then :
11025  $as_echo_n "(cached) " >&6
11026else
11027  case $SORT in
11028  [\\/]* | ?:[\\/]*)
11029  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11030  ;;
11031  *)
11032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11033for as_dir in $PATH
11034do
11035  IFS=$as_save_IFS
11036  test -z "$as_dir" && as_dir=.
11037    for ac_exec_ext in '' $ac_executable_extensions; do
11038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11039    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11041    break 2
11042  fi
11043done
11044  done
11045IFS=$as_save_IFS
11046
11047  ;;
11048esac
11049fi
11050SORT=$ac_cv_path_SORT
11051if test -n "$SORT"; then
11052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11053$as_echo "$SORT" >&6; }
11054else
11055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11056$as_echo "no" >&6; }
11057fi
11058
11059
11060  test -n "$SORT" && break
11061done
11062
11063    else
11064      # If it succeeded, then it was overridden by the user. We will use it
11065      # for the tool.
11066
11067      # First remove it from the list of overridden variables, so we can test
11068      # for unknown variables in the end.
11069      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11070
11071      # Check if we try to supply an empty value
11072      if test "x$SORT" = x; then
11073        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11074$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11075        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11076$as_echo_n "checking for SORT... " >&6; }
11077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11078$as_echo "disabled" >&6; }
11079      else
11080        # Check if the provided tool contains a complete path.
11081        tool_specified="$SORT"
11082        tool_basename="${tool_specified##*/}"
11083        if test "x$tool_basename" = "x$tool_specified"; then
11084          # A command without a complete path is provided, search $PATH.
11085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11086$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11087          # Extract the first word of "$tool_basename", so it can be a program name with args.
11088set dummy $tool_basename; ac_word=$2
11089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11090$as_echo_n "checking for $ac_word... " >&6; }
11091if ${ac_cv_path_SORT+:} false; then :
11092  $as_echo_n "(cached) " >&6
11093else
11094  case $SORT in
11095  [\\/]* | ?:[\\/]*)
11096  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11097  ;;
11098  *)
11099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11100for as_dir in $PATH
11101do
11102  IFS=$as_save_IFS
11103  test -z "$as_dir" && as_dir=.
11104    for ac_exec_ext in '' $ac_executable_extensions; do
11105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11106    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11108    break 2
11109  fi
11110done
11111  done
11112IFS=$as_save_IFS
11113
11114  ;;
11115esac
11116fi
11117SORT=$ac_cv_path_SORT
11118if test -n "$SORT"; then
11119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11120$as_echo "$SORT" >&6; }
11121else
11122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11123$as_echo "no" >&6; }
11124fi
11125
11126
11127          if test "x$SORT" = x; then
11128            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11129          fi
11130        else
11131          # Otherwise we believe it is a complete path. Use it as it is.
11132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11133$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11134          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11135$as_echo_n "checking for SORT... " >&6; }
11136          if test ! -x "$tool_specified"; then
11137            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11138$as_echo "not found" >&6; }
11139            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11140          fi
11141          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11142$as_echo "$tool_specified" >&6; }
11143        fi
11144      fi
11145    fi
11146
11147  fi
11148
11149
11150
11151  if test "x$SORT" = x; then
11152    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11153  fi
11154
11155
11156
11157
11158
11159  # Publish this variable in the help.
11160
11161
11162  if [ -z "${TAIL+x}" ]; then
11163    # The variable is not set by user, try to locate tool using the code snippet
11164    for ac_prog in tail
11165do
11166  # Extract the first word of "$ac_prog", so it can be a program name with args.
11167set dummy $ac_prog; ac_word=$2
11168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11169$as_echo_n "checking for $ac_word... " >&6; }
11170if ${ac_cv_path_TAIL+:} false; then :
11171  $as_echo_n "(cached) " >&6
11172else
11173  case $TAIL in
11174  [\\/]* | ?:[\\/]*)
11175  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11176  ;;
11177  *)
11178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11179for as_dir in $PATH
11180do
11181  IFS=$as_save_IFS
11182  test -z "$as_dir" && as_dir=.
11183    for ac_exec_ext in '' $ac_executable_extensions; do
11184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11185    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11187    break 2
11188  fi
11189done
11190  done
11191IFS=$as_save_IFS
11192
11193  ;;
11194esac
11195fi
11196TAIL=$ac_cv_path_TAIL
11197if test -n "$TAIL"; then
11198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11199$as_echo "$TAIL" >&6; }
11200else
11201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202$as_echo "no" >&6; }
11203fi
11204
11205
11206  test -n "$TAIL" && break
11207done
11208
11209  else
11210    # The variable is set, but is it from the command line or the environment?
11211
11212    # Try to remove the string !TAIL! from our list.
11213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11215      # If it failed, the variable was not from the command line. Ignore it,
11216      # but warn the user (except for BASH, which is always set by the calling BASH).
11217      if test "xTAIL" != xBASH; then
11218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11219$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11220      fi
11221      # Try to locate tool using the code snippet
11222      for ac_prog in tail
11223do
11224  # Extract the first word of "$ac_prog", so it can be a program name with args.
11225set dummy $ac_prog; ac_word=$2
11226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11227$as_echo_n "checking for $ac_word... " >&6; }
11228if ${ac_cv_path_TAIL+:} false; then :
11229  $as_echo_n "(cached) " >&6
11230else
11231  case $TAIL in
11232  [\\/]* | ?:[\\/]*)
11233  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11234  ;;
11235  *)
11236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11237for as_dir in $PATH
11238do
11239  IFS=$as_save_IFS
11240  test -z "$as_dir" && as_dir=.
11241    for ac_exec_ext in '' $ac_executable_extensions; do
11242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11243    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11245    break 2
11246  fi
11247done
11248  done
11249IFS=$as_save_IFS
11250
11251  ;;
11252esac
11253fi
11254TAIL=$ac_cv_path_TAIL
11255if test -n "$TAIL"; then
11256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11257$as_echo "$TAIL" >&6; }
11258else
11259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11260$as_echo "no" >&6; }
11261fi
11262
11263
11264  test -n "$TAIL" && break
11265done
11266
11267    else
11268      # If it succeeded, then it was overridden by the user. We will use it
11269      # for the tool.
11270
11271      # First remove it from the list of overridden variables, so we can test
11272      # for unknown variables in the end.
11273      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11274
11275      # Check if we try to supply an empty value
11276      if test "x$TAIL" = x; then
11277        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11278$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11280$as_echo_n "checking for TAIL... " >&6; }
11281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11282$as_echo "disabled" >&6; }
11283      else
11284        # Check if the provided tool contains a complete path.
11285        tool_specified="$TAIL"
11286        tool_basename="${tool_specified##*/}"
11287        if test "x$tool_basename" = "x$tool_specified"; then
11288          # A command without a complete path is provided, search $PATH.
11289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11290$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11291          # Extract the first word of "$tool_basename", so it can be a program name with args.
11292set dummy $tool_basename; ac_word=$2
11293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11294$as_echo_n "checking for $ac_word... " >&6; }
11295if ${ac_cv_path_TAIL+:} false; then :
11296  $as_echo_n "(cached) " >&6
11297else
11298  case $TAIL in
11299  [\\/]* | ?:[\\/]*)
11300  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11301  ;;
11302  *)
11303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11304for as_dir in $PATH
11305do
11306  IFS=$as_save_IFS
11307  test -z "$as_dir" && as_dir=.
11308    for ac_exec_ext in '' $ac_executable_extensions; do
11309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11310    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11312    break 2
11313  fi
11314done
11315  done
11316IFS=$as_save_IFS
11317
11318  ;;
11319esac
11320fi
11321TAIL=$ac_cv_path_TAIL
11322if test -n "$TAIL"; then
11323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11324$as_echo "$TAIL" >&6; }
11325else
11326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
11328fi
11329
11330
11331          if test "x$TAIL" = x; then
11332            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11333          fi
11334        else
11335          # Otherwise we believe it is a complete path. Use it as it is.
11336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11337$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11338          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11339$as_echo_n "checking for TAIL... " >&6; }
11340          if test ! -x "$tool_specified"; then
11341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11342$as_echo "not found" >&6; }
11343            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11344          fi
11345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11346$as_echo "$tool_specified" >&6; }
11347        fi
11348      fi
11349    fi
11350
11351  fi
11352
11353
11354
11355  if test "x$TAIL" = x; then
11356    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11357  fi
11358
11359
11360
11361
11362
11363  # Publish this variable in the help.
11364
11365
11366  if [ -z "${TAR+x}" ]; then
11367    # The variable is not set by user, try to locate tool using the code snippet
11368    for ac_prog in gtar tar
11369do
11370  # Extract the first word of "$ac_prog", so it can be a program name with args.
11371set dummy $ac_prog; ac_word=$2
11372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11373$as_echo_n "checking for $ac_word... " >&6; }
11374if ${ac_cv_path_TAR+:} false; then :
11375  $as_echo_n "(cached) " >&6
11376else
11377  case $TAR in
11378  [\\/]* | ?:[\\/]*)
11379  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11380  ;;
11381  *)
11382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11383for as_dir in $PATH
11384do
11385  IFS=$as_save_IFS
11386  test -z "$as_dir" && as_dir=.
11387    for ac_exec_ext in '' $ac_executable_extensions; do
11388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11389    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11391    break 2
11392  fi
11393done
11394  done
11395IFS=$as_save_IFS
11396
11397  ;;
11398esac
11399fi
11400TAR=$ac_cv_path_TAR
11401if test -n "$TAR"; then
11402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11403$as_echo "$TAR" >&6; }
11404else
11405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11406$as_echo "no" >&6; }
11407fi
11408
11409
11410  test -n "$TAR" && break
11411done
11412
11413  else
11414    # The variable is set, but is it from the command line or the environment?
11415
11416    # Try to remove the string !TAR! from our list.
11417    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11418    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11419      # If it failed, the variable was not from the command line. Ignore it,
11420      # but warn the user (except for BASH, which is always set by the calling BASH).
11421      if test "xTAR" != xBASH; then
11422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11423$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11424      fi
11425      # Try to locate tool using the code snippet
11426      for ac_prog in gtar tar
11427do
11428  # Extract the first word of "$ac_prog", so it can be a program name with args.
11429set dummy $ac_prog; ac_word=$2
11430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11431$as_echo_n "checking for $ac_word... " >&6; }
11432if ${ac_cv_path_TAR+:} false; then :
11433  $as_echo_n "(cached) " >&6
11434else
11435  case $TAR in
11436  [\\/]* | ?:[\\/]*)
11437  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11438  ;;
11439  *)
11440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11441for as_dir in $PATH
11442do
11443  IFS=$as_save_IFS
11444  test -z "$as_dir" && as_dir=.
11445    for ac_exec_ext in '' $ac_executable_extensions; do
11446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11447    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11449    break 2
11450  fi
11451done
11452  done
11453IFS=$as_save_IFS
11454
11455  ;;
11456esac
11457fi
11458TAR=$ac_cv_path_TAR
11459if test -n "$TAR"; then
11460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11461$as_echo "$TAR" >&6; }
11462else
11463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
11465fi
11466
11467
11468  test -n "$TAR" && break
11469done
11470
11471    else
11472      # If it succeeded, then it was overridden by the user. We will use it
11473      # for the tool.
11474
11475      # First remove it from the list of overridden variables, so we can test
11476      # for unknown variables in the end.
11477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11478
11479      # Check if we try to supply an empty value
11480      if test "x$TAR" = x; then
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11482$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11484$as_echo_n "checking for TAR... " >&6; }
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11486$as_echo "disabled" >&6; }
11487      else
11488        # Check if the provided tool contains a complete path.
11489        tool_specified="$TAR"
11490        tool_basename="${tool_specified##*/}"
11491        if test "x$tool_basename" = "x$tool_specified"; then
11492          # A command without a complete path is provided, search $PATH.
11493          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11494$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11495          # Extract the first word of "$tool_basename", so it can be a program name with args.
11496set dummy $tool_basename; ac_word=$2
11497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11498$as_echo_n "checking for $ac_word... " >&6; }
11499if ${ac_cv_path_TAR+:} false; then :
11500  $as_echo_n "(cached) " >&6
11501else
11502  case $TAR in
11503  [\\/]* | ?:[\\/]*)
11504  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11505  ;;
11506  *)
11507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11508for as_dir in $PATH
11509do
11510  IFS=$as_save_IFS
11511  test -z "$as_dir" && as_dir=.
11512    for ac_exec_ext in '' $ac_executable_extensions; do
11513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11514    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11516    break 2
11517  fi
11518done
11519  done
11520IFS=$as_save_IFS
11521
11522  ;;
11523esac
11524fi
11525TAR=$ac_cv_path_TAR
11526if test -n "$TAR"; then
11527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11528$as_echo "$TAR" >&6; }
11529else
11530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531$as_echo "no" >&6; }
11532fi
11533
11534
11535          if test "x$TAR" = x; then
11536            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11537          fi
11538        else
11539          # Otherwise we believe it is a complete path. Use it as it is.
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11541$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11542          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11543$as_echo_n "checking for TAR... " >&6; }
11544          if test ! -x "$tool_specified"; then
11545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11546$as_echo "not found" >&6; }
11547            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11548          fi
11549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11550$as_echo "$tool_specified" >&6; }
11551        fi
11552      fi
11553    fi
11554
11555  fi
11556
11557
11558
11559  if test "x$TAR" = x; then
11560    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11561  fi
11562
11563
11564
11565
11566
11567  # Publish this variable in the help.
11568
11569
11570  if [ -z "${TEE+x}" ]; then
11571    # The variable is not set by user, try to locate tool using the code snippet
11572    for ac_prog in tee
11573do
11574  # Extract the first word of "$ac_prog", so it can be a program name with args.
11575set dummy $ac_prog; ac_word=$2
11576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11577$as_echo_n "checking for $ac_word... " >&6; }
11578if ${ac_cv_path_TEE+:} false; then :
11579  $as_echo_n "(cached) " >&6
11580else
11581  case $TEE in
11582  [\\/]* | ?:[\\/]*)
11583  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11584  ;;
11585  *)
11586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11587for as_dir in $PATH
11588do
11589  IFS=$as_save_IFS
11590  test -z "$as_dir" && as_dir=.
11591    for ac_exec_ext in '' $ac_executable_extensions; do
11592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11593    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11595    break 2
11596  fi
11597done
11598  done
11599IFS=$as_save_IFS
11600
11601  ;;
11602esac
11603fi
11604TEE=$ac_cv_path_TEE
11605if test -n "$TEE"; then
11606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11607$as_echo "$TEE" >&6; }
11608else
11609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610$as_echo "no" >&6; }
11611fi
11612
11613
11614  test -n "$TEE" && break
11615done
11616
11617  else
11618    # The variable is set, but is it from the command line or the environment?
11619
11620    # Try to remove the string !TEE! from our list.
11621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11623      # If it failed, the variable was not from the command line. Ignore it,
11624      # but warn the user (except for BASH, which is always set by the calling BASH).
11625      if test "xTEE" != xBASH; then
11626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11627$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11628      fi
11629      # Try to locate tool using the code snippet
11630      for ac_prog in tee
11631do
11632  # Extract the first word of "$ac_prog", so it can be a program name with args.
11633set dummy $ac_prog; ac_word=$2
11634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11635$as_echo_n "checking for $ac_word... " >&6; }
11636if ${ac_cv_path_TEE+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  case $TEE in
11640  [\\/]* | ?:[\\/]*)
11641  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11642  ;;
11643  *)
11644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11645for as_dir in $PATH
11646do
11647  IFS=$as_save_IFS
11648  test -z "$as_dir" && as_dir=.
11649    for ac_exec_ext in '' $ac_executable_extensions; do
11650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11651    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11653    break 2
11654  fi
11655done
11656  done
11657IFS=$as_save_IFS
11658
11659  ;;
11660esac
11661fi
11662TEE=$ac_cv_path_TEE
11663if test -n "$TEE"; then
11664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11665$as_echo "$TEE" >&6; }
11666else
11667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11668$as_echo "no" >&6; }
11669fi
11670
11671
11672  test -n "$TEE" && break
11673done
11674
11675    else
11676      # If it succeeded, then it was overridden by the user. We will use it
11677      # for the tool.
11678
11679      # First remove it from the list of overridden variables, so we can test
11680      # for unknown variables in the end.
11681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11682
11683      # Check if we try to supply an empty value
11684      if test "x$TEE" = x; then
11685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11686$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11688$as_echo_n "checking for TEE... " >&6; }
11689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11690$as_echo "disabled" >&6; }
11691      else
11692        # Check if the provided tool contains a complete path.
11693        tool_specified="$TEE"
11694        tool_basename="${tool_specified##*/}"
11695        if test "x$tool_basename" = "x$tool_specified"; then
11696          # A command without a complete path is provided, search $PATH.
11697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11698$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11699          # Extract the first word of "$tool_basename", so it can be a program name with args.
11700set dummy $tool_basename; ac_word=$2
11701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11702$as_echo_n "checking for $ac_word... " >&6; }
11703if ${ac_cv_path_TEE+:} false; then :
11704  $as_echo_n "(cached) " >&6
11705else
11706  case $TEE in
11707  [\\/]* | ?:[\\/]*)
11708  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11709  ;;
11710  *)
11711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11712for as_dir in $PATH
11713do
11714  IFS=$as_save_IFS
11715  test -z "$as_dir" && as_dir=.
11716    for ac_exec_ext in '' $ac_executable_extensions; do
11717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11718    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11720    break 2
11721  fi
11722done
11723  done
11724IFS=$as_save_IFS
11725
11726  ;;
11727esac
11728fi
11729TEE=$ac_cv_path_TEE
11730if test -n "$TEE"; then
11731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11732$as_echo "$TEE" >&6; }
11733else
11734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735$as_echo "no" >&6; }
11736fi
11737
11738
11739          if test "x$TEE" = x; then
11740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11741          fi
11742        else
11743          # Otherwise we believe it is a complete path. Use it as it is.
11744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11745$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11747$as_echo_n "checking for TEE... " >&6; }
11748          if test ! -x "$tool_specified"; then
11749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11750$as_echo "not found" >&6; }
11751            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11752          fi
11753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11754$as_echo "$tool_specified" >&6; }
11755        fi
11756      fi
11757    fi
11758
11759  fi
11760
11761
11762
11763  if test "x$TEE" = x; then
11764    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11765  fi
11766
11767
11768
11769
11770
11771  # Publish this variable in the help.
11772
11773
11774  if [ -z "${TOUCH+x}" ]; then
11775    # The variable is not set by user, try to locate tool using the code snippet
11776    for ac_prog in touch
11777do
11778  # Extract the first word of "$ac_prog", so it can be a program name with args.
11779set dummy $ac_prog; ac_word=$2
11780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11781$as_echo_n "checking for $ac_word... " >&6; }
11782if ${ac_cv_path_TOUCH+:} false; then :
11783  $as_echo_n "(cached) " >&6
11784else
11785  case $TOUCH in
11786  [\\/]* | ?:[\\/]*)
11787  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11788  ;;
11789  *)
11790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11791for as_dir in $PATH
11792do
11793  IFS=$as_save_IFS
11794  test -z "$as_dir" && as_dir=.
11795    for ac_exec_ext in '' $ac_executable_extensions; do
11796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11797    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11799    break 2
11800  fi
11801done
11802  done
11803IFS=$as_save_IFS
11804
11805  ;;
11806esac
11807fi
11808TOUCH=$ac_cv_path_TOUCH
11809if test -n "$TOUCH"; then
11810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11811$as_echo "$TOUCH" >&6; }
11812else
11813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11814$as_echo "no" >&6; }
11815fi
11816
11817
11818  test -n "$TOUCH" && break
11819done
11820
11821  else
11822    # The variable is set, but is it from the command line or the environment?
11823
11824    # Try to remove the string !TOUCH! from our list.
11825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11827      # If it failed, the variable was not from the command line. Ignore it,
11828      # but warn the user (except for BASH, which is always set by the calling BASH).
11829      if test "xTOUCH" != xBASH; then
11830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11831$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11832      fi
11833      # Try to locate tool using the code snippet
11834      for ac_prog in touch
11835do
11836  # Extract the first word of "$ac_prog", so it can be a program name with args.
11837set dummy $ac_prog; ac_word=$2
11838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11839$as_echo_n "checking for $ac_word... " >&6; }
11840if ${ac_cv_path_TOUCH+:} false; then :
11841  $as_echo_n "(cached) " >&6
11842else
11843  case $TOUCH in
11844  [\\/]* | ?:[\\/]*)
11845  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11846  ;;
11847  *)
11848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11849for as_dir in $PATH
11850do
11851  IFS=$as_save_IFS
11852  test -z "$as_dir" && as_dir=.
11853    for ac_exec_ext in '' $ac_executable_extensions; do
11854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11855    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11857    break 2
11858  fi
11859done
11860  done
11861IFS=$as_save_IFS
11862
11863  ;;
11864esac
11865fi
11866TOUCH=$ac_cv_path_TOUCH
11867if test -n "$TOUCH"; then
11868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11869$as_echo "$TOUCH" >&6; }
11870else
11871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11872$as_echo "no" >&6; }
11873fi
11874
11875
11876  test -n "$TOUCH" && break
11877done
11878
11879    else
11880      # If it succeeded, then it was overridden by the user. We will use it
11881      # for the tool.
11882
11883      # First remove it from the list of overridden variables, so we can test
11884      # for unknown variables in the end.
11885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11886
11887      # Check if we try to supply an empty value
11888      if test "x$TOUCH" = x; then
11889        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11890$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11891        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11892$as_echo_n "checking for TOUCH... " >&6; }
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11894$as_echo "disabled" >&6; }
11895      else
11896        # Check if the provided tool contains a complete path.
11897        tool_specified="$TOUCH"
11898        tool_basename="${tool_specified##*/}"
11899        if test "x$tool_basename" = "x$tool_specified"; then
11900          # A command without a complete path is provided, search $PATH.
11901          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11902$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11903          # Extract the first word of "$tool_basename", so it can be a program name with args.
11904set dummy $tool_basename; ac_word=$2
11905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11906$as_echo_n "checking for $ac_word... " >&6; }
11907if ${ac_cv_path_TOUCH+:} false; then :
11908  $as_echo_n "(cached) " >&6
11909else
11910  case $TOUCH in
11911  [\\/]* | ?:[\\/]*)
11912  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11913  ;;
11914  *)
11915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11916for as_dir in $PATH
11917do
11918  IFS=$as_save_IFS
11919  test -z "$as_dir" && as_dir=.
11920    for ac_exec_ext in '' $ac_executable_extensions; do
11921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11922    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11924    break 2
11925  fi
11926done
11927  done
11928IFS=$as_save_IFS
11929
11930  ;;
11931esac
11932fi
11933TOUCH=$ac_cv_path_TOUCH
11934if test -n "$TOUCH"; then
11935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11936$as_echo "$TOUCH" >&6; }
11937else
11938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11939$as_echo "no" >&6; }
11940fi
11941
11942
11943          if test "x$TOUCH" = x; then
11944            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11945          fi
11946        else
11947          # Otherwise we believe it is a complete path. Use it as it is.
11948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11949$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11950          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11951$as_echo_n "checking for TOUCH... " >&6; }
11952          if test ! -x "$tool_specified"; then
11953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11954$as_echo "not found" >&6; }
11955            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11956          fi
11957          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11958$as_echo "$tool_specified" >&6; }
11959        fi
11960      fi
11961    fi
11962
11963  fi
11964
11965
11966
11967  if test "x$TOUCH" = x; then
11968    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11969  fi
11970
11971
11972
11973
11974
11975  # Publish this variable in the help.
11976
11977
11978  if [ -z "${TR+x}" ]; then
11979    # The variable is not set by user, try to locate tool using the code snippet
11980    for ac_prog in tr
11981do
11982  # Extract the first word of "$ac_prog", so it can be a program name with args.
11983set dummy $ac_prog; ac_word=$2
11984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11985$as_echo_n "checking for $ac_word... " >&6; }
11986if ${ac_cv_path_TR+:} false; then :
11987  $as_echo_n "(cached) " >&6
11988else
11989  case $TR in
11990  [\\/]* | ?:[\\/]*)
11991  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11992  ;;
11993  *)
11994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11995for as_dir in $PATH
11996do
11997  IFS=$as_save_IFS
11998  test -z "$as_dir" && as_dir=.
11999    for ac_exec_ext in '' $ac_executable_extensions; do
12000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12001    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12003    break 2
12004  fi
12005done
12006  done
12007IFS=$as_save_IFS
12008
12009  ;;
12010esac
12011fi
12012TR=$ac_cv_path_TR
12013if test -n "$TR"; then
12014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12015$as_echo "$TR" >&6; }
12016else
12017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12018$as_echo "no" >&6; }
12019fi
12020
12021
12022  test -n "$TR" && break
12023done
12024
12025  else
12026    # The variable is set, but is it from the command line or the environment?
12027
12028    # Try to remove the string !TR! from our list.
12029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12031      # If it failed, the variable was not from the command line. Ignore it,
12032      # but warn the user (except for BASH, which is always set by the calling BASH).
12033      if test "xTR" != xBASH; then
12034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12035$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12036      fi
12037      # Try to locate tool using the code snippet
12038      for ac_prog in tr
12039do
12040  # Extract the first word of "$ac_prog", so it can be a program name with args.
12041set dummy $ac_prog; ac_word=$2
12042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12043$as_echo_n "checking for $ac_word... " >&6; }
12044if ${ac_cv_path_TR+:} false; then :
12045  $as_echo_n "(cached) " >&6
12046else
12047  case $TR in
12048  [\\/]* | ?:[\\/]*)
12049  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12050  ;;
12051  *)
12052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12053for as_dir in $PATH
12054do
12055  IFS=$as_save_IFS
12056  test -z "$as_dir" && as_dir=.
12057    for ac_exec_ext in '' $ac_executable_extensions; do
12058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12059    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12061    break 2
12062  fi
12063done
12064  done
12065IFS=$as_save_IFS
12066
12067  ;;
12068esac
12069fi
12070TR=$ac_cv_path_TR
12071if test -n "$TR"; then
12072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12073$as_echo "$TR" >&6; }
12074else
12075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12076$as_echo "no" >&6; }
12077fi
12078
12079
12080  test -n "$TR" && break
12081done
12082
12083    else
12084      # If it succeeded, then it was overridden by the user. We will use it
12085      # for the tool.
12086
12087      # First remove it from the list of overridden variables, so we can test
12088      # for unknown variables in the end.
12089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12090
12091      # Check if we try to supply an empty value
12092      if test "x$TR" = x; then
12093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12094$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12096$as_echo_n "checking for TR... " >&6; }
12097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12098$as_echo "disabled" >&6; }
12099      else
12100        # Check if the provided tool contains a complete path.
12101        tool_specified="$TR"
12102        tool_basename="${tool_specified##*/}"
12103        if test "x$tool_basename" = "x$tool_specified"; then
12104          # A command without a complete path is provided, search $PATH.
12105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12106$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12107          # Extract the first word of "$tool_basename", so it can be a program name with args.
12108set dummy $tool_basename; ac_word=$2
12109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12110$as_echo_n "checking for $ac_word... " >&6; }
12111if ${ac_cv_path_TR+:} false; then :
12112  $as_echo_n "(cached) " >&6
12113else
12114  case $TR in
12115  [\\/]* | ?:[\\/]*)
12116  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12117  ;;
12118  *)
12119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12120for as_dir in $PATH
12121do
12122  IFS=$as_save_IFS
12123  test -z "$as_dir" && as_dir=.
12124    for ac_exec_ext in '' $ac_executable_extensions; do
12125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12126    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12128    break 2
12129  fi
12130done
12131  done
12132IFS=$as_save_IFS
12133
12134  ;;
12135esac
12136fi
12137TR=$ac_cv_path_TR
12138if test -n "$TR"; then
12139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12140$as_echo "$TR" >&6; }
12141else
12142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12143$as_echo "no" >&6; }
12144fi
12145
12146
12147          if test "x$TR" = x; then
12148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12149          fi
12150        else
12151          # Otherwise we believe it is a complete path. Use it as it is.
12152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12153$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12155$as_echo_n "checking for TR... " >&6; }
12156          if test ! -x "$tool_specified"; then
12157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12158$as_echo "not found" >&6; }
12159            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12160          fi
12161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12162$as_echo "$tool_specified" >&6; }
12163        fi
12164      fi
12165    fi
12166
12167  fi
12168
12169
12170
12171  if test "x$TR" = x; then
12172    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12173  fi
12174
12175
12176
12177
12178
12179  # Publish this variable in the help.
12180
12181
12182  if [ -z "${UNAME+x}" ]; then
12183    # The variable is not set by user, try to locate tool using the code snippet
12184    for ac_prog in uname
12185do
12186  # Extract the first word of "$ac_prog", so it can be a program name with args.
12187set dummy $ac_prog; ac_word=$2
12188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12189$as_echo_n "checking for $ac_word... " >&6; }
12190if ${ac_cv_path_UNAME+:} false; then :
12191  $as_echo_n "(cached) " >&6
12192else
12193  case $UNAME in
12194  [\\/]* | ?:[\\/]*)
12195  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12196  ;;
12197  *)
12198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12199for as_dir in $PATH
12200do
12201  IFS=$as_save_IFS
12202  test -z "$as_dir" && as_dir=.
12203    for ac_exec_ext in '' $ac_executable_extensions; do
12204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12205    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12207    break 2
12208  fi
12209done
12210  done
12211IFS=$as_save_IFS
12212
12213  ;;
12214esac
12215fi
12216UNAME=$ac_cv_path_UNAME
12217if test -n "$UNAME"; then
12218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12219$as_echo "$UNAME" >&6; }
12220else
12221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12222$as_echo "no" >&6; }
12223fi
12224
12225
12226  test -n "$UNAME" && break
12227done
12228
12229  else
12230    # The variable is set, but is it from the command line or the environment?
12231
12232    # Try to remove the string !UNAME! from our list.
12233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12235      # If it failed, the variable was not from the command line. Ignore it,
12236      # but warn the user (except for BASH, which is always set by the calling BASH).
12237      if test "xUNAME" != xBASH; then
12238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12239$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12240      fi
12241      # Try to locate tool using the code snippet
12242      for ac_prog in uname
12243do
12244  # Extract the first word of "$ac_prog", so it can be a program name with args.
12245set dummy $ac_prog; ac_word=$2
12246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12247$as_echo_n "checking for $ac_word... " >&6; }
12248if ${ac_cv_path_UNAME+:} false; then :
12249  $as_echo_n "(cached) " >&6
12250else
12251  case $UNAME in
12252  [\\/]* | ?:[\\/]*)
12253  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12254  ;;
12255  *)
12256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12257for as_dir in $PATH
12258do
12259  IFS=$as_save_IFS
12260  test -z "$as_dir" && as_dir=.
12261    for ac_exec_ext in '' $ac_executable_extensions; do
12262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12263    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12265    break 2
12266  fi
12267done
12268  done
12269IFS=$as_save_IFS
12270
12271  ;;
12272esac
12273fi
12274UNAME=$ac_cv_path_UNAME
12275if test -n "$UNAME"; then
12276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12277$as_echo "$UNAME" >&6; }
12278else
12279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12280$as_echo "no" >&6; }
12281fi
12282
12283
12284  test -n "$UNAME" && break
12285done
12286
12287    else
12288      # If it succeeded, then it was overridden by the user. We will use it
12289      # for the tool.
12290
12291      # First remove it from the list of overridden variables, so we can test
12292      # for unknown variables in the end.
12293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12294
12295      # Check if we try to supply an empty value
12296      if test "x$UNAME" = x; then
12297        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12298$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12300$as_echo_n "checking for UNAME... " >&6; }
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12302$as_echo "disabled" >&6; }
12303      else
12304        # Check if the provided tool contains a complete path.
12305        tool_specified="$UNAME"
12306        tool_basename="${tool_specified##*/}"
12307        if test "x$tool_basename" = "x$tool_specified"; then
12308          # A command without a complete path is provided, search $PATH.
12309          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12310$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12311          # Extract the first word of "$tool_basename", so it can be a program name with args.
12312set dummy $tool_basename; ac_word=$2
12313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12314$as_echo_n "checking for $ac_word... " >&6; }
12315if ${ac_cv_path_UNAME+:} false; then :
12316  $as_echo_n "(cached) " >&6
12317else
12318  case $UNAME in
12319  [\\/]* | ?:[\\/]*)
12320  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12321  ;;
12322  *)
12323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12324for as_dir in $PATH
12325do
12326  IFS=$as_save_IFS
12327  test -z "$as_dir" && as_dir=.
12328    for ac_exec_ext in '' $ac_executable_extensions; do
12329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12330    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12332    break 2
12333  fi
12334done
12335  done
12336IFS=$as_save_IFS
12337
12338  ;;
12339esac
12340fi
12341UNAME=$ac_cv_path_UNAME
12342if test -n "$UNAME"; then
12343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12344$as_echo "$UNAME" >&6; }
12345else
12346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
12348fi
12349
12350
12351          if test "x$UNAME" = x; then
12352            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12353          fi
12354        else
12355          # Otherwise we believe it is a complete path. Use it as it is.
12356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12357$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12358          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12359$as_echo_n "checking for UNAME... " >&6; }
12360          if test ! -x "$tool_specified"; then
12361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12362$as_echo "not found" >&6; }
12363            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12364          fi
12365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12366$as_echo "$tool_specified" >&6; }
12367        fi
12368      fi
12369    fi
12370
12371  fi
12372
12373
12374
12375  if test "x$UNAME" = x; then
12376    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12377  fi
12378
12379
12380
12381
12382
12383  # Publish this variable in the help.
12384
12385
12386  if [ -z "${UNIQ+x}" ]; then
12387    # The variable is not set by user, try to locate tool using the code snippet
12388    for ac_prog in uniq
12389do
12390  # Extract the first word of "$ac_prog", so it can be a program name with args.
12391set dummy $ac_prog; ac_word=$2
12392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12393$as_echo_n "checking for $ac_word... " >&6; }
12394if ${ac_cv_path_UNIQ+:} false; then :
12395  $as_echo_n "(cached) " >&6
12396else
12397  case $UNIQ in
12398  [\\/]* | ?:[\\/]*)
12399  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12400  ;;
12401  *)
12402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12403for as_dir in $PATH
12404do
12405  IFS=$as_save_IFS
12406  test -z "$as_dir" && as_dir=.
12407    for ac_exec_ext in '' $ac_executable_extensions; do
12408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12409    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12411    break 2
12412  fi
12413done
12414  done
12415IFS=$as_save_IFS
12416
12417  ;;
12418esac
12419fi
12420UNIQ=$ac_cv_path_UNIQ
12421if test -n "$UNIQ"; then
12422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12423$as_echo "$UNIQ" >&6; }
12424else
12425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12426$as_echo "no" >&6; }
12427fi
12428
12429
12430  test -n "$UNIQ" && break
12431done
12432
12433  else
12434    # The variable is set, but is it from the command line or the environment?
12435
12436    # Try to remove the string !UNIQ! from our list.
12437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12439      # If it failed, the variable was not from the command line. Ignore it,
12440      # but warn the user (except for BASH, which is always set by the calling BASH).
12441      if test "xUNIQ" != xBASH; then
12442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12443$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12444      fi
12445      # Try to locate tool using the code snippet
12446      for ac_prog in uniq
12447do
12448  # Extract the first word of "$ac_prog", so it can be a program name with args.
12449set dummy $ac_prog; ac_word=$2
12450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12451$as_echo_n "checking for $ac_word... " >&6; }
12452if ${ac_cv_path_UNIQ+:} false; then :
12453  $as_echo_n "(cached) " >&6
12454else
12455  case $UNIQ in
12456  [\\/]* | ?:[\\/]*)
12457  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12458  ;;
12459  *)
12460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12461for as_dir in $PATH
12462do
12463  IFS=$as_save_IFS
12464  test -z "$as_dir" && as_dir=.
12465    for ac_exec_ext in '' $ac_executable_extensions; do
12466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12467    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12469    break 2
12470  fi
12471done
12472  done
12473IFS=$as_save_IFS
12474
12475  ;;
12476esac
12477fi
12478UNIQ=$ac_cv_path_UNIQ
12479if test -n "$UNIQ"; then
12480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12481$as_echo "$UNIQ" >&6; }
12482else
12483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12484$as_echo "no" >&6; }
12485fi
12486
12487
12488  test -n "$UNIQ" && break
12489done
12490
12491    else
12492      # If it succeeded, then it was overridden by the user. We will use it
12493      # for the tool.
12494
12495      # First remove it from the list of overridden variables, so we can test
12496      # for unknown variables in the end.
12497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12498
12499      # Check if we try to supply an empty value
12500      if test "x$UNIQ" = x; then
12501        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12502$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12503        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12504$as_echo_n "checking for UNIQ... " >&6; }
12505        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12506$as_echo "disabled" >&6; }
12507      else
12508        # Check if the provided tool contains a complete path.
12509        tool_specified="$UNIQ"
12510        tool_basename="${tool_specified##*/}"
12511        if test "x$tool_basename" = "x$tool_specified"; then
12512          # A command without a complete path is provided, search $PATH.
12513          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12514$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12515          # Extract the first word of "$tool_basename", so it can be a program name with args.
12516set dummy $tool_basename; ac_word=$2
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12518$as_echo_n "checking for $ac_word... " >&6; }
12519if ${ac_cv_path_UNIQ+:} false; then :
12520  $as_echo_n "(cached) " >&6
12521else
12522  case $UNIQ in
12523  [\\/]* | ?:[\\/]*)
12524  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12525  ;;
12526  *)
12527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12528for as_dir in $PATH
12529do
12530  IFS=$as_save_IFS
12531  test -z "$as_dir" && as_dir=.
12532    for ac_exec_ext in '' $ac_executable_extensions; do
12533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12534    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12536    break 2
12537  fi
12538done
12539  done
12540IFS=$as_save_IFS
12541
12542  ;;
12543esac
12544fi
12545UNIQ=$ac_cv_path_UNIQ
12546if test -n "$UNIQ"; then
12547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12548$as_echo "$UNIQ" >&6; }
12549else
12550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12551$as_echo "no" >&6; }
12552fi
12553
12554
12555          if test "x$UNIQ" = x; then
12556            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12557          fi
12558        else
12559          # Otherwise we believe it is a complete path. Use it as it is.
12560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12561$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12562          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12563$as_echo_n "checking for UNIQ... " >&6; }
12564          if test ! -x "$tool_specified"; then
12565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12566$as_echo "not found" >&6; }
12567            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12568          fi
12569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12570$as_echo "$tool_specified" >&6; }
12571        fi
12572      fi
12573    fi
12574
12575  fi
12576
12577
12578
12579  if test "x$UNIQ" = x; then
12580    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12581  fi
12582
12583
12584
12585
12586
12587  # Publish this variable in the help.
12588
12589
12590  if [ -z "${WC+x}" ]; then
12591    # The variable is not set by user, try to locate tool using the code snippet
12592    for ac_prog in wc
12593do
12594  # Extract the first word of "$ac_prog", so it can be a program name with args.
12595set dummy $ac_prog; ac_word=$2
12596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12597$as_echo_n "checking for $ac_word... " >&6; }
12598if ${ac_cv_path_WC+:} false; then :
12599  $as_echo_n "(cached) " >&6
12600else
12601  case $WC in
12602  [\\/]* | ?:[\\/]*)
12603  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12604  ;;
12605  *)
12606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12607for as_dir in $PATH
12608do
12609  IFS=$as_save_IFS
12610  test -z "$as_dir" && as_dir=.
12611    for ac_exec_ext in '' $ac_executable_extensions; do
12612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12613    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12615    break 2
12616  fi
12617done
12618  done
12619IFS=$as_save_IFS
12620
12621  ;;
12622esac
12623fi
12624WC=$ac_cv_path_WC
12625if test -n "$WC"; then
12626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12627$as_echo "$WC" >&6; }
12628else
12629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12630$as_echo "no" >&6; }
12631fi
12632
12633
12634  test -n "$WC" && break
12635done
12636
12637  else
12638    # The variable is set, but is it from the command line or the environment?
12639
12640    # Try to remove the string !WC! from our list.
12641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12643      # If it failed, the variable was not from the command line. Ignore it,
12644      # but warn the user (except for BASH, which is always set by the calling BASH).
12645      if test "xWC" != xBASH; then
12646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12647$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12648      fi
12649      # Try to locate tool using the code snippet
12650      for ac_prog in wc
12651do
12652  # Extract the first word of "$ac_prog", so it can be a program name with args.
12653set dummy $ac_prog; ac_word=$2
12654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12655$as_echo_n "checking for $ac_word... " >&6; }
12656if ${ac_cv_path_WC+:} false; then :
12657  $as_echo_n "(cached) " >&6
12658else
12659  case $WC in
12660  [\\/]* | ?:[\\/]*)
12661  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12662  ;;
12663  *)
12664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12665for as_dir in $PATH
12666do
12667  IFS=$as_save_IFS
12668  test -z "$as_dir" && as_dir=.
12669    for ac_exec_ext in '' $ac_executable_extensions; do
12670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12671    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12673    break 2
12674  fi
12675done
12676  done
12677IFS=$as_save_IFS
12678
12679  ;;
12680esac
12681fi
12682WC=$ac_cv_path_WC
12683if test -n "$WC"; then
12684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12685$as_echo "$WC" >&6; }
12686else
12687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688$as_echo "no" >&6; }
12689fi
12690
12691
12692  test -n "$WC" && break
12693done
12694
12695    else
12696      # If it succeeded, then it was overridden by the user. We will use it
12697      # for the tool.
12698
12699      # First remove it from the list of overridden variables, so we can test
12700      # for unknown variables in the end.
12701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12702
12703      # Check if we try to supply an empty value
12704      if test "x$WC" = x; then
12705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12706$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12708$as_echo_n "checking for WC... " >&6; }
12709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12710$as_echo "disabled" >&6; }
12711      else
12712        # Check if the provided tool contains a complete path.
12713        tool_specified="$WC"
12714        tool_basename="${tool_specified##*/}"
12715        if test "x$tool_basename" = "x$tool_specified"; then
12716          # A command without a complete path is provided, search $PATH.
12717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12718$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12719          # Extract the first word of "$tool_basename", so it can be a program name with args.
12720set dummy $tool_basename; ac_word=$2
12721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12722$as_echo_n "checking for $ac_word... " >&6; }
12723if ${ac_cv_path_WC+:} false; then :
12724  $as_echo_n "(cached) " >&6
12725else
12726  case $WC in
12727  [\\/]* | ?:[\\/]*)
12728  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12729  ;;
12730  *)
12731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12732for as_dir in $PATH
12733do
12734  IFS=$as_save_IFS
12735  test -z "$as_dir" && as_dir=.
12736    for ac_exec_ext in '' $ac_executable_extensions; do
12737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12738    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12740    break 2
12741  fi
12742done
12743  done
12744IFS=$as_save_IFS
12745
12746  ;;
12747esac
12748fi
12749WC=$ac_cv_path_WC
12750if test -n "$WC"; then
12751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12752$as_echo "$WC" >&6; }
12753else
12754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12755$as_echo "no" >&6; }
12756fi
12757
12758
12759          if test "x$WC" = x; then
12760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12761          fi
12762        else
12763          # Otherwise we believe it is a complete path. Use it as it is.
12764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12765$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12767$as_echo_n "checking for WC... " >&6; }
12768          if test ! -x "$tool_specified"; then
12769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12770$as_echo "not found" >&6; }
12771            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12772          fi
12773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12774$as_echo "$tool_specified" >&6; }
12775        fi
12776      fi
12777    fi
12778
12779  fi
12780
12781
12782
12783  if test "x$WC" = x; then
12784    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12785  fi
12786
12787
12788
12789
12790
12791  # Publish this variable in the help.
12792
12793
12794  if [ -z "${WHICH+x}" ]; then
12795    # The variable is not set by user, try to locate tool using the code snippet
12796    for ac_prog in which
12797do
12798  # Extract the first word of "$ac_prog", so it can be a program name with args.
12799set dummy $ac_prog; ac_word=$2
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12801$as_echo_n "checking for $ac_word... " >&6; }
12802if ${ac_cv_path_WHICH+:} false; then :
12803  $as_echo_n "(cached) " >&6
12804else
12805  case $WHICH in
12806  [\\/]* | ?:[\\/]*)
12807  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12808  ;;
12809  *)
12810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12811for as_dir in $PATH
12812do
12813  IFS=$as_save_IFS
12814  test -z "$as_dir" && as_dir=.
12815    for ac_exec_ext in '' $ac_executable_extensions; do
12816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12817    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12819    break 2
12820  fi
12821done
12822  done
12823IFS=$as_save_IFS
12824
12825  ;;
12826esac
12827fi
12828WHICH=$ac_cv_path_WHICH
12829if test -n "$WHICH"; then
12830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12831$as_echo "$WHICH" >&6; }
12832else
12833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12834$as_echo "no" >&6; }
12835fi
12836
12837
12838  test -n "$WHICH" && break
12839done
12840
12841  else
12842    # The variable is set, but is it from the command line or the environment?
12843
12844    # Try to remove the string !WHICH! from our list.
12845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12847      # If it failed, the variable was not from the command line. Ignore it,
12848      # but warn the user (except for BASH, which is always set by the calling BASH).
12849      if test "xWHICH" != xBASH; then
12850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12851$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12852      fi
12853      # Try to locate tool using the code snippet
12854      for ac_prog in which
12855do
12856  # Extract the first word of "$ac_prog", so it can be a program name with args.
12857set dummy $ac_prog; ac_word=$2
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12859$as_echo_n "checking for $ac_word... " >&6; }
12860if ${ac_cv_path_WHICH+:} false; then :
12861  $as_echo_n "(cached) " >&6
12862else
12863  case $WHICH in
12864  [\\/]* | ?:[\\/]*)
12865  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12866  ;;
12867  *)
12868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12869for as_dir in $PATH
12870do
12871  IFS=$as_save_IFS
12872  test -z "$as_dir" && as_dir=.
12873    for ac_exec_ext in '' $ac_executable_extensions; do
12874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12875    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12877    break 2
12878  fi
12879done
12880  done
12881IFS=$as_save_IFS
12882
12883  ;;
12884esac
12885fi
12886WHICH=$ac_cv_path_WHICH
12887if test -n "$WHICH"; then
12888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12889$as_echo "$WHICH" >&6; }
12890else
12891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12892$as_echo "no" >&6; }
12893fi
12894
12895
12896  test -n "$WHICH" && break
12897done
12898
12899    else
12900      # If it succeeded, then it was overridden by the user. We will use it
12901      # for the tool.
12902
12903      # First remove it from the list of overridden variables, so we can test
12904      # for unknown variables in the end.
12905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12906
12907      # Check if we try to supply an empty value
12908      if test "x$WHICH" = x; then
12909        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12910$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12912$as_echo_n "checking for WHICH... " >&6; }
12913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12914$as_echo "disabled" >&6; }
12915      else
12916        # Check if the provided tool contains a complete path.
12917        tool_specified="$WHICH"
12918        tool_basename="${tool_specified##*/}"
12919        if test "x$tool_basename" = "x$tool_specified"; then
12920          # A command without a complete path is provided, search $PATH.
12921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12922$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12923          # Extract the first word of "$tool_basename", so it can be a program name with args.
12924set dummy $tool_basename; ac_word=$2
12925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12926$as_echo_n "checking for $ac_word... " >&6; }
12927if ${ac_cv_path_WHICH+:} false; then :
12928  $as_echo_n "(cached) " >&6
12929else
12930  case $WHICH in
12931  [\\/]* | ?:[\\/]*)
12932  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12933  ;;
12934  *)
12935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12936for as_dir in $PATH
12937do
12938  IFS=$as_save_IFS
12939  test -z "$as_dir" && as_dir=.
12940    for ac_exec_ext in '' $ac_executable_extensions; do
12941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12942    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12944    break 2
12945  fi
12946done
12947  done
12948IFS=$as_save_IFS
12949
12950  ;;
12951esac
12952fi
12953WHICH=$ac_cv_path_WHICH
12954if test -n "$WHICH"; then
12955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12956$as_echo "$WHICH" >&6; }
12957else
12958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12959$as_echo "no" >&6; }
12960fi
12961
12962
12963          if test "x$WHICH" = x; then
12964            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12965          fi
12966        else
12967          # Otherwise we believe it is a complete path. Use it as it is.
12968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12969$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12970          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12971$as_echo_n "checking for WHICH... " >&6; }
12972          if test ! -x "$tool_specified"; then
12973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12974$as_echo "not found" >&6; }
12975            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12976          fi
12977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12978$as_echo "$tool_specified" >&6; }
12979        fi
12980      fi
12981    fi
12982
12983  fi
12984
12985
12986
12987  if test "x$WHICH" = x; then
12988    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12989  fi
12990
12991
12992
12993
12994
12995  # Publish this variable in the help.
12996
12997
12998  if [ -z "${XARGS+x}" ]; then
12999    # The variable is not set by user, try to locate tool using the code snippet
13000    for ac_prog in xargs
13001do
13002  # Extract the first word of "$ac_prog", so it can be a program name with args.
13003set dummy $ac_prog; ac_word=$2
13004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13005$as_echo_n "checking for $ac_word... " >&6; }
13006if ${ac_cv_path_XARGS+:} false; then :
13007  $as_echo_n "(cached) " >&6
13008else
13009  case $XARGS in
13010  [\\/]* | ?:[\\/]*)
13011  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13012  ;;
13013  *)
13014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13015for as_dir in $PATH
13016do
13017  IFS=$as_save_IFS
13018  test -z "$as_dir" && as_dir=.
13019    for ac_exec_ext in '' $ac_executable_extensions; do
13020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13021    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13023    break 2
13024  fi
13025done
13026  done
13027IFS=$as_save_IFS
13028
13029  ;;
13030esac
13031fi
13032XARGS=$ac_cv_path_XARGS
13033if test -n "$XARGS"; then
13034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13035$as_echo "$XARGS" >&6; }
13036else
13037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13038$as_echo "no" >&6; }
13039fi
13040
13041
13042  test -n "$XARGS" && break
13043done
13044
13045  else
13046    # The variable is set, but is it from the command line or the environment?
13047
13048    # Try to remove the string !XARGS! from our list.
13049    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13050    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13051      # If it failed, the variable was not from the command line. Ignore it,
13052      # but warn the user (except for BASH, which is always set by the calling BASH).
13053      if test "xXARGS" != xBASH; then
13054        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13055$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13056      fi
13057      # Try to locate tool using the code snippet
13058      for ac_prog in xargs
13059do
13060  # Extract the first word of "$ac_prog", so it can be a program name with args.
13061set dummy $ac_prog; ac_word=$2
13062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13063$as_echo_n "checking for $ac_word... " >&6; }
13064if ${ac_cv_path_XARGS+:} false; then :
13065  $as_echo_n "(cached) " >&6
13066else
13067  case $XARGS in
13068  [\\/]* | ?:[\\/]*)
13069  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13070  ;;
13071  *)
13072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13073for as_dir in $PATH
13074do
13075  IFS=$as_save_IFS
13076  test -z "$as_dir" && as_dir=.
13077    for ac_exec_ext in '' $ac_executable_extensions; do
13078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13079    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13081    break 2
13082  fi
13083done
13084  done
13085IFS=$as_save_IFS
13086
13087  ;;
13088esac
13089fi
13090XARGS=$ac_cv_path_XARGS
13091if test -n "$XARGS"; then
13092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13093$as_echo "$XARGS" >&6; }
13094else
13095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13096$as_echo "no" >&6; }
13097fi
13098
13099
13100  test -n "$XARGS" && break
13101done
13102
13103    else
13104      # If it succeeded, then it was overridden by the user. We will use it
13105      # for the tool.
13106
13107      # First remove it from the list of overridden variables, so we can test
13108      # for unknown variables in the end.
13109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13110
13111      # Check if we try to supply an empty value
13112      if test "x$XARGS" = x; then
13113        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13114$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13115        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13116$as_echo_n "checking for XARGS... " >&6; }
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13118$as_echo "disabled" >&6; }
13119      else
13120        # Check if the provided tool contains a complete path.
13121        tool_specified="$XARGS"
13122        tool_basename="${tool_specified##*/}"
13123        if test "x$tool_basename" = "x$tool_specified"; then
13124          # A command without a complete path is provided, search $PATH.
13125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13126$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13127          # Extract the first word of "$tool_basename", so it can be a program name with args.
13128set dummy $tool_basename; ac_word=$2
13129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13130$as_echo_n "checking for $ac_word... " >&6; }
13131if ${ac_cv_path_XARGS+:} false; then :
13132  $as_echo_n "(cached) " >&6
13133else
13134  case $XARGS in
13135  [\\/]* | ?:[\\/]*)
13136  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13137  ;;
13138  *)
13139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13140for as_dir in $PATH
13141do
13142  IFS=$as_save_IFS
13143  test -z "$as_dir" && as_dir=.
13144    for ac_exec_ext in '' $ac_executable_extensions; do
13145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13146    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13148    break 2
13149  fi
13150done
13151  done
13152IFS=$as_save_IFS
13153
13154  ;;
13155esac
13156fi
13157XARGS=$ac_cv_path_XARGS
13158if test -n "$XARGS"; then
13159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13160$as_echo "$XARGS" >&6; }
13161else
13162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13163$as_echo "no" >&6; }
13164fi
13165
13166
13167          if test "x$XARGS" = x; then
13168            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13169          fi
13170        else
13171          # Otherwise we believe it is a complete path. Use it as it is.
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13173$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13174          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13175$as_echo_n "checking for XARGS... " >&6; }
13176          if test ! -x "$tool_specified"; then
13177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13178$as_echo "not found" >&6; }
13179            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13180          fi
13181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13182$as_echo "$tool_specified" >&6; }
13183        fi
13184      fi
13185    fi
13186
13187  fi
13188
13189
13190
13191  if test "x$XARGS" = x; then
13192    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13193  fi
13194
13195
13196
13197  # Then required tools that require some special treatment.
13198
13199
13200  # Publish this variable in the help.
13201
13202
13203  if [ -z "${AWK+x}" ]; then
13204    # The variable is not set by user, try to locate tool using the code snippet
13205    for ac_prog in gawk mawk nawk awk
13206do
13207  # Extract the first word of "$ac_prog", so it can be a program name with args.
13208set dummy $ac_prog; ac_word=$2
13209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13210$as_echo_n "checking for $ac_word... " >&6; }
13211if ${ac_cv_prog_AWK+:} false; then :
13212  $as_echo_n "(cached) " >&6
13213else
13214  if test -n "$AWK"; then
13215  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13216else
13217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13218for as_dir in $PATH
13219do
13220  IFS=$as_save_IFS
13221  test -z "$as_dir" && as_dir=.
13222    for ac_exec_ext in '' $ac_executable_extensions; do
13223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13224    ac_cv_prog_AWK="$ac_prog"
13225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13226    break 2
13227  fi
13228done
13229  done
13230IFS=$as_save_IFS
13231
13232fi
13233fi
13234AWK=$ac_cv_prog_AWK
13235if test -n "$AWK"; then
13236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13237$as_echo "$AWK" >&6; }
13238else
13239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13240$as_echo "no" >&6; }
13241fi
13242
13243
13244  test -n "$AWK" && break
13245done
13246
13247  else
13248    # The variable is set, but is it from the command line or the environment?
13249
13250    # Try to remove the string !AWK! from our list.
13251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13253      # If it failed, the variable was not from the command line. Ignore it,
13254      # but warn the user (except for BASH, which is always set by the calling BASH).
13255      if test "xAWK" != xBASH; then
13256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13257$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13258      fi
13259      # Try to locate tool using the code snippet
13260      for ac_prog in gawk mawk nawk awk
13261do
13262  # Extract the first word of "$ac_prog", so it can be a program name with args.
13263set dummy $ac_prog; ac_word=$2
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13265$as_echo_n "checking for $ac_word... " >&6; }
13266if ${ac_cv_prog_AWK+:} false; then :
13267  $as_echo_n "(cached) " >&6
13268else
13269  if test -n "$AWK"; then
13270  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13271else
13272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13273for as_dir in $PATH
13274do
13275  IFS=$as_save_IFS
13276  test -z "$as_dir" && as_dir=.
13277    for ac_exec_ext in '' $ac_executable_extensions; do
13278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13279    ac_cv_prog_AWK="$ac_prog"
13280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13281    break 2
13282  fi
13283done
13284  done
13285IFS=$as_save_IFS
13286
13287fi
13288fi
13289AWK=$ac_cv_prog_AWK
13290if test -n "$AWK"; then
13291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13292$as_echo "$AWK" >&6; }
13293else
13294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13295$as_echo "no" >&6; }
13296fi
13297
13298
13299  test -n "$AWK" && break
13300done
13301
13302    else
13303      # If it succeeded, then it was overridden by the user. We will use it
13304      # for the tool.
13305
13306      # First remove it from the list of overridden variables, so we can test
13307      # for unknown variables in the end.
13308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13309
13310      # Check if we try to supply an empty value
13311      if test "x$AWK" = x; then
13312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13313$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13315$as_echo_n "checking for AWK... " >&6; }
13316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13317$as_echo "disabled" >&6; }
13318      else
13319        # Check if the provided tool contains a complete path.
13320        tool_specified="$AWK"
13321        tool_basename="${tool_specified##*/}"
13322        if test "x$tool_basename" = "x$tool_specified"; then
13323          # A command without a complete path is provided, search $PATH.
13324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13325$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13326          # Extract the first word of "$tool_basename", so it can be a program name with args.
13327set dummy $tool_basename; ac_word=$2
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13329$as_echo_n "checking for $ac_word... " >&6; }
13330if ${ac_cv_path_AWK+:} false; then :
13331  $as_echo_n "(cached) " >&6
13332else
13333  case $AWK in
13334  [\\/]* | ?:[\\/]*)
13335  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13336  ;;
13337  *)
13338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13339for as_dir in $PATH
13340do
13341  IFS=$as_save_IFS
13342  test -z "$as_dir" && as_dir=.
13343    for ac_exec_ext in '' $ac_executable_extensions; do
13344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13345    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13347    break 2
13348  fi
13349done
13350  done
13351IFS=$as_save_IFS
13352
13353  ;;
13354esac
13355fi
13356AWK=$ac_cv_path_AWK
13357if test -n "$AWK"; then
13358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13359$as_echo "$AWK" >&6; }
13360else
13361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13362$as_echo "no" >&6; }
13363fi
13364
13365
13366          if test "x$AWK" = x; then
13367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13368          fi
13369        else
13370          # Otherwise we believe it is a complete path. Use it as it is.
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13372$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13374$as_echo_n "checking for AWK... " >&6; }
13375          if test ! -x "$tool_specified"; then
13376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13377$as_echo "not found" >&6; }
13378            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13379          fi
13380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13381$as_echo "$tool_specified" >&6; }
13382        fi
13383      fi
13384    fi
13385
13386  fi
13387
13388
13389  if test "x$AWK" = x; then
13390    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13391  fi
13392
13393
13394
13395
13396  # Publish this variable in the help.
13397
13398
13399  if [ -z "${GREP+x}" ]; then
13400    # The variable is not set by user, try to locate tool using the code snippet
13401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13402$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13403if ${ac_cv_path_GREP+:} false; then :
13404  $as_echo_n "(cached) " >&6
13405else
13406  if test -z "$GREP"; then
13407  ac_path_GREP_found=false
13408  # Loop through the user's path and test for each of PROGNAME-LIST
13409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13410for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13411do
13412  IFS=$as_save_IFS
13413  test -z "$as_dir" && as_dir=.
13414    for ac_prog in grep ggrep; do
13415    for ac_exec_ext in '' $ac_executable_extensions; do
13416      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13417      as_fn_executable_p "$ac_path_GREP" || continue
13418# Check for GNU ac_path_GREP and select it if it is found.
13419  # Check for GNU $ac_path_GREP
13420case `"$ac_path_GREP" --version 2>&1` in
13421*GNU*)
13422  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13423*)
13424  ac_count=0
13425  $as_echo_n 0123456789 >"conftest.in"
13426  while :
13427  do
13428    cat "conftest.in" "conftest.in" >"conftest.tmp"
13429    mv "conftest.tmp" "conftest.in"
13430    cp "conftest.in" "conftest.nl"
13431    $as_echo 'GREP' >> "conftest.nl"
13432    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13433    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13434    as_fn_arith $ac_count + 1 && ac_count=$as_val
13435    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13436      # Best one so far, save it but keep looking for a better one
13437      ac_cv_path_GREP="$ac_path_GREP"
13438      ac_path_GREP_max=$ac_count
13439    fi
13440    # 10*(2^10) chars as input seems more than enough
13441    test $ac_count -gt 10 && break
13442  done
13443  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13444esac
13445
13446      $ac_path_GREP_found && break 3
13447    done
13448  done
13449  done
13450IFS=$as_save_IFS
13451  if test -z "$ac_cv_path_GREP"; then
13452    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13453  fi
13454else
13455  ac_cv_path_GREP=$GREP
13456fi
13457
13458fi
13459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13460$as_echo "$ac_cv_path_GREP" >&6; }
13461 GREP="$ac_cv_path_GREP"
13462
13463
13464  else
13465    # The variable is set, but is it from the command line or the environment?
13466
13467    # Try to remove the string !GREP! from our list.
13468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13470      # If it failed, the variable was not from the command line. Ignore it,
13471      # but warn the user (except for BASH, which is always set by the calling BASH).
13472      if test "xGREP" != xBASH; then
13473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13474$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13475      fi
13476      # Try to locate tool using the code snippet
13477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13478$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13479if ${ac_cv_path_GREP+:} false; then :
13480  $as_echo_n "(cached) " >&6
13481else
13482  if test -z "$GREP"; then
13483  ac_path_GREP_found=false
13484  # Loop through the user's path and test for each of PROGNAME-LIST
13485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13486for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13487do
13488  IFS=$as_save_IFS
13489  test -z "$as_dir" && as_dir=.
13490    for ac_prog in grep ggrep; do
13491    for ac_exec_ext in '' $ac_executable_extensions; do
13492      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13493      as_fn_executable_p "$ac_path_GREP" || continue
13494# Check for GNU ac_path_GREP and select it if it is found.
13495  # Check for GNU $ac_path_GREP
13496case `"$ac_path_GREP" --version 2>&1` in
13497*GNU*)
13498  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13499*)
13500  ac_count=0
13501  $as_echo_n 0123456789 >"conftest.in"
13502  while :
13503  do
13504    cat "conftest.in" "conftest.in" >"conftest.tmp"
13505    mv "conftest.tmp" "conftest.in"
13506    cp "conftest.in" "conftest.nl"
13507    $as_echo 'GREP' >> "conftest.nl"
13508    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13509    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13510    as_fn_arith $ac_count + 1 && ac_count=$as_val
13511    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13512      # Best one so far, save it but keep looking for a better one
13513      ac_cv_path_GREP="$ac_path_GREP"
13514      ac_path_GREP_max=$ac_count
13515    fi
13516    # 10*(2^10) chars as input seems more than enough
13517    test $ac_count -gt 10 && break
13518  done
13519  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13520esac
13521
13522      $ac_path_GREP_found && break 3
13523    done
13524  done
13525  done
13526IFS=$as_save_IFS
13527  if test -z "$ac_cv_path_GREP"; then
13528    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13529  fi
13530else
13531  ac_cv_path_GREP=$GREP
13532fi
13533
13534fi
13535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13536$as_echo "$ac_cv_path_GREP" >&6; }
13537 GREP="$ac_cv_path_GREP"
13538
13539
13540    else
13541      # If it succeeded, then it was overridden by the user. We will use it
13542      # for the tool.
13543
13544      # First remove it from the list of overridden variables, so we can test
13545      # for unknown variables in the end.
13546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13547
13548      # Check if we try to supply an empty value
13549      if test "x$GREP" = x; then
13550        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13551$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13552        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13553$as_echo_n "checking for GREP... " >&6; }
13554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13555$as_echo "disabled" >&6; }
13556      else
13557        # Check if the provided tool contains a complete path.
13558        tool_specified="$GREP"
13559        tool_basename="${tool_specified##*/}"
13560        if test "x$tool_basename" = "x$tool_specified"; then
13561          # A command without a complete path is provided, search $PATH.
13562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13563$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13564          # Extract the first word of "$tool_basename", so it can be a program name with args.
13565set dummy $tool_basename; ac_word=$2
13566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13567$as_echo_n "checking for $ac_word... " >&6; }
13568if ${ac_cv_path_GREP+:} false; then :
13569  $as_echo_n "(cached) " >&6
13570else
13571  case $GREP in
13572  [\\/]* | ?:[\\/]*)
13573  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13574  ;;
13575  *)
13576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13577for as_dir in $PATH
13578do
13579  IFS=$as_save_IFS
13580  test -z "$as_dir" && as_dir=.
13581    for ac_exec_ext in '' $ac_executable_extensions; do
13582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13583    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13585    break 2
13586  fi
13587done
13588  done
13589IFS=$as_save_IFS
13590
13591  ;;
13592esac
13593fi
13594GREP=$ac_cv_path_GREP
13595if test -n "$GREP"; then
13596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13597$as_echo "$GREP" >&6; }
13598else
13599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13600$as_echo "no" >&6; }
13601fi
13602
13603
13604          if test "x$GREP" = x; then
13605            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13606          fi
13607        else
13608          # Otherwise we believe it is a complete path. Use it as it is.
13609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13610$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13611          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13612$as_echo_n "checking for GREP... " >&6; }
13613          if test ! -x "$tool_specified"; then
13614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13615$as_echo "not found" >&6; }
13616            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13617          fi
13618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13619$as_echo "$tool_specified" >&6; }
13620        fi
13621      fi
13622    fi
13623
13624  fi
13625
13626
13627  if test "x$GREP" = x; then
13628    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13629  fi
13630
13631
13632
13633
13634  # Publish this variable in the help.
13635
13636
13637  if [ -z "${EGREP+x}" ]; then
13638    # The variable is not set by user, try to locate tool using the code snippet
13639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13640$as_echo_n "checking for egrep... " >&6; }
13641if ${ac_cv_path_EGREP+:} false; then :
13642  $as_echo_n "(cached) " >&6
13643else
13644  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13645   then ac_cv_path_EGREP="$GREP -E"
13646   else
13647     if test -z "$EGREP"; then
13648  ac_path_EGREP_found=false
13649  # Loop through the user's path and test for each of PROGNAME-LIST
13650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13651for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13652do
13653  IFS=$as_save_IFS
13654  test -z "$as_dir" && as_dir=.
13655    for ac_prog in egrep; do
13656    for ac_exec_ext in '' $ac_executable_extensions; do
13657      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13658      as_fn_executable_p "$ac_path_EGREP" || continue
13659# Check for GNU ac_path_EGREP and select it if it is found.
13660  # Check for GNU $ac_path_EGREP
13661case `"$ac_path_EGREP" --version 2>&1` in
13662*GNU*)
13663  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13664*)
13665  ac_count=0
13666  $as_echo_n 0123456789 >"conftest.in"
13667  while :
13668  do
13669    cat "conftest.in" "conftest.in" >"conftest.tmp"
13670    mv "conftest.tmp" "conftest.in"
13671    cp "conftest.in" "conftest.nl"
13672    $as_echo 'EGREP' >> "conftest.nl"
13673    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13674    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13675    as_fn_arith $ac_count + 1 && ac_count=$as_val
13676    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13677      # Best one so far, save it but keep looking for a better one
13678      ac_cv_path_EGREP="$ac_path_EGREP"
13679      ac_path_EGREP_max=$ac_count
13680    fi
13681    # 10*(2^10) chars as input seems more than enough
13682    test $ac_count -gt 10 && break
13683  done
13684  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13685esac
13686
13687      $ac_path_EGREP_found && break 3
13688    done
13689  done
13690  done
13691IFS=$as_save_IFS
13692  if test -z "$ac_cv_path_EGREP"; then
13693    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13694  fi
13695else
13696  ac_cv_path_EGREP=$EGREP
13697fi
13698
13699   fi
13700fi
13701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13702$as_echo "$ac_cv_path_EGREP" >&6; }
13703 EGREP="$ac_cv_path_EGREP"
13704
13705
13706  else
13707    # The variable is set, but is it from the command line or the environment?
13708
13709    # Try to remove the string !EGREP! from our list.
13710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13712      # If it failed, the variable was not from the command line. Ignore it,
13713      # but warn the user (except for BASH, which is always set by the calling BASH).
13714      if test "xEGREP" != xBASH; then
13715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13716$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13717      fi
13718      # Try to locate tool using the code snippet
13719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13720$as_echo_n "checking for egrep... " >&6; }
13721if ${ac_cv_path_EGREP+:} false; then :
13722  $as_echo_n "(cached) " >&6
13723else
13724  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13725   then ac_cv_path_EGREP="$GREP -E"
13726   else
13727     if test -z "$EGREP"; then
13728  ac_path_EGREP_found=false
13729  # Loop through the user's path and test for each of PROGNAME-LIST
13730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13731for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13732do
13733  IFS=$as_save_IFS
13734  test -z "$as_dir" && as_dir=.
13735    for ac_prog in egrep; do
13736    for ac_exec_ext in '' $ac_executable_extensions; do
13737      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13738      as_fn_executable_p "$ac_path_EGREP" || continue
13739# Check for GNU ac_path_EGREP and select it if it is found.
13740  # Check for GNU $ac_path_EGREP
13741case `"$ac_path_EGREP" --version 2>&1` in
13742*GNU*)
13743  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13744*)
13745  ac_count=0
13746  $as_echo_n 0123456789 >"conftest.in"
13747  while :
13748  do
13749    cat "conftest.in" "conftest.in" >"conftest.tmp"
13750    mv "conftest.tmp" "conftest.in"
13751    cp "conftest.in" "conftest.nl"
13752    $as_echo 'EGREP' >> "conftest.nl"
13753    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13754    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13755    as_fn_arith $ac_count + 1 && ac_count=$as_val
13756    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13757      # Best one so far, save it but keep looking for a better one
13758      ac_cv_path_EGREP="$ac_path_EGREP"
13759      ac_path_EGREP_max=$ac_count
13760    fi
13761    # 10*(2^10) chars as input seems more than enough
13762    test $ac_count -gt 10 && break
13763  done
13764  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13765esac
13766
13767      $ac_path_EGREP_found && break 3
13768    done
13769  done
13770  done
13771IFS=$as_save_IFS
13772  if test -z "$ac_cv_path_EGREP"; then
13773    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13774  fi
13775else
13776  ac_cv_path_EGREP=$EGREP
13777fi
13778
13779   fi
13780fi
13781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13782$as_echo "$ac_cv_path_EGREP" >&6; }
13783 EGREP="$ac_cv_path_EGREP"
13784
13785
13786    else
13787      # If it succeeded, then it was overridden by the user. We will use it
13788      # for the tool.
13789
13790      # First remove it from the list of overridden variables, so we can test
13791      # for unknown variables in the end.
13792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13793
13794      # Check if we try to supply an empty value
13795      if test "x$EGREP" = x; then
13796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13797$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13799$as_echo_n "checking for EGREP... " >&6; }
13800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13801$as_echo "disabled" >&6; }
13802      else
13803        # Check if the provided tool contains a complete path.
13804        tool_specified="$EGREP"
13805        tool_basename="${tool_specified##*/}"
13806        if test "x$tool_basename" = "x$tool_specified"; then
13807          # A command without a complete path is provided, search $PATH.
13808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13809$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13810          # Extract the first word of "$tool_basename", so it can be a program name with args.
13811set dummy $tool_basename; ac_word=$2
13812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13813$as_echo_n "checking for $ac_word... " >&6; }
13814if ${ac_cv_path_EGREP+:} false; then :
13815  $as_echo_n "(cached) " >&6
13816else
13817  case $EGREP in
13818  [\\/]* | ?:[\\/]*)
13819  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13820  ;;
13821  *)
13822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13823for as_dir in $PATH
13824do
13825  IFS=$as_save_IFS
13826  test -z "$as_dir" && as_dir=.
13827    for ac_exec_ext in '' $ac_executable_extensions; do
13828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13829    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13831    break 2
13832  fi
13833done
13834  done
13835IFS=$as_save_IFS
13836
13837  ;;
13838esac
13839fi
13840EGREP=$ac_cv_path_EGREP
13841if test -n "$EGREP"; then
13842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13843$as_echo "$EGREP" >&6; }
13844else
13845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13846$as_echo "no" >&6; }
13847fi
13848
13849
13850          if test "x$EGREP" = x; then
13851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13852          fi
13853        else
13854          # Otherwise we believe it is a complete path. Use it as it is.
13855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13856$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13858$as_echo_n "checking for EGREP... " >&6; }
13859          if test ! -x "$tool_specified"; then
13860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13861$as_echo "not found" >&6; }
13862            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13863          fi
13864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13865$as_echo "$tool_specified" >&6; }
13866        fi
13867      fi
13868    fi
13869
13870  fi
13871
13872
13873  if test "x$EGREP" = x; then
13874    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13875  fi
13876
13877
13878
13879
13880  # Publish this variable in the help.
13881
13882
13883  if [ -z "${FGREP+x}" ]; then
13884    # The variable is not set by user, try to locate tool using the code snippet
13885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13886$as_echo_n "checking for fgrep... " >&6; }
13887if ${ac_cv_path_FGREP+:} false; then :
13888  $as_echo_n "(cached) " >&6
13889else
13890  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13891   then ac_cv_path_FGREP="$GREP -F"
13892   else
13893     if test -z "$FGREP"; then
13894  ac_path_FGREP_found=false
13895  # Loop through the user's path and test for each of PROGNAME-LIST
13896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13897for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13898do
13899  IFS=$as_save_IFS
13900  test -z "$as_dir" && as_dir=.
13901    for ac_prog in fgrep; do
13902    for ac_exec_ext in '' $ac_executable_extensions; do
13903      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13904      as_fn_executable_p "$ac_path_FGREP" || continue
13905# Check for GNU ac_path_FGREP and select it if it is found.
13906  # Check for GNU $ac_path_FGREP
13907case `"$ac_path_FGREP" --version 2>&1` in
13908*GNU*)
13909  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13910*)
13911  ac_count=0
13912  $as_echo_n 0123456789 >"conftest.in"
13913  while :
13914  do
13915    cat "conftest.in" "conftest.in" >"conftest.tmp"
13916    mv "conftest.tmp" "conftest.in"
13917    cp "conftest.in" "conftest.nl"
13918    $as_echo 'FGREP' >> "conftest.nl"
13919    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13920    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13921    as_fn_arith $ac_count + 1 && ac_count=$as_val
13922    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13923      # Best one so far, save it but keep looking for a better one
13924      ac_cv_path_FGREP="$ac_path_FGREP"
13925      ac_path_FGREP_max=$ac_count
13926    fi
13927    # 10*(2^10) chars as input seems more than enough
13928    test $ac_count -gt 10 && break
13929  done
13930  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13931esac
13932
13933      $ac_path_FGREP_found && break 3
13934    done
13935  done
13936  done
13937IFS=$as_save_IFS
13938  if test -z "$ac_cv_path_FGREP"; then
13939    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13940  fi
13941else
13942  ac_cv_path_FGREP=$FGREP
13943fi
13944
13945   fi
13946fi
13947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13948$as_echo "$ac_cv_path_FGREP" >&6; }
13949 FGREP="$ac_cv_path_FGREP"
13950
13951
13952  else
13953    # The variable is set, but is it from the command line or the environment?
13954
13955    # Try to remove the string !FGREP! from our list.
13956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13958      # If it failed, the variable was not from the command line. Ignore it,
13959      # but warn the user (except for BASH, which is always set by the calling BASH).
13960      if test "xFGREP" != xBASH; then
13961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13962$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13963      fi
13964      # Try to locate tool using the code snippet
13965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13966$as_echo_n "checking for fgrep... " >&6; }
13967if ${ac_cv_path_FGREP+:} false; then :
13968  $as_echo_n "(cached) " >&6
13969else
13970  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13971   then ac_cv_path_FGREP="$GREP -F"
13972   else
13973     if test -z "$FGREP"; then
13974  ac_path_FGREP_found=false
13975  # Loop through the user's path and test for each of PROGNAME-LIST
13976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13977for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13978do
13979  IFS=$as_save_IFS
13980  test -z "$as_dir" && as_dir=.
13981    for ac_prog in fgrep; do
13982    for ac_exec_ext in '' $ac_executable_extensions; do
13983      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13984      as_fn_executable_p "$ac_path_FGREP" || continue
13985# Check for GNU ac_path_FGREP and select it if it is found.
13986  # Check for GNU $ac_path_FGREP
13987case `"$ac_path_FGREP" --version 2>&1` in
13988*GNU*)
13989  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13990*)
13991  ac_count=0
13992  $as_echo_n 0123456789 >"conftest.in"
13993  while :
13994  do
13995    cat "conftest.in" "conftest.in" >"conftest.tmp"
13996    mv "conftest.tmp" "conftest.in"
13997    cp "conftest.in" "conftest.nl"
13998    $as_echo 'FGREP' >> "conftest.nl"
13999    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14000    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14001    as_fn_arith $ac_count + 1 && ac_count=$as_val
14002    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14003      # Best one so far, save it but keep looking for a better one
14004      ac_cv_path_FGREP="$ac_path_FGREP"
14005      ac_path_FGREP_max=$ac_count
14006    fi
14007    # 10*(2^10) chars as input seems more than enough
14008    test $ac_count -gt 10 && break
14009  done
14010  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14011esac
14012
14013      $ac_path_FGREP_found && break 3
14014    done
14015  done
14016  done
14017IFS=$as_save_IFS
14018  if test -z "$ac_cv_path_FGREP"; then
14019    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14020  fi
14021else
14022  ac_cv_path_FGREP=$FGREP
14023fi
14024
14025   fi
14026fi
14027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14028$as_echo "$ac_cv_path_FGREP" >&6; }
14029 FGREP="$ac_cv_path_FGREP"
14030
14031
14032    else
14033      # If it succeeded, then it was overridden by the user. We will use it
14034      # for the tool.
14035
14036      # First remove it from the list of overridden variables, so we can test
14037      # for unknown variables in the end.
14038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14039
14040      # Check if we try to supply an empty value
14041      if test "x$FGREP" = x; then
14042        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14043$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14045$as_echo_n "checking for FGREP... " >&6; }
14046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14047$as_echo "disabled" >&6; }
14048      else
14049        # Check if the provided tool contains a complete path.
14050        tool_specified="$FGREP"
14051        tool_basename="${tool_specified##*/}"
14052        if test "x$tool_basename" = "x$tool_specified"; then
14053          # A command without a complete path is provided, search $PATH.
14054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14055$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14056          # Extract the first word of "$tool_basename", so it can be a program name with args.
14057set dummy $tool_basename; ac_word=$2
14058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14059$as_echo_n "checking for $ac_word... " >&6; }
14060if ${ac_cv_path_FGREP+:} false; then :
14061  $as_echo_n "(cached) " >&6
14062else
14063  case $FGREP in
14064  [\\/]* | ?:[\\/]*)
14065  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14066  ;;
14067  *)
14068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14069for as_dir in $PATH
14070do
14071  IFS=$as_save_IFS
14072  test -z "$as_dir" && as_dir=.
14073    for ac_exec_ext in '' $ac_executable_extensions; do
14074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14075    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14077    break 2
14078  fi
14079done
14080  done
14081IFS=$as_save_IFS
14082
14083  ;;
14084esac
14085fi
14086FGREP=$ac_cv_path_FGREP
14087if test -n "$FGREP"; then
14088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14089$as_echo "$FGREP" >&6; }
14090else
14091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14092$as_echo "no" >&6; }
14093fi
14094
14095
14096          if test "x$FGREP" = x; then
14097            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14098          fi
14099        else
14100          # Otherwise we believe it is a complete path. Use it as it is.
14101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14102$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14103          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14104$as_echo_n "checking for FGREP... " >&6; }
14105          if test ! -x "$tool_specified"; then
14106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14107$as_echo "not found" >&6; }
14108            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14109          fi
14110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14111$as_echo "$tool_specified" >&6; }
14112        fi
14113      fi
14114    fi
14115
14116  fi
14117
14118
14119  if test "x$FGREP" = x; then
14120    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14121  fi
14122
14123
14124
14125
14126  # Publish this variable in the help.
14127
14128
14129  if [ -z "${SED+x}" ]; then
14130    # The variable is not set by user, try to locate tool using the code snippet
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14132$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14133if ${ac_cv_path_SED+:} false; then :
14134  $as_echo_n "(cached) " >&6
14135else
14136            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14137     for ac_i in 1 2 3 4 5 6 7; do
14138       ac_script="$ac_script$as_nl$ac_script"
14139     done
14140     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14141     { ac_script=; unset ac_script;}
14142     if test -z "$SED"; then
14143  ac_path_SED_found=false
14144  # Loop through the user's path and test for each of PROGNAME-LIST
14145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14146for as_dir in $PATH
14147do
14148  IFS=$as_save_IFS
14149  test -z "$as_dir" && as_dir=.
14150    for ac_prog in sed gsed; do
14151    for ac_exec_ext in '' $ac_executable_extensions; do
14152      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14153      as_fn_executable_p "$ac_path_SED" || continue
14154# Check for GNU ac_path_SED and select it if it is found.
14155  # Check for GNU $ac_path_SED
14156case `"$ac_path_SED" --version 2>&1` in
14157*GNU*)
14158  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14159*)
14160  ac_count=0
14161  $as_echo_n 0123456789 >"conftest.in"
14162  while :
14163  do
14164    cat "conftest.in" "conftest.in" >"conftest.tmp"
14165    mv "conftest.tmp" "conftest.in"
14166    cp "conftest.in" "conftest.nl"
14167    $as_echo '' >> "conftest.nl"
14168    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14169    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14170    as_fn_arith $ac_count + 1 && ac_count=$as_val
14171    if test $ac_count -gt ${ac_path_SED_max-0}; then
14172      # Best one so far, save it but keep looking for a better one
14173      ac_cv_path_SED="$ac_path_SED"
14174      ac_path_SED_max=$ac_count
14175    fi
14176    # 10*(2^10) chars as input seems more than enough
14177    test $ac_count -gt 10 && break
14178  done
14179  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14180esac
14181
14182      $ac_path_SED_found && break 3
14183    done
14184  done
14185  done
14186IFS=$as_save_IFS
14187  if test -z "$ac_cv_path_SED"; then
14188    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14189  fi
14190else
14191  ac_cv_path_SED=$SED
14192fi
14193
14194fi
14195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14196$as_echo "$ac_cv_path_SED" >&6; }
14197 SED="$ac_cv_path_SED"
14198  rm -f conftest.sed
14199
14200  else
14201    # The variable is set, but is it from the command line or the environment?
14202
14203    # Try to remove the string !SED! from our list.
14204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14206      # If it failed, the variable was not from the command line. Ignore it,
14207      # but warn the user (except for BASH, which is always set by the calling BASH).
14208      if test "xSED" != xBASH; then
14209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14210$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14211      fi
14212      # Try to locate tool using the code snippet
14213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14214$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14215if ${ac_cv_path_SED+:} false; then :
14216  $as_echo_n "(cached) " >&6
14217else
14218            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14219     for ac_i in 1 2 3 4 5 6 7; do
14220       ac_script="$ac_script$as_nl$ac_script"
14221     done
14222     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14223     { ac_script=; unset ac_script;}
14224     if test -z "$SED"; then
14225  ac_path_SED_found=false
14226  # Loop through the user's path and test for each of PROGNAME-LIST
14227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14228for as_dir in $PATH
14229do
14230  IFS=$as_save_IFS
14231  test -z "$as_dir" && as_dir=.
14232    for ac_prog in sed gsed; do
14233    for ac_exec_ext in '' $ac_executable_extensions; do
14234      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14235      as_fn_executable_p "$ac_path_SED" || continue
14236# Check for GNU ac_path_SED and select it if it is found.
14237  # Check for GNU $ac_path_SED
14238case `"$ac_path_SED" --version 2>&1` in
14239*GNU*)
14240  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14241*)
14242  ac_count=0
14243  $as_echo_n 0123456789 >"conftest.in"
14244  while :
14245  do
14246    cat "conftest.in" "conftest.in" >"conftest.tmp"
14247    mv "conftest.tmp" "conftest.in"
14248    cp "conftest.in" "conftest.nl"
14249    $as_echo '' >> "conftest.nl"
14250    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14251    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14252    as_fn_arith $ac_count + 1 && ac_count=$as_val
14253    if test $ac_count -gt ${ac_path_SED_max-0}; then
14254      # Best one so far, save it but keep looking for a better one
14255      ac_cv_path_SED="$ac_path_SED"
14256      ac_path_SED_max=$ac_count
14257    fi
14258    # 10*(2^10) chars as input seems more than enough
14259    test $ac_count -gt 10 && break
14260  done
14261  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14262esac
14263
14264      $ac_path_SED_found && break 3
14265    done
14266  done
14267  done
14268IFS=$as_save_IFS
14269  if test -z "$ac_cv_path_SED"; then
14270    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14271  fi
14272else
14273  ac_cv_path_SED=$SED
14274fi
14275
14276fi
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14278$as_echo "$ac_cv_path_SED" >&6; }
14279 SED="$ac_cv_path_SED"
14280  rm -f conftest.sed
14281
14282    else
14283      # If it succeeded, then it was overridden by the user. We will use it
14284      # for the tool.
14285
14286      # First remove it from the list of overridden variables, so we can test
14287      # for unknown variables in the end.
14288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14289
14290      # Check if we try to supply an empty value
14291      if test "x$SED" = x; then
14292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14293$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14295$as_echo_n "checking for SED... " >&6; }
14296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14297$as_echo "disabled" >&6; }
14298      else
14299        # Check if the provided tool contains a complete path.
14300        tool_specified="$SED"
14301        tool_basename="${tool_specified##*/}"
14302        if test "x$tool_basename" = "x$tool_specified"; then
14303          # A command without a complete path is provided, search $PATH.
14304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14305$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14306          # Extract the first word of "$tool_basename", so it can be a program name with args.
14307set dummy $tool_basename; ac_word=$2
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14309$as_echo_n "checking for $ac_word... " >&6; }
14310if ${ac_cv_path_SED+:} false; then :
14311  $as_echo_n "(cached) " >&6
14312else
14313  case $SED in
14314  [\\/]* | ?:[\\/]*)
14315  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14316  ;;
14317  *)
14318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14319for as_dir in $PATH
14320do
14321  IFS=$as_save_IFS
14322  test -z "$as_dir" && as_dir=.
14323    for ac_exec_ext in '' $ac_executable_extensions; do
14324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14325    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14327    break 2
14328  fi
14329done
14330  done
14331IFS=$as_save_IFS
14332
14333  ;;
14334esac
14335fi
14336SED=$ac_cv_path_SED
14337if test -n "$SED"; then
14338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14339$as_echo "$SED" >&6; }
14340else
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342$as_echo "no" >&6; }
14343fi
14344
14345
14346          if test "x$SED" = x; then
14347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14348          fi
14349        else
14350          # Otherwise we believe it is a complete path. Use it as it is.
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14352$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14354$as_echo_n "checking for SED... " >&6; }
14355          if test ! -x "$tool_specified"; then
14356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14357$as_echo "not found" >&6; }
14358            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14359          fi
14360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14361$as_echo "$tool_specified" >&6; }
14362        fi
14363      fi
14364    fi
14365
14366  fi
14367
14368
14369  if test "x$SED" = x; then
14370    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14371  fi
14372
14373
14374
14375  # Always force rm.
14376  RM="$RM -f"
14377
14378  # pwd behaves differently on various platforms and some don't support the -L flag.
14379  # Always use the bash builtin pwd to get uniform behavior.
14380  THEPWDCMD=pwd
14381
14382  # These are not required on all platforms
14383
14384
14385  # Publish this variable in the help.
14386
14387
14388  if [ -z "${CYGPATH+x}" ]; then
14389    # The variable is not set by user, try to locate tool using the code snippet
14390    for ac_prog in cygpath
14391do
14392  # Extract the first word of "$ac_prog", so it can be a program name with args.
14393set dummy $ac_prog; ac_word=$2
14394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14395$as_echo_n "checking for $ac_word... " >&6; }
14396if ${ac_cv_path_CYGPATH+:} false; then :
14397  $as_echo_n "(cached) " >&6
14398else
14399  case $CYGPATH in
14400  [\\/]* | ?:[\\/]*)
14401  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14402  ;;
14403  *)
14404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14405for as_dir in $PATH
14406do
14407  IFS=$as_save_IFS
14408  test -z "$as_dir" && as_dir=.
14409    for ac_exec_ext in '' $ac_executable_extensions; do
14410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14411    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14413    break 2
14414  fi
14415done
14416  done
14417IFS=$as_save_IFS
14418
14419  ;;
14420esac
14421fi
14422CYGPATH=$ac_cv_path_CYGPATH
14423if test -n "$CYGPATH"; then
14424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14425$as_echo "$CYGPATH" >&6; }
14426else
14427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14428$as_echo "no" >&6; }
14429fi
14430
14431
14432  test -n "$CYGPATH" && break
14433done
14434
14435  else
14436    # The variable is set, but is it from the command line or the environment?
14437
14438    # Try to remove the string !CYGPATH! from our list.
14439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14441      # If it failed, the variable was not from the command line. Ignore it,
14442      # but warn the user (except for BASH, which is always set by the calling BASH).
14443      if test "xCYGPATH" != xBASH; then
14444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14445$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14446      fi
14447      # Try to locate tool using the code snippet
14448      for ac_prog in cygpath
14449do
14450  # Extract the first word of "$ac_prog", so it can be a program name with args.
14451set dummy $ac_prog; ac_word=$2
14452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14453$as_echo_n "checking for $ac_word... " >&6; }
14454if ${ac_cv_path_CYGPATH+:} false; then :
14455  $as_echo_n "(cached) " >&6
14456else
14457  case $CYGPATH in
14458  [\\/]* | ?:[\\/]*)
14459  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14460  ;;
14461  *)
14462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14463for as_dir in $PATH
14464do
14465  IFS=$as_save_IFS
14466  test -z "$as_dir" && as_dir=.
14467    for ac_exec_ext in '' $ac_executable_extensions; do
14468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14469    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14471    break 2
14472  fi
14473done
14474  done
14475IFS=$as_save_IFS
14476
14477  ;;
14478esac
14479fi
14480CYGPATH=$ac_cv_path_CYGPATH
14481if test -n "$CYGPATH"; then
14482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14483$as_echo "$CYGPATH" >&6; }
14484else
14485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14486$as_echo "no" >&6; }
14487fi
14488
14489
14490  test -n "$CYGPATH" && break
14491done
14492
14493    else
14494      # If it succeeded, then it was overridden by the user. We will use it
14495      # for the tool.
14496
14497      # First remove it from the list of overridden variables, so we can test
14498      # for unknown variables in the end.
14499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14500
14501      # Check if we try to supply an empty value
14502      if test "x$CYGPATH" = x; then
14503        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14504$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14505        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14506$as_echo_n "checking for CYGPATH... " >&6; }
14507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14508$as_echo "disabled" >&6; }
14509      else
14510        # Check if the provided tool contains a complete path.
14511        tool_specified="$CYGPATH"
14512        tool_basename="${tool_specified##*/}"
14513        if test "x$tool_basename" = "x$tool_specified"; then
14514          # A command without a complete path is provided, search $PATH.
14515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14516$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14517          # Extract the first word of "$tool_basename", so it can be a program name with args.
14518set dummy $tool_basename; ac_word=$2
14519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14520$as_echo_n "checking for $ac_word... " >&6; }
14521if ${ac_cv_path_CYGPATH+:} false; then :
14522  $as_echo_n "(cached) " >&6
14523else
14524  case $CYGPATH in
14525  [\\/]* | ?:[\\/]*)
14526  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14527  ;;
14528  *)
14529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14530for as_dir in $PATH
14531do
14532  IFS=$as_save_IFS
14533  test -z "$as_dir" && as_dir=.
14534    for ac_exec_ext in '' $ac_executable_extensions; do
14535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14536    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14538    break 2
14539  fi
14540done
14541  done
14542IFS=$as_save_IFS
14543
14544  ;;
14545esac
14546fi
14547CYGPATH=$ac_cv_path_CYGPATH
14548if test -n "$CYGPATH"; then
14549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14550$as_echo "$CYGPATH" >&6; }
14551else
14552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14553$as_echo "no" >&6; }
14554fi
14555
14556
14557          if test "x$CYGPATH" = x; then
14558            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14559          fi
14560        else
14561          # Otherwise we believe it is a complete path. Use it as it is.
14562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14563$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14564          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14565$as_echo_n "checking for CYGPATH... " >&6; }
14566          if test ! -x "$tool_specified"; then
14567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14568$as_echo "not found" >&6; }
14569            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14570          fi
14571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14572$as_echo "$tool_specified" >&6; }
14573        fi
14574      fi
14575    fi
14576
14577  fi
14578
14579
14580
14581
14582  # Publish this variable in the help.
14583
14584
14585  if [ -z "${READLINK+x}" ]; then
14586    # The variable is not set by user, try to locate tool using the code snippet
14587    for ac_prog in greadlink readlink
14588do
14589  # Extract the first word of "$ac_prog", so it can be a program name with args.
14590set dummy $ac_prog; ac_word=$2
14591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14592$as_echo_n "checking for $ac_word... " >&6; }
14593if ${ac_cv_path_READLINK+:} false; then :
14594  $as_echo_n "(cached) " >&6
14595else
14596  case $READLINK in
14597  [\\/]* | ?:[\\/]*)
14598  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14599  ;;
14600  *)
14601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14602for as_dir in $PATH
14603do
14604  IFS=$as_save_IFS
14605  test -z "$as_dir" && as_dir=.
14606    for ac_exec_ext in '' $ac_executable_extensions; do
14607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14608    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14610    break 2
14611  fi
14612done
14613  done
14614IFS=$as_save_IFS
14615
14616  ;;
14617esac
14618fi
14619READLINK=$ac_cv_path_READLINK
14620if test -n "$READLINK"; then
14621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14622$as_echo "$READLINK" >&6; }
14623else
14624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14625$as_echo "no" >&6; }
14626fi
14627
14628
14629  test -n "$READLINK" && break
14630done
14631
14632  else
14633    # The variable is set, but is it from the command line or the environment?
14634
14635    # Try to remove the string !READLINK! from our list.
14636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14638      # If it failed, the variable was not from the command line. Ignore it,
14639      # but warn the user (except for BASH, which is always set by the calling BASH).
14640      if test "xREADLINK" != xBASH; then
14641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14642$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14643      fi
14644      # Try to locate tool using the code snippet
14645      for ac_prog in greadlink readlink
14646do
14647  # Extract the first word of "$ac_prog", so it can be a program name with args.
14648set dummy $ac_prog; ac_word=$2
14649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14650$as_echo_n "checking for $ac_word... " >&6; }
14651if ${ac_cv_path_READLINK+:} false; then :
14652  $as_echo_n "(cached) " >&6
14653else
14654  case $READLINK in
14655  [\\/]* | ?:[\\/]*)
14656  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14657  ;;
14658  *)
14659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14660for as_dir in $PATH
14661do
14662  IFS=$as_save_IFS
14663  test -z "$as_dir" && as_dir=.
14664    for ac_exec_ext in '' $ac_executable_extensions; do
14665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14666    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14668    break 2
14669  fi
14670done
14671  done
14672IFS=$as_save_IFS
14673
14674  ;;
14675esac
14676fi
14677READLINK=$ac_cv_path_READLINK
14678if test -n "$READLINK"; then
14679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14680$as_echo "$READLINK" >&6; }
14681else
14682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14683$as_echo "no" >&6; }
14684fi
14685
14686
14687  test -n "$READLINK" && break
14688done
14689
14690    else
14691      # If it succeeded, then it was overridden by the user. We will use it
14692      # for the tool.
14693
14694      # First remove it from the list of overridden variables, so we can test
14695      # for unknown variables in the end.
14696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14697
14698      # Check if we try to supply an empty value
14699      if test "x$READLINK" = x; then
14700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14701$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14703$as_echo_n "checking for READLINK... " >&6; }
14704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14705$as_echo "disabled" >&6; }
14706      else
14707        # Check if the provided tool contains a complete path.
14708        tool_specified="$READLINK"
14709        tool_basename="${tool_specified##*/}"
14710        if test "x$tool_basename" = "x$tool_specified"; then
14711          # A command without a complete path is provided, search $PATH.
14712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14713$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14714          # Extract the first word of "$tool_basename", so it can be a program name with args.
14715set dummy $tool_basename; ac_word=$2
14716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14717$as_echo_n "checking for $ac_word... " >&6; }
14718if ${ac_cv_path_READLINK+:} false; then :
14719  $as_echo_n "(cached) " >&6
14720else
14721  case $READLINK in
14722  [\\/]* | ?:[\\/]*)
14723  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14724  ;;
14725  *)
14726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14727for as_dir in $PATH
14728do
14729  IFS=$as_save_IFS
14730  test -z "$as_dir" && as_dir=.
14731    for ac_exec_ext in '' $ac_executable_extensions; do
14732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14733    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14735    break 2
14736  fi
14737done
14738  done
14739IFS=$as_save_IFS
14740
14741  ;;
14742esac
14743fi
14744READLINK=$ac_cv_path_READLINK
14745if test -n "$READLINK"; then
14746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14747$as_echo "$READLINK" >&6; }
14748else
14749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14750$as_echo "no" >&6; }
14751fi
14752
14753
14754          if test "x$READLINK" = x; then
14755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14756          fi
14757        else
14758          # Otherwise we believe it is a complete path. Use it as it is.
14759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14760$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14762$as_echo_n "checking for READLINK... " >&6; }
14763          if test ! -x "$tool_specified"; then
14764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14765$as_echo "not found" >&6; }
14766            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14767          fi
14768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14769$as_echo "$tool_specified" >&6; }
14770        fi
14771      fi
14772    fi
14773
14774  fi
14775
14776
14777
14778
14779  # Publish this variable in the help.
14780
14781
14782  if [ -z "${DF+x}" ]; then
14783    # The variable is not set by user, try to locate tool using the code snippet
14784    for ac_prog in df
14785do
14786  # Extract the first word of "$ac_prog", so it can be a program name with args.
14787set dummy $ac_prog; ac_word=$2
14788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14789$as_echo_n "checking for $ac_word... " >&6; }
14790if ${ac_cv_path_DF+:} false; then :
14791  $as_echo_n "(cached) " >&6
14792else
14793  case $DF in
14794  [\\/]* | ?:[\\/]*)
14795  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14796  ;;
14797  *)
14798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14799for as_dir in $PATH
14800do
14801  IFS=$as_save_IFS
14802  test -z "$as_dir" && as_dir=.
14803    for ac_exec_ext in '' $ac_executable_extensions; do
14804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14805    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14807    break 2
14808  fi
14809done
14810  done
14811IFS=$as_save_IFS
14812
14813  ;;
14814esac
14815fi
14816DF=$ac_cv_path_DF
14817if test -n "$DF"; then
14818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14819$as_echo "$DF" >&6; }
14820else
14821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14822$as_echo "no" >&6; }
14823fi
14824
14825
14826  test -n "$DF" && break
14827done
14828
14829  else
14830    # The variable is set, but is it from the command line or the environment?
14831
14832    # Try to remove the string !DF! from our list.
14833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14835      # If it failed, the variable was not from the command line. Ignore it,
14836      # but warn the user (except for BASH, which is always set by the calling BASH).
14837      if test "xDF" != xBASH; then
14838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14839$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14840      fi
14841      # Try to locate tool using the code snippet
14842      for ac_prog in df
14843do
14844  # Extract the first word of "$ac_prog", so it can be a program name with args.
14845set dummy $ac_prog; ac_word=$2
14846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14847$as_echo_n "checking for $ac_word... " >&6; }
14848if ${ac_cv_path_DF+:} false; then :
14849  $as_echo_n "(cached) " >&6
14850else
14851  case $DF in
14852  [\\/]* | ?:[\\/]*)
14853  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14854  ;;
14855  *)
14856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14857for as_dir in $PATH
14858do
14859  IFS=$as_save_IFS
14860  test -z "$as_dir" && as_dir=.
14861    for ac_exec_ext in '' $ac_executable_extensions; do
14862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14863    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14865    break 2
14866  fi
14867done
14868  done
14869IFS=$as_save_IFS
14870
14871  ;;
14872esac
14873fi
14874DF=$ac_cv_path_DF
14875if test -n "$DF"; then
14876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14877$as_echo "$DF" >&6; }
14878else
14879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14880$as_echo "no" >&6; }
14881fi
14882
14883
14884  test -n "$DF" && break
14885done
14886
14887    else
14888      # If it succeeded, then it was overridden by the user. We will use it
14889      # for the tool.
14890
14891      # First remove it from the list of overridden variables, so we can test
14892      # for unknown variables in the end.
14893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14894
14895      # Check if we try to supply an empty value
14896      if test "x$DF" = x; then
14897        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14898$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14899        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14900$as_echo_n "checking for DF... " >&6; }
14901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14902$as_echo "disabled" >&6; }
14903      else
14904        # Check if the provided tool contains a complete path.
14905        tool_specified="$DF"
14906        tool_basename="${tool_specified##*/}"
14907        if test "x$tool_basename" = "x$tool_specified"; then
14908          # A command without a complete path is provided, search $PATH.
14909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14910$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14911          # Extract the first word of "$tool_basename", so it can be a program name with args.
14912set dummy $tool_basename; ac_word=$2
14913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14914$as_echo_n "checking for $ac_word... " >&6; }
14915if ${ac_cv_path_DF+:} false; then :
14916  $as_echo_n "(cached) " >&6
14917else
14918  case $DF in
14919  [\\/]* | ?:[\\/]*)
14920  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14921  ;;
14922  *)
14923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14924for as_dir in $PATH
14925do
14926  IFS=$as_save_IFS
14927  test -z "$as_dir" && as_dir=.
14928    for ac_exec_ext in '' $ac_executable_extensions; do
14929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14930    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14932    break 2
14933  fi
14934done
14935  done
14936IFS=$as_save_IFS
14937
14938  ;;
14939esac
14940fi
14941DF=$ac_cv_path_DF
14942if test -n "$DF"; then
14943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14944$as_echo "$DF" >&6; }
14945else
14946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14947$as_echo "no" >&6; }
14948fi
14949
14950
14951          if test "x$DF" = x; then
14952            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14953          fi
14954        else
14955          # Otherwise we believe it is a complete path. Use it as it is.
14956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14957$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14959$as_echo_n "checking for DF... " >&6; }
14960          if test ! -x "$tool_specified"; then
14961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14962$as_echo "not found" >&6; }
14963            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14964          fi
14965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14966$as_echo "$tool_specified" >&6; }
14967        fi
14968      fi
14969    fi
14970
14971  fi
14972
14973
14974
14975
14976  # Publish this variable in the help.
14977
14978
14979  if [ -z "${CPIO+x}" ]; then
14980    # The variable is not set by user, try to locate tool using the code snippet
14981    for ac_prog in cpio bsdcpio
14982do
14983  # Extract the first word of "$ac_prog", so it can be a program name with args.
14984set dummy $ac_prog; ac_word=$2
14985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14986$as_echo_n "checking for $ac_word... " >&6; }
14987if ${ac_cv_path_CPIO+:} false; then :
14988  $as_echo_n "(cached) " >&6
14989else
14990  case $CPIO in
14991  [\\/]* | ?:[\\/]*)
14992  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14993  ;;
14994  *)
14995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14996for as_dir in $PATH
14997do
14998  IFS=$as_save_IFS
14999  test -z "$as_dir" && as_dir=.
15000    for ac_exec_ext in '' $ac_executable_extensions; do
15001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15002    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15004    break 2
15005  fi
15006done
15007  done
15008IFS=$as_save_IFS
15009
15010  ;;
15011esac
15012fi
15013CPIO=$ac_cv_path_CPIO
15014if test -n "$CPIO"; then
15015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15016$as_echo "$CPIO" >&6; }
15017else
15018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15019$as_echo "no" >&6; }
15020fi
15021
15022
15023  test -n "$CPIO" && break
15024done
15025
15026  else
15027    # The variable is set, but is it from the command line or the environment?
15028
15029    # Try to remove the string !CPIO! from our list.
15030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15032      # If it failed, the variable was not from the command line. Ignore it,
15033      # but warn the user (except for BASH, which is always set by the calling BASH).
15034      if test "xCPIO" != xBASH; then
15035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15036$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15037      fi
15038      # Try to locate tool using the code snippet
15039      for ac_prog in cpio bsdcpio
15040do
15041  # Extract the first word of "$ac_prog", so it can be a program name with args.
15042set dummy $ac_prog; ac_word=$2
15043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15044$as_echo_n "checking for $ac_word... " >&6; }
15045if ${ac_cv_path_CPIO+:} false; then :
15046  $as_echo_n "(cached) " >&6
15047else
15048  case $CPIO in
15049  [\\/]* | ?:[\\/]*)
15050  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15051  ;;
15052  *)
15053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15054for as_dir in $PATH
15055do
15056  IFS=$as_save_IFS
15057  test -z "$as_dir" && as_dir=.
15058    for ac_exec_ext in '' $ac_executable_extensions; do
15059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15060    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15062    break 2
15063  fi
15064done
15065  done
15066IFS=$as_save_IFS
15067
15068  ;;
15069esac
15070fi
15071CPIO=$ac_cv_path_CPIO
15072if test -n "$CPIO"; then
15073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15074$as_echo "$CPIO" >&6; }
15075else
15076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15077$as_echo "no" >&6; }
15078fi
15079
15080
15081  test -n "$CPIO" && break
15082done
15083
15084    else
15085      # If it succeeded, then it was overridden by the user. We will use it
15086      # for the tool.
15087
15088      # First remove it from the list of overridden variables, so we can test
15089      # for unknown variables in the end.
15090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15091
15092      # Check if we try to supply an empty value
15093      if test "x$CPIO" = x; then
15094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15095$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15097$as_echo_n "checking for CPIO... " >&6; }
15098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15099$as_echo "disabled" >&6; }
15100      else
15101        # Check if the provided tool contains a complete path.
15102        tool_specified="$CPIO"
15103        tool_basename="${tool_specified##*/}"
15104        if test "x$tool_basename" = "x$tool_specified"; then
15105          # A command without a complete path is provided, search $PATH.
15106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15107$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15108          # Extract the first word of "$tool_basename", so it can be a program name with args.
15109set dummy $tool_basename; ac_word=$2
15110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15111$as_echo_n "checking for $ac_word... " >&6; }
15112if ${ac_cv_path_CPIO+:} false; then :
15113  $as_echo_n "(cached) " >&6
15114else
15115  case $CPIO in
15116  [\\/]* | ?:[\\/]*)
15117  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15118  ;;
15119  *)
15120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15121for as_dir in $PATH
15122do
15123  IFS=$as_save_IFS
15124  test -z "$as_dir" && as_dir=.
15125    for ac_exec_ext in '' $ac_executable_extensions; do
15126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15127    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15129    break 2
15130  fi
15131done
15132  done
15133IFS=$as_save_IFS
15134
15135  ;;
15136esac
15137fi
15138CPIO=$ac_cv_path_CPIO
15139if test -n "$CPIO"; then
15140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15141$as_echo "$CPIO" >&6; }
15142else
15143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15144$as_echo "no" >&6; }
15145fi
15146
15147
15148          if test "x$CPIO" = x; then
15149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15150          fi
15151        else
15152          # Otherwise we believe it is a complete path. Use it as it is.
15153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15154$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15156$as_echo_n "checking for CPIO... " >&6; }
15157          if test ! -x "$tool_specified"; then
15158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15159$as_echo "not found" >&6; }
15160            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15161          fi
15162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15163$as_echo "$tool_specified" >&6; }
15164        fi
15165      fi
15166    fi
15167
15168  fi
15169
15170
15171
15172
15173  # Publish this variable in the help.
15174
15175
15176  if [ -z "${NICE+x}" ]; then
15177    # The variable is not set by user, try to locate tool using the code snippet
15178    for ac_prog in nice
15179do
15180  # Extract the first word of "$ac_prog", so it can be a program name with args.
15181set dummy $ac_prog; ac_word=$2
15182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15183$as_echo_n "checking for $ac_word... " >&6; }
15184if ${ac_cv_path_NICE+:} false; then :
15185  $as_echo_n "(cached) " >&6
15186else
15187  case $NICE in
15188  [\\/]* | ?:[\\/]*)
15189  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15190  ;;
15191  *)
15192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15193for as_dir in $PATH
15194do
15195  IFS=$as_save_IFS
15196  test -z "$as_dir" && as_dir=.
15197    for ac_exec_ext in '' $ac_executable_extensions; do
15198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15199    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15201    break 2
15202  fi
15203done
15204  done
15205IFS=$as_save_IFS
15206
15207  ;;
15208esac
15209fi
15210NICE=$ac_cv_path_NICE
15211if test -n "$NICE"; then
15212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15213$as_echo "$NICE" >&6; }
15214else
15215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15216$as_echo "no" >&6; }
15217fi
15218
15219
15220  test -n "$NICE" && break
15221done
15222
15223  else
15224    # The variable is set, but is it from the command line or the environment?
15225
15226    # Try to remove the string !NICE! from our list.
15227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15229      # If it failed, the variable was not from the command line. Ignore it,
15230      # but warn the user (except for BASH, which is always set by the calling BASH).
15231      if test "xNICE" != xBASH; then
15232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15233$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15234      fi
15235      # Try to locate tool using the code snippet
15236      for ac_prog in nice
15237do
15238  # Extract the first word of "$ac_prog", so it can be a program name with args.
15239set dummy $ac_prog; ac_word=$2
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15241$as_echo_n "checking for $ac_word... " >&6; }
15242if ${ac_cv_path_NICE+:} false; then :
15243  $as_echo_n "(cached) " >&6
15244else
15245  case $NICE in
15246  [\\/]* | ?:[\\/]*)
15247  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15248  ;;
15249  *)
15250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15251for as_dir in $PATH
15252do
15253  IFS=$as_save_IFS
15254  test -z "$as_dir" && as_dir=.
15255    for ac_exec_ext in '' $ac_executable_extensions; do
15256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15257    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15259    break 2
15260  fi
15261done
15262  done
15263IFS=$as_save_IFS
15264
15265  ;;
15266esac
15267fi
15268NICE=$ac_cv_path_NICE
15269if test -n "$NICE"; then
15270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15271$as_echo "$NICE" >&6; }
15272else
15273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15274$as_echo "no" >&6; }
15275fi
15276
15277
15278  test -n "$NICE" && break
15279done
15280
15281    else
15282      # If it succeeded, then it was overridden by the user. We will use it
15283      # for the tool.
15284
15285      # First remove it from the list of overridden variables, so we can test
15286      # for unknown variables in the end.
15287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15288
15289      # Check if we try to supply an empty value
15290      if test "x$NICE" = x; then
15291        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15292$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15294$as_echo_n "checking for NICE... " >&6; }
15295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15296$as_echo "disabled" >&6; }
15297      else
15298        # Check if the provided tool contains a complete path.
15299        tool_specified="$NICE"
15300        tool_basename="${tool_specified##*/}"
15301        if test "x$tool_basename" = "x$tool_specified"; then
15302          # A command without a complete path is provided, search $PATH.
15303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15304$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15305          # Extract the first word of "$tool_basename", so it can be a program name with args.
15306set dummy $tool_basename; ac_word=$2
15307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15308$as_echo_n "checking for $ac_word... " >&6; }
15309if ${ac_cv_path_NICE+:} false; then :
15310  $as_echo_n "(cached) " >&6
15311else
15312  case $NICE in
15313  [\\/]* | ?:[\\/]*)
15314  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15315  ;;
15316  *)
15317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15318for as_dir in $PATH
15319do
15320  IFS=$as_save_IFS
15321  test -z "$as_dir" && as_dir=.
15322    for ac_exec_ext in '' $ac_executable_extensions; do
15323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15324    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15326    break 2
15327  fi
15328done
15329  done
15330IFS=$as_save_IFS
15331
15332  ;;
15333esac
15334fi
15335NICE=$ac_cv_path_NICE
15336if test -n "$NICE"; then
15337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15338$as_echo "$NICE" >&6; }
15339else
15340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15341$as_echo "no" >&6; }
15342fi
15343
15344
15345          if test "x$NICE" = x; then
15346            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15347          fi
15348        else
15349          # Otherwise we believe it is a complete path. Use it as it is.
15350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15351$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15352          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15353$as_echo_n "checking for NICE... " >&6; }
15354          if test ! -x "$tool_specified"; then
15355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15356$as_echo "not found" >&6; }
15357            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15358          fi
15359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15360$as_echo "$tool_specified" >&6; }
15361        fi
15362      fi
15363    fi
15364
15365  fi
15366
15367
15368
15369
15370  # Publish this variable in the help.
15371
15372
15373  if [ -z "${PANDOC+x}" ]; then
15374    # The variable is not set by user, try to locate tool using the code snippet
15375    for ac_prog in pandoc
15376do
15377  # Extract the first word of "$ac_prog", so it can be a program name with args.
15378set dummy $ac_prog; ac_word=$2
15379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15380$as_echo_n "checking for $ac_word... " >&6; }
15381if ${ac_cv_path_PANDOC+:} false; then :
15382  $as_echo_n "(cached) " >&6
15383else
15384  case $PANDOC in
15385  [\\/]* | ?:[\\/]*)
15386  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15387  ;;
15388  *)
15389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15390for as_dir in $PATH
15391do
15392  IFS=$as_save_IFS
15393  test -z "$as_dir" && as_dir=.
15394    for ac_exec_ext in '' $ac_executable_extensions; do
15395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15396    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15398    break 2
15399  fi
15400done
15401  done
15402IFS=$as_save_IFS
15403
15404  ;;
15405esac
15406fi
15407PANDOC=$ac_cv_path_PANDOC
15408if test -n "$PANDOC"; then
15409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15410$as_echo "$PANDOC" >&6; }
15411else
15412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15413$as_echo "no" >&6; }
15414fi
15415
15416
15417  test -n "$PANDOC" && break
15418done
15419
15420  else
15421    # The variable is set, but is it from the command line or the environment?
15422
15423    # Try to remove the string !PANDOC! from our list.
15424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15426      # If it failed, the variable was not from the command line. Ignore it,
15427      # but warn the user (except for BASH, which is always set by the calling BASH).
15428      if test "xPANDOC" != xBASH; then
15429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15430$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15431      fi
15432      # Try to locate tool using the code snippet
15433      for ac_prog in pandoc
15434do
15435  # Extract the first word of "$ac_prog", so it can be a program name with args.
15436set dummy $ac_prog; ac_word=$2
15437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15438$as_echo_n "checking for $ac_word... " >&6; }
15439if ${ac_cv_path_PANDOC+:} false; then :
15440  $as_echo_n "(cached) " >&6
15441else
15442  case $PANDOC in
15443  [\\/]* | ?:[\\/]*)
15444  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15445  ;;
15446  *)
15447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15448for as_dir in $PATH
15449do
15450  IFS=$as_save_IFS
15451  test -z "$as_dir" && as_dir=.
15452    for ac_exec_ext in '' $ac_executable_extensions; do
15453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15454    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15456    break 2
15457  fi
15458done
15459  done
15460IFS=$as_save_IFS
15461
15462  ;;
15463esac
15464fi
15465PANDOC=$ac_cv_path_PANDOC
15466if test -n "$PANDOC"; then
15467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15468$as_echo "$PANDOC" >&6; }
15469else
15470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15471$as_echo "no" >&6; }
15472fi
15473
15474
15475  test -n "$PANDOC" && break
15476done
15477
15478    else
15479      # If it succeeded, then it was overridden by the user. We will use it
15480      # for the tool.
15481
15482      # First remove it from the list of overridden variables, so we can test
15483      # for unknown variables in the end.
15484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15485
15486      # Check if we try to supply an empty value
15487      if test "x$PANDOC" = x; then
15488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15489$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15491$as_echo_n "checking for PANDOC... " >&6; }
15492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15493$as_echo "disabled" >&6; }
15494      else
15495        # Check if the provided tool contains a complete path.
15496        tool_specified="$PANDOC"
15497        tool_basename="${tool_specified##*/}"
15498        if test "x$tool_basename" = "x$tool_specified"; then
15499          # A command without a complete path is provided, search $PATH.
15500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15501$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15502          # Extract the first word of "$tool_basename", so it can be a program name with args.
15503set dummy $tool_basename; ac_word=$2
15504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15505$as_echo_n "checking for $ac_word... " >&6; }
15506if ${ac_cv_path_PANDOC+:} false; then :
15507  $as_echo_n "(cached) " >&6
15508else
15509  case $PANDOC in
15510  [\\/]* | ?:[\\/]*)
15511  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15512  ;;
15513  *)
15514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15515for as_dir in $PATH
15516do
15517  IFS=$as_save_IFS
15518  test -z "$as_dir" && as_dir=.
15519    for ac_exec_ext in '' $ac_executable_extensions; do
15520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15521    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15523    break 2
15524  fi
15525done
15526  done
15527IFS=$as_save_IFS
15528
15529  ;;
15530esac
15531fi
15532PANDOC=$ac_cv_path_PANDOC
15533if test -n "$PANDOC"; then
15534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15535$as_echo "$PANDOC" >&6; }
15536else
15537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15538$as_echo "no" >&6; }
15539fi
15540
15541
15542          if test "x$PANDOC" = x; then
15543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15544          fi
15545        else
15546          # Otherwise we believe it is a complete path. Use it as it is.
15547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15548$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15550$as_echo_n "checking for PANDOC... " >&6; }
15551          if test ! -x "$tool_specified"; then
15552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15553$as_echo "not found" >&6; }
15554            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15555          fi
15556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15557$as_echo "$tool_specified" >&6; }
15558        fi
15559      fi
15560    fi
15561
15562  fi
15563
15564
15565
15566
15567# Now we can determine OpenJDK build and target platforms. This is required to
15568# have early on.
15569# Make sure we can run config.sub.
15570$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15571  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15572
15573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15574$as_echo_n "checking build system type... " >&6; }
15575if ${ac_cv_build+:} false; then :
15576  $as_echo_n "(cached) " >&6
15577else
15578  ac_build_alias=$build_alias
15579test "x$ac_build_alias" = x &&
15580  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15581test "x$ac_build_alias" = x &&
15582  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15583ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15584  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15585
15586fi
15587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15588$as_echo "$ac_cv_build" >&6; }
15589case $ac_cv_build in
15590*-*-*) ;;
15591*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15592esac
15593build=$ac_cv_build
15594ac_save_IFS=$IFS; IFS='-'
15595set x $ac_cv_build
15596shift
15597build_cpu=$1
15598build_vendor=$2
15599shift; shift
15600# Remember, the first character of IFS is used to create $*,
15601# except with old shells:
15602build_os=$*
15603IFS=$ac_save_IFS
15604case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15605
15606
15607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15608$as_echo_n "checking host system type... " >&6; }
15609if ${ac_cv_host+:} false; then :
15610  $as_echo_n "(cached) " >&6
15611else
15612  if test "x$host_alias" = x; then
15613  ac_cv_host=$ac_cv_build
15614else
15615  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15616    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15617fi
15618
15619fi
15620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15621$as_echo "$ac_cv_host" >&6; }
15622case $ac_cv_host in
15623*-*-*) ;;
15624*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15625esac
15626host=$ac_cv_host
15627ac_save_IFS=$IFS; IFS='-'
15628set x $ac_cv_host
15629shift
15630host_cpu=$1
15631host_vendor=$2
15632shift; shift
15633# Remember, the first character of IFS is used to create $*,
15634# except with old shells:
15635host_os=$*
15636IFS=$ac_save_IFS
15637case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15638
15639
15640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15641$as_echo_n "checking target system type... " >&6; }
15642if ${ac_cv_target+:} false; then :
15643  $as_echo_n "(cached) " >&6
15644else
15645  if test "x$target_alias" = x; then
15646  ac_cv_target=$ac_cv_host
15647else
15648  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15649    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15650fi
15651
15652fi
15653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15654$as_echo "$ac_cv_target" >&6; }
15655case $ac_cv_target in
15656*-*-*) ;;
15657*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15658esac
15659target=$ac_cv_target
15660ac_save_IFS=$IFS; IFS='-'
15661set x $ac_cv_target
15662shift
15663target_cpu=$1
15664target_vendor=$2
15665shift; shift
15666# Remember, the first character of IFS is used to create $*,
15667# except with old shells:
15668target_os=$*
15669IFS=$ac_save_IFS
15670case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15671
15672
15673# The aliases save the names the user supplied, while $host etc.
15674# will get canonicalized.
15675test -n "$target_alias" &&
15676  test "$program_prefix$program_suffix$program_transform_name" = \
15677    NONENONEs,x,x, &&
15678  program_prefix=${target_alias}-
15679
15680  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15681  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15682  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15683  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15684  # to use the configure naming style.
15685
15686
15687
15688
15689
15690  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15691  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15692  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15693  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15694  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15695  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15696
15697
15698
15699  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15700
15701  case "$build_os" in
15702    *linux*)
15703      VAR_OS=linux
15704      VAR_OS_TYPE=unix
15705      ;;
15706    *solaris*)
15707      VAR_OS=solaris
15708      VAR_OS_TYPE=unix
15709      ;;
15710    *darwin*)
15711      VAR_OS=macosx
15712      VAR_OS_TYPE=unix
15713      ;;
15714    *bsd*)
15715      VAR_OS=bsd
15716      VAR_OS_TYPE=unix
15717      ;;
15718    *cygwin*)
15719      VAR_OS=windows
15720      VAR_OS_ENV=windows.cygwin
15721      ;;
15722    *mingw*)
15723      VAR_OS=windows
15724      VAR_OS_ENV=windows.msys
15725      ;;
15726    *aix*)
15727      VAR_OS=aix
15728      VAR_OS_TYPE=unix
15729      ;;
15730    *)
15731      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15732      ;;
15733  esac
15734
15735
15736  # First argument is the cpu name from the trip/quad
15737  case "$build_cpu" in
15738    x86_64)
15739      VAR_CPU=x86_64
15740      VAR_CPU_ARCH=x86
15741      VAR_CPU_BITS=64
15742      VAR_CPU_ENDIAN=little
15743      ;;
15744    i?86)
15745      VAR_CPU=x86
15746      VAR_CPU_ARCH=x86
15747      VAR_CPU_BITS=32
15748      VAR_CPU_ENDIAN=little
15749      ;;
15750    arm*)
15751      VAR_CPU=arm
15752      VAR_CPU_ARCH=arm
15753      VAR_CPU_BITS=32
15754      VAR_CPU_ENDIAN=little
15755      ;;
15756    aarch64)
15757      VAR_CPU=aarch64
15758      VAR_CPU_ARCH=aarch64
15759      VAR_CPU_BITS=64
15760      VAR_CPU_ENDIAN=little
15761      ;;
15762    powerpc)
15763      VAR_CPU=ppc
15764      VAR_CPU_ARCH=ppc
15765      VAR_CPU_BITS=32
15766      VAR_CPU_ENDIAN=big
15767      ;;
15768    powerpc64)
15769      VAR_CPU=ppc64
15770      VAR_CPU_ARCH=ppc
15771      VAR_CPU_BITS=64
15772      VAR_CPU_ENDIAN=big
15773      ;;
15774    powerpc64le)
15775      VAR_CPU=ppc64le
15776      VAR_CPU_ARCH=ppc
15777      VAR_CPU_BITS=64
15778      VAR_CPU_ENDIAN=little
15779      ;;
15780    s390)
15781      VAR_CPU=s390
15782      VAR_CPU_ARCH=s390
15783      VAR_CPU_BITS=32
15784      VAR_CPU_ENDIAN=big
15785      ;;
15786    s390x)
15787      VAR_CPU=s390x
15788      VAR_CPU_ARCH=s390
15789      VAR_CPU_BITS=64
15790      VAR_CPU_ENDIAN=big
15791      ;;
15792    sparc)
15793      VAR_CPU=sparc
15794      VAR_CPU_ARCH=sparc
15795      VAR_CPU_BITS=32
15796      VAR_CPU_ENDIAN=big
15797      ;;
15798    sparcv9|sparc64)
15799      VAR_CPU=sparcv9
15800      VAR_CPU_ARCH=sparc
15801      VAR_CPU_BITS=64
15802      VAR_CPU_ENDIAN=big
15803      ;;
15804    *)
15805      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15806      ;;
15807  esac
15808
15809  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15810  OPENJDK_BUILD_OS="$VAR_OS"
15811  if test "x$VAR_OS_TYPE" != x; then
15812    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15813  else
15814    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15815  fi
15816  if test "x$VAR_OS_ENV" != x; then
15817    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15818  else
15819    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15820  fi
15821  OPENJDK_BUILD_CPU="$VAR_CPU"
15822  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15823  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15824  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15825
15826
15827
15828
15829
15830
15831
15832
15833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15834$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15836$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15837
15838  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15839
15840  case "$host_os" in
15841    *linux*)
15842      VAR_OS=linux
15843      VAR_OS_TYPE=unix
15844      ;;
15845    *solaris*)
15846      VAR_OS=solaris
15847      VAR_OS_TYPE=unix
15848      ;;
15849    *darwin*)
15850      VAR_OS=macosx
15851      VAR_OS_TYPE=unix
15852      ;;
15853    *bsd*)
15854      VAR_OS=bsd
15855      VAR_OS_TYPE=unix
15856      ;;
15857    *cygwin*)
15858      VAR_OS=windows
15859      VAR_OS_ENV=windows.cygwin
15860      ;;
15861    *mingw*)
15862      VAR_OS=windows
15863      VAR_OS_ENV=windows.msys
15864      ;;
15865    *aix*)
15866      VAR_OS=aix
15867      VAR_OS_TYPE=unix
15868      ;;
15869    *)
15870      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15871      ;;
15872  esac
15873
15874
15875  # First argument is the cpu name from the trip/quad
15876  case "$host_cpu" in
15877    x86_64)
15878      VAR_CPU=x86_64
15879      VAR_CPU_ARCH=x86
15880      VAR_CPU_BITS=64
15881      VAR_CPU_ENDIAN=little
15882      ;;
15883    i?86)
15884      VAR_CPU=x86
15885      VAR_CPU_ARCH=x86
15886      VAR_CPU_BITS=32
15887      VAR_CPU_ENDIAN=little
15888      ;;
15889    arm*)
15890      VAR_CPU=arm
15891      VAR_CPU_ARCH=arm
15892      VAR_CPU_BITS=32
15893      VAR_CPU_ENDIAN=little
15894      ;;
15895    aarch64)
15896      VAR_CPU=aarch64
15897      VAR_CPU_ARCH=aarch64
15898      VAR_CPU_BITS=64
15899      VAR_CPU_ENDIAN=little
15900      ;;
15901    powerpc)
15902      VAR_CPU=ppc
15903      VAR_CPU_ARCH=ppc
15904      VAR_CPU_BITS=32
15905      VAR_CPU_ENDIAN=big
15906      ;;
15907    powerpc64)
15908      VAR_CPU=ppc64
15909      VAR_CPU_ARCH=ppc
15910      VAR_CPU_BITS=64
15911      VAR_CPU_ENDIAN=big
15912      ;;
15913    powerpc64le)
15914      VAR_CPU=ppc64le
15915      VAR_CPU_ARCH=ppc
15916      VAR_CPU_BITS=64
15917      VAR_CPU_ENDIAN=little
15918      ;;
15919    s390)
15920      VAR_CPU=s390
15921      VAR_CPU_ARCH=s390
15922      VAR_CPU_BITS=32
15923      VAR_CPU_ENDIAN=big
15924      ;;
15925    s390x)
15926      VAR_CPU=s390x
15927      VAR_CPU_ARCH=s390
15928      VAR_CPU_BITS=64
15929      VAR_CPU_ENDIAN=big
15930      ;;
15931    sparc)
15932      VAR_CPU=sparc
15933      VAR_CPU_ARCH=sparc
15934      VAR_CPU_BITS=32
15935      VAR_CPU_ENDIAN=big
15936      ;;
15937    sparcv9|sparc64)
15938      VAR_CPU=sparcv9
15939      VAR_CPU_ARCH=sparc
15940      VAR_CPU_BITS=64
15941      VAR_CPU_ENDIAN=big
15942      ;;
15943    *)
15944      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15945      ;;
15946  esac
15947
15948  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15949  OPENJDK_TARGET_OS="$VAR_OS"
15950  if test "x$VAR_OS_TYPE" != x; then
15951    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15952  else
15953    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15954  fi
15955  if test "x$VAR_OS_ENV" != x; then
15956    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15957  else
15958    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15959  fi
15960  OPENJDK_TARGET_CPU="$VAR_CPU"
15961  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15962  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15963  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15964
15965
15966
15967
15968
15969
15970
15971
15972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15973$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15975$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15976
15977
15978
15979# Check whether --with-target-bits was given.
15980if test "${with_target_bits+set}" = set; then :
15981  withval=$with_target_bits;
15982fi
15983
15984
15985  # We have three types of compiles:
15986  # native  == normal compilation, target system == build system
15987  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15988  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15989  #
15990  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15991    # We're doing a proper cross-compilation
15992    COMPILE_TYPE="cross"
15993  else
15994    COMPILE_TYPE="native"
15995  fi
15996
15997  if test "x$with_target_bits" != x; then
15998    if test "x$COMPILE_TYPE" = "xcross"; then
15999      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16000    fi
16001
16002    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16003      # A reduced build is requested
16004      COMPILE_TYPE="reduced"
16005      OPENJDK_TARGET_CPU_BITS=32
16006      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16007        OPENJDK_TARGET_CPU=x86
16008      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16009        OPENJDK_TARGET_CPU=sparc
16010      else
16011        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16012      fi
16013    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16014      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
16015    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16016      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16017$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16018    else
16019      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16020    fi
16021  fi
16022
16023
16024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16025$as_echo_n "checking compilation type... " >&6; }
16026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16027$as_echo "$COMPILE_TYPE" >&6; }
16028
16029
16030  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16031    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16032  else
16033    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16034  fi
16035
16036  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16037    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16038  else
16039    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16040  fi
16041
16042
16043
16044
16045
16046
16047  # Also store the legacy naming of the cpu.
16048  # Ie i586 and amd64 instead of x86 and x86_64
16049  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16050  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16051    OPENJDK_TARGET_CPU_LEGACY="i586"
16052  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16053    # On all platforms except MacOSX replace x86_64 with amd64.
16054    OPENJDK_TARGET_CPU_LEGACY="amd64"
16055  fi
16056
16057
16058  # And the second legacy naming of the cpu.
16059  # Ie i386 and amd64 instead of x86 and x86_64.
16060  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16061  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16062    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16063  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16064    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16065  fi
16066
16067
16068  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16069  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16070  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16071  OPENJDK_TARGET_CPU_ISADIR=""
16072  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16073    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16074      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16075    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16076      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16077    fi
16078  fi
16079
16080
16081  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16082  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16083  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16084    # On linux only, we replace x86 with i386.
16085    OPENJDK_TARGET_CPU_OSARCH="i386"
16086  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16087    # On all platforms except macosx, we replace x86_64 with amd64.
16088    OPENJDK_TARGET_CPU_OSARCH="amd64"
16089  fi
16090
16091
16092  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16093  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16094    OPENJDK_TARGET_CPU_JLI="i386"
16095  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16096    # On all platforms except macosx, we replace x86_64 with amd64.
16097    OPENJDK_TARGET_CPU_JLI="amd64"
16098  fi
16099
16100  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16101      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16102  else
16103      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16104  fi
16105
16106
16107  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16108  # Macosx is osx and x86_64 is x64
16109  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16110    OPENJDK_TARGET_OS_BUNDLE="osx"
16111  else
16112    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16113  fi
16114  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16115    OPENJDK_TARGET_CPU_BUNDLE="x64"
16116  else
16117    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16118  fi
16119  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16120
16121
16122  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16123    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16124    # unpack200.exe. This variable is used in
16125    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16126    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16127      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16128    fi
16129  fi
16130
16131  if test "x$COMPILE_TYPE" = "xcross"; then
16132    # FIXME: ... or should this include reduced builds..?
16133    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16134  else
16135    DEFINE_CROSS_COMPILE_ARCH=""
16136  fi
16137
16138
16139  # Convert openjdk platform names to hotspot names
16140
16141  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16142  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16143    HOTSPOT_TARGET_OS=bsd
16144  fi
16145
16146
16147  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16148  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16149    HOTSPOT_TARGET_OS_TYPE=posix
16150  fi
16151
16152
16153  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16154  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16155    HOTSPOT_TARGET_CPU=x86_32
16156  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16157    HOTSPOT_TARGET_CPU=sparc
16158  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16159    HOTSPOT_TARGET_CPU=ppc_64
16160  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16161    HOTSPOT_TARGET_CPU=ppc_64
16162  fi
16163
16164
16165  # This is identical with OPENJDK_*, but define anyway for consistency.
16166  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16167
16168
16169  # Setup HOTSPOT_TARGET_CPU_DEFINE
16170  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16171    HOTSPOT_TARGET_CPU_DEFINE=IA32
16172  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16173    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16174  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16175    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16176  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16177    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16178  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16179    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16180  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16181    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16182
16183  # The cpu defines below are for zero, we don't support them directly.
16184  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16185    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16186  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16187    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16188  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16189    HOTSPOT_TARGET_CPU_DEFINE=S390
16190  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16191    HOTSPOT_TARGET_CPU_DEFINE=S390
16192  elif test "x$OPENJDK_TARGET_CPU" != x; then
16193    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16194  fi
16195
16196
16197
16198
16199  # Also store the legacy naming of the cpu.
16200  # Ie i586 and amd64 instead of x86 and x86_64
16201  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16202  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16203    OPENJDK_BUILD_CPU_LEGACY="i586"
16204  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16205    # On all platforms except MacOSX replace x86_64 with amd64.
16206    OPENJDK_BUILD_CPU_LEGACY="amd64"
16207  fi
16208
16209
16210  # And the second legacy naming of the cpu.
16211  # Ie i386 and amd64 instead of x86 and x86_64.
16212  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16213  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16214    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16215  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16216    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16217  fi
16218
16219
16220  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16221  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16222  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16223  OPENJDK_BUILD_CPU_ISADIR=""
16224  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16225    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16226      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16227    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16228      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16229    fi
16230  fi
16231
16232
16233  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16234  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16235  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16236    # On linux only, we replace x86 with i386.
16237    OPENJDK_BUILD_CPU_OSARCH="i386"
16238  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16239    # On all platforms except macosx, we replace x86_64 with amd64.
16240    OPENJDK_BUILD_CPU_OSARCH="amd64"
16241  fi
16242
16243
16244  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16245  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16246    OPENJDK_BUILD_CPU_JLI="i386"
16247  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16248    # On all platforms except macosx, we replace x86_64 with amd64.
16249    OPENJDK_BUILD_CPU_JLI="amd64"
16250  fi
16251
16252  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16253      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16254  else
16255      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16256  fi
16257
16258
16259  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16260  # Macosx is osx and x86_64 is x64
16261  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16262    OPENJDK_BUILD_OS_BUNDLE="osx"
16263  else
16264    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16265  fi
16266  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16267    OPENJDK_BUILD_CPU_BUNDLE="x64"
16268  else
16269    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16270  fi
16271  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16272
16273
16274  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16275    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16276    # unpack200.exe. This variable is used in
16277    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16278    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16279      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16280    fi
16281  fi
16282
16283  if test "x$COMPILE_TYPE" = "xcross"; then
16284    # FIXME: ... or should this include reduced builds..?
16285    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16286  else
16287    DEFINE_CROSS_COMPILE_ARCH=""
16288  fi
16289
16290
16291  # Convert openjdk platform names to hotspot names
16292
16293  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16294  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16295    HOTSPOT_BUILD_OS=bsd
16296  fi
16297
16298
16299  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16300  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16301    HOTSPOT_BUILD_OS_TYPE=posix
16302  fi
16303
16304
16305  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16306  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16307    HOTSPOT_BUILD_CPU=x86_32
16308  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16309    HOTSPOT_BUILD_CPU=sparc
16310  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16311    HOTSPOT_BUILD_CPU=ppc_64
16312  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16313    HOTSPOT_BUILD_CPU=ppc_64
16314  fi
16315
16316
16317  # This is identical with OPENJDK_*, but define anyway for consistency.
16318  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16319
16320
16321  # Setup HOTSPOT_BUILD_CPU_DEFINE
16322  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16323    HOTSPOT_BUILD_CPU_DEFINE=IA32
16324  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16325    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16326  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16327    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16328  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16329    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16330  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16331    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16332  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16333    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16334
16335  # The cpu defines below are for zero, we don't support them directly.
16336  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16337    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16338  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16339    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16340  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16341    HOTSPOT_BUILD_CPU_DEFINE=S390
16342  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16343    HOTSPOT_BUILD_CPU_DEFINE=S390
16344  elif test "x$OPENJDK_BUILD_CPU" != x; then
16345    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16346  fi
16347
16348
16349
16350
16351
16352
16353# Continue setting up basic stuff. Most remaining code require fundamental tools.
16354
16355  # Save the current directory this script was started from
16356  CURDIR="$PWD"
16357
16358  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16359  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16360  # was not available at that time.
16361  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16362  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16363    ORIGINAL_PATH="$REWRITTEN_PATH"
16364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16365$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16366  fi
16367
16368  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16369    PATH_SEP=";"
16370
16371  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16372  if test $SRC_ROOT_LENGTH -gt 100; then
16373    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16374  fi
16375
16376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16378$as_echo_n "checking cygwin release... " >&6; }
16379    CYGWIN_VERSION=`$UNAME -r`
16380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16381$as_echo "$CYGWIN_VERSION" >&6; }
16382    WINDOWS_ENV_VENDOR='cygwin'
16383    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16384
16385    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16386    if test "x$CYGWIN_VERSION_OLD" != x; then
16387      { $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
16388$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;}
16389      as_fn_error $? "Cannot continue" "$LINENO" 5
16390    fi
16391    if test "x$CYGPATH" = x; then
16392      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16393    fi
16394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16395$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16396    # The cmd output ends with Windows line endings (CR/LF)
16397    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16398    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16399    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16401$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16402    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16403    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16404    if test "x$test_cygdrive_prefix" = x; then
16405      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16406    fi
16407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16409$as_echo_n "checking msys release... " >&6; }
16410    MSYS_VERSION=`$UNAME -r`
16411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16412$as_echo "$MSYS_VERSION" >&6; }
16413
16414    WINDOWS_ENV_VENDOR='msys'
16415    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16416
16417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16418$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16419    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16420    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16421
16422  windows_path="$MSYS_ROOT_PATH"
16423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16424    unix_path=`$CYGPATH -u "$windows_path"`
16425    MSYS_ROOT_PATH="$unix_path"
16426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16428    MSYS_ROOT_PATH="$unix_path"
16429  fi
16430
16431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16432$as_echo "$MSYS_ROOT_PATH" >&6; }
16433    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16434  else
16435    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16436  fi
16437
16438  # Test if windows or unix (cygwin/msys) find is first in path.
16439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16440$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16441  FIND_BINARY_OUTPUT=`find --version 2>&1`
16442  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16444$as_echo "unix style" >&6; }
16445  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16447$as_echo "Windows" >&6; }
16448    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16449$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16450    { $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
16451$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16452    as_fn_error $? "Cannot continue" "$LINENO" 5
16453  else
16454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16455$as_echo "unknown" >&6; }
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16457$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16458  fi
16459
16460  else
16461    PATH_SEP=":"
16462  fi
16463
16464
16465  # We get the top-level directory from the supporting wrappers.
16466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16467$as_echo_n "checking for top-level directory... " >&6; }
16468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16469$as_echo "$TOPDIR" >&6; }
16470
16471
16472  # Save the original version of TOPDIR for string comparisons
16473  ORIGINAL_TOPDIR="$TOPDIR"
16474
16475
16476  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16477
16478  # Only process if variable expands to non-empty
16479
16480  if test "x$CURDIR" != x; then
16481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16482
16483  # Input might be given as Windows format, start by converting to
16484  # unix format.
16485  path="$CURDIR"
16486  new_path=`$CYGPATH -u "$path"`
16487
16488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16491  # "foo.exe" is OK but "foo" is an error.
16492  #
16493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16494  # It is also a way to make sure we got the proper file name for the real test later on.
16495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16496  if test "x$test_shortpath" = x; then
16497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16498$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16499    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16500  fi
16501
16502  # Call helper function which possibly converts this using DOS-style short mode.
16503  # If so, the updated path is stored in $new_path.
16504
16505  input_path="$new_path"
16506  # Check if we need to convert this using DOS-style short mode. If the path
16507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16508  # take no chances and rewrite it.
16509  # Note: m4 eats our [], so we need to use [ and ] instead.
16510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16511  if test "x$has_forbidden_chars" != x; then
16512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16516      # Going to short mode and back again did indeed matter. Since short mode is
16517      # case insensitive, let's make it lowercase to improve readability.
16518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16519      # Now convert it back to Unix-style (cygpath)
16520      input_path=`$CYGPATH -u "$shortmode_path"`
16521      new_path="$input_path"
16522    fi
16523  fi
16524
16525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16526  if test "x$test_cygdrive_prefix" = x; then
16527    # As a simple fix, exclude /usr/bin since it's not a real path.
16528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16530      # a path prefixed by /cygdrive for fixpath to work.
16531      new_path="$CYGWIN_ROOT_PATH$input_path"
16532    fi
16533  fi
16534
16535
16536  if test "x$path" != "x$new_path"; then
16537    CURDIR="$new_path"
16538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16539$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16540  fi
16541
16542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16543
16544  path="$CURDIR"
16545  has_colon=`$ECHO $path | $GREP ^.:`
16546  new_path="$path"
16547  if test "x$has_colon" = x; then
16548    # Not in mixed or Windows style, start by that.
16549    new_path=`cmd //c echo $path`
16550  fi
16551
16552
16553  input_path="$new_path"
16554  # Check if we need to convert this using DOS-style short mode. If the path
16555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16556  # take no chances and rewrite it.
16557  # Note: m4 eats our [], so we need to use [ and ] instead.
16558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16559  if test "x$has_forbidden_chars" != x; then
16560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16562  fi
16563
16564
16565  windows_path="$new_path"
16566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16567    unix_path=`$CYGPATH -u "$windows_path"`
16568    new_path="$unix_path"
16569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16571    new_path="$unix_path"
16572  fi
16573
16574  if test "x$path" != "x$new_path"; then
16575    CURDIR="$new_path"
16576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16577$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16578  fi
16579
16580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16582
16583    else
16584      # We're on a unix platform. Hooray! :)
16585      path="$CURDIR"
16586      has_space=`$ECHO "$path" | $GREP " "`
16587      if test "x$has_space" != x; then
16588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16589$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16591      fi
16592
16593      # Use eval to expand a potential ~
16594      eval path="$path"
16595      if test ! -f "$path" && test ! -d "$path"; then
16596        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16597      fi
16598
16599      if test -d "$path"; then
16600        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16601      else
16602        dir="`$DIRNAME "$path"`"
16603        base="`$BASENAME "$path"`"
16604        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16605      fi
16606    fi
16607  fi
16608
16609
16610  # Only process if variable expands to non-empty
16611
16612  if test "x$TOPDIR" != x; then
16613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16614
16615  # Input might be given as Windows format, start by converting to
16616  # unix format.
16617  path="$TOPDIR"
16618  new_path=`$CYGPATH -u "$path"`
16619
16620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16623  # "foo.exe" is OK but "foo" is an error.
16624  #
16625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16626  # It is also a way to make sure we got the proper file name for the real test later on.
16627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16628  if test "x$test_shortpath" = x; then
16629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16630$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16631    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16632  fi
16633
16634  # Call helper function which possibly converts this using DOS-style short mode.
16635  # If so, the updated path is stored in $new_path.
16636
16637  input_path="$new_path"
16638  # Check if we need to convert this using DOS-style short mode. If the path
16639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16640  # take no chances and rewrite it.
16641  # Note: m4 eats our [], so we need to use [ and ] instead.
16642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16643  if test "x$has_forbidden_chars" != x; then
16644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16648      # Going to short mode and back again did indeed matter. Since short mode is
16649      # case insensitive, let's make it lowercase to improve readability.
16650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16651      # Now convert it back to Unix-style (cygpath)
16652      input_path=`$CYGPATH -u "$shortmode_path"`
16653      new_path="$input_path"
16654    fi
16655  fi
16656
16657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16658  if test "x$test_cygdrive_prefix" = x; then
16659    # As a simple fix, exclude /usr/bin since it's not a real path.
16660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16662      # a path prefixed by /cygdrive for fixpath to work.
16663      new_path="$CYGWIN_ROOT_PATH$input_path"
16664    fi
16665  fi
16666
16667
16668  if test "x$path" != "x$new_path"; then
16669    TOPDIR="$new_path"
16670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16671$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16672  fi
16673
16674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16675
16676  path="$TOPDIR"
16677  has_colon=`$ECHO $path | $GREP ^.:`
16678  new_path="$path"
16679  if test "x$has_colon" = x; then
16680    # Not in mixed or Windows style, start by that.
16681    new_path=`cmd //c echo $path`
16682  fi
16683
16684
16685  input_path="$new_path"
16686  # Check if we need to convert this using DOS-style short mode. If the path
16687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16688  # take no chances and rewrite it.
16689  # Note: m4 eats our [], so we need to use [ and ] instead.
16690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16691  if test "x$has_forbidden_chars" != x; then
16692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16694  fi
16695
16696
16697  windows_path="$new_path"
16698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16699    unix_path=`$CYGPATH -u "$windows_path"`
16700    new_path="$unix_path"
16701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16703    new_path="$unix_path"
16704  fi
16705
16706  if test "x$path" != "x$new_path"; then
16707    TOPDIR="$new_path"
16708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16709$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16710  fi
16711
16712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16714
16715    else
16716      # We're on a unix platform. Hooray! :)
16717      path="$TOPDIR"
16718      has_space=`$ECHO "$path" | $GREP " "`
16719      if test "x$has_space" != x; then
16720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16721$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16723      fi
16724
16725      # Use eval to expand a potential ~
16726      eval path="$path"
16727      if test ! -f "$path" && test ! -d "$path"; then
16728        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16729      fi
16730
16731      if test -d "$path"; then
16732        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16733      else
16734        dir="`$DIRNAME "$path"`"
16735        base="`$BASENAME "$path"`"
16736        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16737      fi
16738    fi
16739  fi
16740
16741  # SRC_ROOT is a traditional alias for TOPDIR.
16742  SRC_ROOT=$TOPDIR
16743
16744  # Calculate a canonical version of TOPDIR for string comparisons
16745  CANONICAL_TOPDIR=$TOPDIR
16746
16747  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16748    # Follow a chain of symbolic links. Use readlink
16749    # where it exists, else fall back to horribly
16750    # complicated shell code.
16751    if test "x$READLINK_TESTED" != yes; then
16752      # On MacOSX there is a readlink tool with a different
16753      # purpose than the GNU readlink tool. Check the found readlink.
16754      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16755      if test "x$ISGNU" = x; then
16756        # A readlink that we do not know how to use.
16757        # Are there other non-GNU readlinks out there?
16758        READLINK_TESTED=yes
16759        READLINK=
16760      fi
16761    fi
16762
16763    if test "x$READLINK" != x; then
16764      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16765    else
16766      # Save the current directory for restoring afterwards
16767      STARTDIR=$PWD
16768      COUNTER=0
16769      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16770      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16771      cd $sym_link_dir
16772      # Use -P flag to resolve symlinks in directories.
16773      cd `$THEPWDCMD -P`
16774      sym_link_dir=`$THEPWDCMD -P`
16775      # Resolve file symlinks
16776      while test $COUNTER -lt 20; do
16777        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16778        if test "x$ISLINK" == x; then
16779          # This is not a symbolic link! We are done!
16780          break
16781        fi
16782        # Again resolve directory symlinks since the target of the just found
16783        # link could be in a different directory
16784        cd `$DIRNAME $ISLINK`
16785        sym_link_dir=`$THEPWDCMD -P`
16786        sym_link_file=`$BASENAME $ISLINK`
16787        let COUNTER=COUNTER+1
16788      done
16789      cd $STARTDIR
16790      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16791    fi
16792  fi
16793
16794
16795
16796  # Locate the directory of this script.
16797  AUTOCONF_DIR=$TOPDIR/common/autoconf
16798
16799  # Setup username (for use in adhoc version strings etc)
16800  # Outer [ ] to quote m4.
16801   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16802
16803
16804
16805# Check if it's a pure open build or if custom sources are to be used.
16806
16807  # Check whether --enable-openjdk-only was given.
16808if test "${enable_openjdk_only+set}" = set; then :
16809  enableval=$enable_openjdk_only;
16810else
16811  enable_openjdk_only="no"
16812fi
16813
16814
16815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16816$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16818$as_echo "$enable_openjdk_only" >&6; }
16819  if test "x$enable_openjdk_only" = "xyes"; then
16820    SUPPRESS_CUSTOM_EXTENSIONS="true"
16821  elif test "x$enable_openjdk_only" = "xno"; then
16822    SUPPRESS_CUSTOM_EXTENSIONS="false"
16823  else
16824    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16825  fi
16826
16827  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16828  # the IncludeCustomExtension macro.
16829
16830
16831# Check whether --with-custom-make-dir was given.
16832if test "${with_custom_make_dir+set}" = set; then :
16833  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
16834$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16835fi
16836
16837
16838
16839
16840# These are needed to be able to create a configuration name (and thus the output directory)
16841
16842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16843$as_echo_n "checking which variant of the JDK to build... " >&6; }
16844
16845# Check whether --with-jdk-variant was given.
16846if test "${with_jdk_variant+set}" = set; then :
16847  withval=$with_jdk_variant;
16848fi
16849
16850
16851  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16852    JDK_VARIANT="normal"
16853  else
16854    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16855  fi
16856
16857
16858
16859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16860$as_echo "$JDK_VARIANT" >&6; }
16861
16862
16863  DEBUG_LEVEL="release"
16864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16865$as_echo_n "checking which debug level to use... " >&6; }
16866  # Check whether --enable-debug was given.
16867if test "${enable_debug+set}" = set; then :
16868  enableval=$enable_debug;
16869        ENABLE_DEBUG="${enableval}"
16870        DEBUG_LEVEL="fastdebug"
16871
16872else
16873  ENABLE_DEBUG="no"
16874fi
16875
16876
16877
16878# Check whether --with-debug-level was given.
16879if test "${with_debug_level+set}" = set; then :
16880  withval=$with_debug_level;
16881        DEBUG_LEVEL="${withval}"
16882        if test "x$ENABLE_DEBUG" = xyes; then
16883          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16884        fi
16885
16886fi
16887
16888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16889$as_echo "$DEBUG_LEVEL" >&6; }
16890
16891  if test "x$DEBUG_LEVEL" != xrelease && \
16892      test "x$DEBUG_LEVEL" != xoptimized && \
16893      test "x$DEBUG_LEVEL" != xfastdebug && \
16894      test "x$DEBUG_LEVEL" != xslowdebug; then
16895    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16896  fi
16897
16898  # Translate DEBUG_LEVEL to debug level used by Hotspot
16899  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16900  if test "x$DEBUG_LEVEL" = xrelease; then
16901    HOTSPOT_DEBUG_LEVEL="product"
16902  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16903    HOTSPOT_DEBUG_LEVEL="debug"
16904  fi
16905
16906  if test "x$DEBUG_LEVEL" = xoptimized; then
16907    # The debug level 'optimized' is a little special because it is currently only
16908    # applicable to the HotSpot build where it means to build a completely
16909    # optimized version of the VM without any debugging code (like for the
16910    # 'release' debug level which is called 'product' in the HotSpot build) but
16911    # with the exception that it can contain additional code which is otherwise
16912    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16913    # test new and/or experimental features which are not intended for customer
16914    # shipment. Because these new features need to be tested and benchmarked in
16915    # real world scenarios, we want to build the containing JDK at the 'release'
16916    # debug level.
16917    DEBUG_LEVEL="release"
16918  fi
16919
16920
16921
16922
16923
16924
16925# Check whether --with-jvm-variants was given.
16926if test "${with_jvm_variants+set}" = set; then :
16927  withval=$with_jvm_variants;
16928fi
16929
16930
16931
16932
16933# Check whether --with-cpu-port was given.
16934if test "${with_cpu_port+set}" = set; then :
16935  withval=$with_cpu_port;
16936fi
16937
16938
16939  if test "x$with_cpu_port" != x; then
16940    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16941      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16942    fi
16943    if test "x$with_cpu_port" != xarm64 && \
16944        test "x$with_cpu_port" != xaarch64; then
16945      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16946    fi
16947    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16948  fi
16949
16950
16951  if test "x$with_jvm_variants" = x; then
16952    with_jvm_variants="server"
16953  fi
16954  JVM_VARIANTS_OPT="$with_jvm_variants"
16955
16956  # Has the user listed more than one variant?
16957  # Additional [] needed to keep m4 from mangling shell constructs.
16958  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16959    BUILDING_MULTIPLE_JVM_VARIANTS=true
16960  else
16961    BUILDING_MULTIPLE_JVM_VARIANTS=false
16962  fi
16963  # Replace the commas with AND for use in the build directory name.
16964  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16965
16966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16967$as_echo_n "checking which variants of the JVM to build... " >&6; }
16968  # JVM_VARIANTS is a space-separated list.
16969  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16970  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16972$as_echo "$JVM_VARIANTS" >&6; }
16973
16974  # Check that the selected variants are valid
16975
16976  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16977  # Notice that the original variant failes on SLES 10 and 11
16978  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16979  STACK=${JVM_VARIANTS// /$'\n'}
16980  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16981  if test "x$INVALID_VARIANTS" != x; then
16982    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16983$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16984    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16985  fi
16986
16987  # All "special" variants share the same output directory ("server")
16988  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16989  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16990  STACK=${JVM_VARIANTS// /$'\n'}
16991  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16992  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16993    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16994  fi
16995
16996  # The "main" variant is the one used by other libs to link against during the
16997  # build.
16998  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16999    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17000    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17001      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17002        JVM_VARIANT_MAIN="$variant"
17003        break
17004      fi
17005    done
17006  else
17007    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17008  fi
17009
17010
17011
17012
17013
17014  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17015    # zero behaves as a platform and rewrites these values. This is really weird. :(
17016    # We are guaranteed that we do not build any other variants when building zero.
17017    HOTSPOT_TARGET_CPU=zero
17018    HOTSPOT_TARGET_CPU_ARCH=zero
17019  fi
17020
17021
17022# With basic setup done, call the custom early hook.
17023
17024
17025# Check if we have devkits, extra paths or sysroot set.
17026
17027
17028# Check whether --with-devkit was given.
17029if test "${with_devkit+set}" = set; then :
17030  withval=$with_devkit;
17031
17032  # Only process if variable expands to non-empty
17033
17034  if test "x$with_devkit" != x; then
17035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17036
17037  # Input might be given as Windows format, start by converting to
17038  # unix format.
17039  path="$with_devkit"
17040  new_path=`$CYGPATH -u "$path"`
17041
17042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17045  # "foo.exe" is OK but "foo" is an error.
17046  #
17047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17048  # It is also a way to make sure we got the proper file name for the real test later on.
17049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17050  if test "x$test_shortpath" = x; then
17051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17052$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17053    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17054  fi
17055
17056  # Call helper function which possibly converts this using DOS-style short mode.
17057  # If so, the updated path is stored in $new_path.
17058
17059  input_path="$new_path"
17060  # Check if we need to convert this using DOS-style short mode. If the path
17061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17062  # take no chances and rewrite it.
17063  # Note: m4 eats our [], so we need to use [ and ] instead.
17064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17065  if test "x$has_forbidden_chars" != x; then
17066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17070      # Going to short mode and back again did indeed matter. Since short mode is
17071      # case insensitive, let's make it lowercase to improve readability.
17072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17073      # Now convert it back to Unix-style (cygpath)
17074      input_path=`$CYGPATH -u "$shortmode_path"`
17075      new_path="$input_path"
17076    fi
17077  fi
17078
17079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17080  if test "x$test_cygdrive_prefix" = x; then
17081    # As a simple fix, exclude /usr/bin since it's not a real path.
17082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17084      # a path prefixed by /cygdrive for fixpath to work.
17085      new_path="$CYGWIN_ROOT_PATH$input_path"
17086    fi
17087  fi
17088
17089
17090  if test "x$path" != "x$new_path"; then
17091    with_devkit="$new_path"
17092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17093$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17094  fi
17095
17096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17097
17098  path="$with_devkit"
17099  has_colon=`$ECHO $path | $GREP ^.:`
17100  new_path="$path"
17101  if test "x$has_colon" = x; then
17102    # Not in mixed or Windows style, start by that.
17103    new_path=`cmd //c echo $path`
17104  fi
17105
17106
17107  input_path="$new_path"
17108  # Check if we need to convert this using DOS-style short mode. If the path
17109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17110  # take no chances and rewrite it.
17111  # Note: m4 eats our [], so we need to use [ and ] instead.
17112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17113  if test "x$has_forbidden_chars" != x; then
17114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17116  fi
17117
17118
17119  windows_path="$new_path"
17120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17121    unix_path=`$CYGPATH -u "$windows_path"`
17122    new_path="$unix_path"
17123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17125    new_path="$unix_path"
17126  fi
17127
17128  if test "x$path" != "x$new_path"; then
17129    with_devkit="$new_path"
17130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17131$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17132  fi
17133
17134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17136
17137    else
17138      # We're on a unix platform. Hooray! :)
17139      path="$with_devkit"
17140      has_space=`$ECHO "$path" | $GREP " "`
17141      if test "x$has_space" != x; then
17142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17143$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17145      fi
17146
17147      # Use eval to expand a potential ~
17148      eval path="$path"
17149      if test ! -f "$path" && test ! -d "$path"; then
17150        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17151      fi
17152
17153      if test -d "$path"; then
17154        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17155      else
17156        dir="`$DIRNAME "$path"`"
17157        base="`$BASENAME "$path"`"
17158        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17159      fi
17160    fi
17161  fi
17162
17163        DEVKIT_ROOT="$with_devkit"
17164        # Check for a meta data info file in the root of the devkit
17165        if test -f "$DEVKIT_ROOT/devkit.info"; then
17166          . $DEVKIT_ROOT/devkit.info
17167          # This potentially sets the following:
17168          # A descriptive name of the devkit
17169
17170  if test "x$DEVKIT_NAME" = x; then
17171    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17172  fi
17173
17174          # Corresponds to --with-extra-path
17175
17176  if test "x$DEVKIT_EXTRA_PATH" = x; then
17177    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17178  fi
17179
17180          # Corresponds to --with-toolchain-path
17181
17182  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17183    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17184  fi
17185
17186          # Corresponds to --with-sysroot
17187
17188  if test "x$DEVKIT_SYSROOT" = x; then
17189    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17190  fi
17191
17192
17193          # Identifies the Visual Studio version in the devkit
17194
17195  if test "x$DEVKIT_VS_VERSION" = x; then
17196    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17197  fi
17198
17199          # The Visual Studio include environment variable
17200
17201  if test "x$DEVKIT_VS_INCLUDE" = x; then
17202    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17203  fi
17204
17205          # The Visual Studio lib environment variable
17206
17207  if test "x$DEVKIT_VS_LIB" = x; then
17208    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17209  fi
17210
17211          # Corresponds to --with-msvcr-dll
17212
17213  if test "x$DEVKIT_MSVCR_DLL" = x; then
17214    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17215  fi
17216
17217          # Corresponds to --with-msvcp-dll
17218
17219  if test "x$DEVKIT_MSVCP_DLL" = x; then
17220    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17221  fi
17222
17223        fi
17224
17225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17226$as_echo_n "checking for devkit... " >&6; }
17227        if test "x$DEVKIT_NAME" != x; then
17228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17229$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17230        else
17231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17232$as_echo "$DEVKIT_ROOT" >&6; }
17233        fi
17234
17235
17236  if test "x$DEVKIT_EXTRA_PATH" != x; then
17237    if test "x$EXTRA_PATH" = x; then
17238      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17239    else
17240      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17241    fi
17242  fi
17243
17244
17245        # Fallback default of just /bin if DEVKIT_PATH is not defined
17246        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17247          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17248        fi
17249
17250  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17251    if test "x$TOOLCHAIN_PATH" = x; then
17252      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17253    else
17254      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17255    fi
17256  fi
17257
17258
17259        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17260        # places for backwards compatiblity.
17261        if test "x$DEVKIT_SYSROOT" != x; then
17262          SYSROOT="$DEVKIT_SYSROOT"
17263        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17264          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17265        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17266          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17267        fi
17268
17269
17270fi
17271
17272
17273  # You can force the sysroot if the sysroot encoded into the compiler tools
17274  # is not correct.
17275
17276# Check whether --with-sys-root was given.
17277if test "${with_sys_root+set}" = set; then :
17278  withval=$with_sys_root; SYSROOT=$with_sys_root
17279
17280fi
17281
17282
17283
17284# Check whether --with-sysroot was given.
17285if test "${with_sysroot+set}" = set; then :
17286  withval=$with_sysroot; SYSROOT=$with_sysroot
17287
17288fi
17289
17290
17291
17292# Check whether --with-tools-dir was given.
17293if test "${with_tools_dir+set}" = set; then :
17294  withval=$with_tools_dir;
17295  if test "x$with_tools_dir" != x; then
17296    if test "x$TOOLCHAIN_PATH" = x; then
17297      TOOLCHAIN_PATH="$with_tools_dir"
17298    else
17299      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17300    fi
17301  fi
17302
17303
17304fi
17305
17306
17307
17308# Check whether --with-toolchain-path was given.
17309if test "${with_toolchain_path+set}" = set; then :
17310  withval=$with_toolchain_path;
17311  if test "x$with_toolchain_path" != x; then
17312    if test "x$TOOLCHAIN_PATH" = x; then
17313      TOOLCHAIN_PATH="$with_toolchain_path"
17314    else
17315      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17316    fi
17317  fi
17318
17319
17320fi
17321
17322
17323
17324# Check whether --with-extra-path was given.
17325if test "${with_extra_path+set}" = set; then :
17326  withval=$with_extra_path;
17327  if test "x$with_extra_path" != x; then
17328    if test "x$EXTRA_PATH" = x; then
17329      EXTRA_PATH="$with_extra_path"
17330    else
17331      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17332    fi
17333  fi
17334
17335
17336fi
17337
17338
17339  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17340    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17341    # If not, detect if Xcode is installed by running xcodebuild -version
17342    # if no Xcode installed, xcodebuild exits with 1
17343    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17344    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17345      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17346      # fall back on the stub binary in /usr/bin/xcodebuild
17347      # Extract the first word of "xcodebuild", so it can be a program name with args.
17348set dummy xcodebuild; ac_word=$2
17349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17350$as_echo_n "checking for $ac_word... " >&6; }
17351if ${ac_cv_path_XCODEBUILD+:} false; then :
17352  $as_echo_n "(cached) " >&6
17353else
17354  case $XCODEBUILD in
17355  [\\/]* | ?:[\\/]*)
17356  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17357  ;;
17358  *)
17359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17360for as_dir in $TOOLCHAIN_PATH
17361do
17362  IFS=$as_save_IFS
17363  test -z "$as_dir" && as_dir=.
17364    for ac_exec_ext in '' $ac_executable_extensions; do
17365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17366    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17368    break 2
17369  fi
17370done
17371  done
17372IFS=$as_save_IFS
17373
17374  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17375  ;;
17376esac
17377fi
17378XCODEBUILD=$ac_cv_path_XCODEBUILD
17379if test -n "$XCODEBUILD"; then
17380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17381$as_echo "$XCODEBUILD" >&6; }
17382else
17383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17384$as_echo "no" >&6; }
17385fi
17386
17387
17388    else
17389      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17390      # when only the command line tools are installed there are no SDKs, so headers
17391      # are copied into the system frameworks
17392      XCODEBUILD=
17393
17394    fi
17395
17396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17397$as_echo_n "checking for sdk name... " >&6; }
17398
17399# Check whether --with-sdk-name was given.
17400if test "${with_sdk_name+set}" = set; then :
17401  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17402
17403fi
17404
17405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17406$as_echo "$SDKNAME" >&6; }
17407
17408    # if toolchain path is specified then don't rely on system headers, they may not compile
17409    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17410    test -z "$TOOLCHAIN_PATH" && \
17411      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17412
17413    if test -z "$SYSROOT"; then
17414      if test -n "$XCODEBUILD"; then
17415        # if we don't have system headers, use default SDK name (last resort)
17416        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17417          SDKNAME=${SDKNAME:-macosx}
17418        fi
17419
17420        if test -n "$SDKNAME"; then
17421          # Call xcodebuild to determine SYSROOT
17422          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17423        fi
17424      else
17425        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17426          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
17427        fi
17428      fi
17429    else
17430      # warn user if --with-sdk-name was also set
17431      if test -n "$with_sdk_name"; then
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17433$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17434      fi
17435    fi
17436
17437    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17438      # If no system framework headers, then SYSROOT must be set, or we won't build
17439      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
17440    fi
17441
17442    # Perform a basic sanity test
17443    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17444      if test -z "$SYSROOT"; then
17445        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
17446      else
17447        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17448      fi
17449    fi
17450
17451    # set SDKROOT too, Xcode tools will pick it up
17452    SDKROOT="$SYSROOT"
17453
17454  fi
17455
17456  # Prepend the extra path to the global path
17457
17458  if test "x$EXTRA_PATH" != x; then
17459    if test "x$PATH" = x; then
17460      PATH="$EXTRA_PATH"
17461    else
17462      PATH="$EXTRA_PATH:$PATH"
17463    fi
17464  fi
17465
17466
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17468$as_echo_n "checking for sysroot... " >&6; }
17469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17470$as_echo "$SYSROOT" >&6; }
17471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17472$as_echo_n "checking for toolchain path... " >&6; }
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17474$as_echo "$TOOLCHAIN_PATH" >&6; }
17475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17476$as_echo_n "checking for extra path... " >&6; }
17477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17478$as_echo "$EXTRA_PATH" >&6; }
17479
17480
17481# To properly create a configuration name, we need to have the OpenJDK target
17482# and options (variants and debug level) parsed.
17483
17484
17485
17486# Check whether --with-conf-name was given.
17487if test "${with_conf_name+set}" = set; then :
17488  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17489fi
17490
17491
17492  # Test from where we are running configure, in or outside of src root.
17493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17494$as_echo_n "checking where to store configuration... " >&6; }
17495  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17496      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17497      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17498    # We are running configure from the src root.
17499    # Create a default ./build/target-variant-debuglevel output root.
17500    if test "x${CONF_NAME}" = x; then
17501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17502$as_echo "in default location" >&6; }
17503      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17504    else
17505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17506$as_echo "in build directory with custom name" >&6; }
17507    fi
17508    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17509    $MKDIR -p "$OUTPUT_ROOT"
17510    if test ! -d "$OUTPUT_ROOT"; then
17511      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17512    fi
17513  else
17514    # We are running configure from outside of the src dir.
17515    # Then use the current directory as output dir!
17516    # If configuration is situated in normal build directory, just use the build
17517    # directory name as configuration name, otherwise use the complete path.
17518    if test "x${CONF_NAME}" = x; then
17519      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17520    fi
17521    OUTPUT_ROOT="$CURDIR"
17522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17523$as_echo "in current directory" >&6; }
17524
17525    # WARNING: This might be a bad thing to do. You need to be sure you want to
17526    # have a configuration in this directory. Do some sanity checks!
17527
17528    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17529      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17530      # other files
17531      files_present=`$LS $OUTPUT_ROOT`
17532      # Configure has already touched config.log and confdefs.h in the current dir when this check
17533      # is performed.
17534      filtered_files=`$ECHO "$files_present" \
17535          | $SED -e 's/config.log//g' \
17536              -e 's/configure.log//g' \
17537              -e 's/confdefs.h//g' \
17538              -e 's/ //g' \
17539          | $TR -d '\n'`
17540      if test "x$filtered_files" != x; then
17541        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17542$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17544$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17545        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17546$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17547        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17548$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17549        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17550$as_echo "$as_me: seriously mess up just about everything." >&6;}
17551        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17552$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17553        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17554$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17555        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17556      fi
17557    fi
17558  fi
17559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17560$as_echo_n "checking what configuration name to use... " >&6; }
17561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17562$as_echo "$CONF_NAME" >&6; }
17563
17564
17565  # Only process if variable expands to non-empty
17566
17567  if test "x$OUTPUT_ROOT" != x; then
17568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17569
17570  # Input might be given as Windows format, start by converting to
17571  # unix format.
17572  path="$OUTPUT_ROOT"
17573  new_path=`$CYGPATH -u "$path"`
17574
17575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17578  # "foo.exe" is OK but "foo" is an error.
17579  #
17580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17581  # It is also a way to make sure we got the proper file name for the real test later on.
17582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17583  if test "x$test_shortpath" = x; then
17584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17585$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17586    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17587  fi
17588
17589  # Call helper function which possibly converts this using DOS-style short mode.
17590  # If so, the updated path is stored in $new_path.
17591
17592  input_path="$new_path"
17593  # Check if we need to convert this using DOS-style short mode. If the path
17594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17595  # take no chances and rewrite it.
17596  # Note: m4 eats our [], so we need to use [ and ] instead.
17597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17598  if test "x$has_forbidden_chars" != x; then
17599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17603      # Going to short mode and back again did indeed matter. Since short mode is
17604      # case insensitive, let's make it lowercase to improve readability.
17605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17606      # Now convert it back to Unix-style (cygpath)
17607      input_path=`$CYGPATH -u "$shortmode_path"`
17608      new_path="$input_path"
17609    fi
17610  fi
17611
17612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17613  if test "x$test_cygdrive_prefix" = x; then
17614    # As a simple fix, exclude /usr/bin since it's not a real path.
17615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17617      # a path prefixed by /cygdrive for fixpath to work.
17618      new_path="$CYGWIN_ROOT_PATH$input_path"
17619    fi
17620  fi
17621
17622
17623  if test "x$path" != "x$new_path"; then
17624    OUTPUT_ROOT="$new_path"
17625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17626$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17627  fi
17628
17629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17630
17631  path="$OUTPUT_ROOT"
17632  has_colon=`$ECHO $path | $GREP ^.:`
17633  new_path="$path"
17634  if test "x$has_colon" = x; then
17635    # Not in mixed or Windows style, start by that.
17636    new_path=`cmd //c echo $path`
17637  fi
17638
17639
17640  input_path="$new_path"
17641  # Check if we need to convert this using DOS-style short mode. If the path
17642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17643  # take no chances and rewrite it.
17644  # Note: m4 eats our [], so we need to use [ and ] instead.
17645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17646  if test "x$has_forbidden_chars" != x; then
17647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17649  fi
17650
17651
17652  windows_path="$new_path"
17653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17654    unix_path=`$CYGPATH -u "$windows_path"`
17655    new_path="$unix_path"
17656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17658    new_path="$unix_path"
17659  fi
17660
17661  if test "x$path" != "x$new_path"; then
17662    OUTPUT_ROOT="$new_path"
17663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17664$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17665  fi
17666
17667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17669
17670    else
17671      # We're on a unix platform. Hooray! :)
17672      path="$OUTPUT_ROOT"
17673      has_space=`$ECHO "$path" | $GREP " "`
17674      if test "x$has_space" != x; then
17675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17676$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17678      fi
17679
17680      # Use eval to expand a potential ~
17681      eval path="$path"
17682      if test ! -f "$path" && test ! -d "$path"; then
17683        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17684      fi
17685
17686      if test -d "$path"; then
17687        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17688      else
17689        dir="`$DIRNAME "$path"`"
17690        base="`$BASENAME "$path"`"
17691        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17692      fi
17693    fi
17694  fi
17695
17696
17697  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17698  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17699
17700  SPEC="$OUTPUT_ROOT/spec.gmk"
17701
17702
17703
17704
17705
17706  # The spec.gmk file contains all variables for the make system.
17707  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17708
17709  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17710  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17711
17712  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17713  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17714
17715  # The compare.sh is used to compare the build output to other builds.
17716  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17717
17718  # The generated Makefile knows where the spec.gmk is and where the source is.
17719  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17720  # which will look for generated configurations
17721  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17722
17723
17724
17725# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17726
17727  for ac_prog in apt-get yum brew port pkgutil pkgadd
17728do
17729  # Extract the first word of "$ac_prog", so it can be a program name with args.
17730set dummy $ac_prog; ac_word=$2
17731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17732$as_echo_n "checking for $ac_word... " >&6; }
17733if ${ac_cv_prog_PKGHANDLER+:} false; then :
17734  $as_echo_n "(cached) " >&6
17735else
17736  if test -n "$PKGHANDLER"; then
17737  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17738else
17739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17740for as_dir in $PATH
17741do
17742  IFS=$as_save_IFS
17743  test -z "$as_dir" && as_dir=.
17744    for ac_exec_ext in '' $ac_executable_extensions; do
17745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17746    ac_cv_prog_PKGHANDLER="$ac_prog"
17747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17748    break 2
17749  fi
17750done
17751  done
17752IFS=$as_save_IFS
17753
17754fi
17755fi
17756PKGHANDLER=$ac_cv_prog_PKGHANDLER
17757if test -n "$PKGHANDLER"; then
17758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17759$as_echo "$PKGHANDLER" >&6; }
17760else
17761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17762$as_echo "no" >&6; }
17763fi
17764
17765
17766  test -n "$PKGHANDLER" && break
17767done
17768
17769
17770
17771# Setup tools that requires more complex handling, or that is not needed by the configure script.
17772
17773
17774
17775  # Publish this variable in the help.
17776
17777
17778  if [ -z "${MAKE+x}" ]; then
17779    # The variable is not set by user, try to locate tool using the code snippet
17780
17781    # Try our hardest to locate a correct version of GNU make
17782    for ac_prog in gmake
17783do
17784  # Extract the first word of "$ac_prog", so it can be a program name with args.
17785set dummy $ac_prog; ac_word=$2
17786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17787$as_echo_n "checking for $ac_word... " >&6; }
17788if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17789  $as_echo_n "(cached) " >&6
17790else
17791  case $CHECK_GMAKE in
17792  [\\/]* | ?:[\\/]*)
17793  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17794  ;;
17795  *)
17796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17797for as_dir in $PATH
17798do
17799  IFS=$as_save_IFS
17800  test -z "$as_dir" && as_dir=.
17801    for ac_exec_ext in '' $ac_executable_extensions; do
17802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17803    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17805    break 2
17806  fi
17807done
17808  done
17809IFS=$as_save_IFS
17810
17811  ;;
17812esac
17813fi
17814CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17815if test -n "$CHECK_GMAKE"; then
17816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17817$as_echo "$CHECK_GMAKE" >&6; }
17818else
17819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17820$as_echo "no" >&6; }
17821fi
17822
17823
17824  test -n "$CHECK_GMAKE" && break
17825done
17826
17827
17828  MAKE_CANDIDATE=""$CHECK_GMAKE""
17829  DESCRIPTION="gmake in PATH"
17830
17831  # On Cygwin, we require a newer version of make than on other platforms
17832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17833    MAKE_VERSION_EXPR="-e 4\."
17834    MAKE_REQUIRED_VERSION="4.0"
17835   else
17836    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17837    MAKE_REQUIRED_VERSION="3.81"
17838  fi
17839
17840  if test "x$MAKE_CANDIDATE" != x; then
17841    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17842$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17843    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17844    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17845    if test "x$IS_GNU_MAKE" = x; then
17846      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17847$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17848    else
17849      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17850      if test "x$IS_MODERN_MAKE" = x; then
17851        { $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
17852$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;}
17853      else
17854        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17855          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17856            MAKE_EXPECTED_ENV='cygwin'
17857          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17858            MAKE_EXPECTED_ENV='msys'
17859          else
17860            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17861          fi
17862          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17863          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17864        else
17865          # Not relevant for non-Windows
17866          IS_MAKE_CORRECT_ENV=true
17867        fi
17868        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17869          { $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
17870$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;}
17871        else
17872          FOUND_MAKE=$MAKE_CANDIDATE
17873
17874  # Only process if variable expands to non-empty
17875
17876  if test "x$FOUND_MAKE" != x; then
17877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17878
17879  # First separate the path from the arguments. This will split at the first
17880  # space.
17881  complete="$FOUND_MAKE"
17882  path="${complete%% *}"
17883  tmp="$complete EOL"
17884  arguments="${tmp#* }"
17885
17886  # Input might be given as Windows format, start by converting to
17887  # unix format.
17888  new_path=`$CYGPATH -u "$path"`
17889
17890  # Now try to locate executable using which
17891  new_path=`$WHICH "$new_path" 2> /dev/null`
17892  # bat and cmd files are not always considered executable in cygwin causing which
17893  # to not find them
17894  if test "x$new_path" = x \
17895      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17896      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17897    new_path=`$CYGPATH -u "$path"`
17898  fi
17899  if test "x$new_path" = x; then
17900    # Oops. Which didn't find the executable.
17901    # The splitting of arguments from the executable at a space might have been incorrect,
17902    # since paths with space are more likely in Windows. Give it another try with the whole
17903    # argument.
17904    path="$complete"
17905    arguments="EOL"
17906    new_path=`$CYGPATH -u "$path"`
17907    new_path=`$WHICH "$new_path" 2> /dev/null`
17908    # bat and cmd files are not always considered executable in cygwin causing which
17909    # to not find them
17910    if test "x$new_path" = x \
17911        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17912        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17913      new_path=`$CYGPATH -u "$path"`
17914    fi
17915    if test "x$new_path" = x; then
17916      # It's still not found. Now this is an unrecoverable error.
17917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17918$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17919      has_space=`$ECHO "$complete" | $GREP " "`
17920      if test "x$has_space" != x; then
17921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17923      fi
17924      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17925    fi
17926  fi
17927
17928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17931  # "foo.exe" is OK but "foo" is an error.
17932  #
17933  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17934  # It is also a way to make sure we got the proper file name for the real test later on.
17935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17936  if test "x$test_shortpath" = x; then
17937    # Short path failed, file does not exist as specified.
17938    # Try adding .exe or .cmd
17939    if test -f "${new_path}.exe"; then
17940      input_to_shortpath="${new_path}.exe"
17941    elif test -f "${new_path}.cmd"; then
17942      input_to_shortpath="${new_path}.cmd"
17943    else
17944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17945$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17946      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17947$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17948      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17949    fi
17950  else
17951    input_to_shortpath="$new_path"
17952  fi
17953
17954  # Call helper function which possibly converts this using DOS-style short mode.
17955  # If so, the updated path is stored in $new_path.
17956  new_path="$input_to_shortpath"
17957
17958  input_path="$input_to_shortpath"
17959  # Check if we need to convert this using DOS-style short mode. If the path
17960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17961  # take no chances and rewrite it.
17962  # Note: m4 eats our [], so we need to use [ and ] instead.
17963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17964  if test "x$has_forbidden_chars" != x; then
17965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17969      # Going to short mode and back again did indeed matter. Since short mode is
17970      # case insensitive, let's make it lowercase to improve readability.
17971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17972      # Now convert it back to Unix-style (cygpath)
17973      input_path=`$CYGPATH -u "$shortmode_path"`
17974      new_path="$input_path"
17975    fi
17976  fi
17977
17978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17979  if test "x$test_cygdrive_prefix" = x; then
17980    # As a simple fix, exclude /usr/bin since it's not a real path.
17981    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17983      # a path prefixed by /cygdrive for fixpath to work.
17984      new_path="$CYGWIN_ROOT_PATH$input_path"
17985    fi
17986  fi
17987
17988  # remove trailing .exe if any
17989  new_path="${new_path/%.exe/}"
17990
17991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17992
17993  # First separate the path from the arguments. This will split at the first
17994  # space.
17995  complete="$FOUND_MAKE"
17996  path="${complete%% *}"
17997  tmp="$complete EOL"
17998  arguments="${tmp#* }"
17999
18000  # Input might be given as Windows format, start by converting to
18001  # unix format.
18002  new_path="$path"
18003
18004  windows_path="$new_path"
18005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18006    unix_path=`$CYGPATH -u "$windows_path"`
18007    new_path="$unix_path"
18008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18010    new_path="$unix_path"
18011  fi
18012
18013
18014  # Now try to locate executable using which
18015  new_path=`$WHICH "$new_path" 2> /dev/null`
18016
18017  if test "x$new_path" = x; then
18018    # Oops. Which didn't find the executable.
18019    # The splitting of arguments from the executable at a space might have been incorrect,
18020    # since paths with space are more likely in Windows. Give it another try with the whole
18021    # argument.
18022    path="$complete"
18023    arguments="EOL"
18024    new_path="$path"
18025
18026  windows_path="$new_path"
18027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18028    unix_path=`$CYGPATH -u "$windows_path"`
18029    new_path="$unix_path"
18030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18032    new_path="$unix_path"
18033  fi
18034
18035
18036    new_path=`$WHICH "$new_path" 2> /dev/null`
18037    # bat and cmd files are not always considered executable in MSYS causing which
18038    # to not find them
18039    if test "x$new_path" = x \
18040        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18041        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18042      new_path="$path"
18043
18044  windows_path="$new_path"
18045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18046    unix_path=`$CYGPATH -u "$windows_path"`
18047    new_path="$unix_path"
18048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18050    new_path="$unix_path"
18051  fi
18052
18053    fi
18054
18055    if test "x$new_path" = x; then
18056      # It's still not found. Now this is an unrecoverable error.
18057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18058$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18059      has_space=`$ECHO "$complete" | $GREP " "`
18060      if test "x$has_space" != x; then
18061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18063      fi
18064      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18065    fi
18066  fi
18067
18068  # Now new_path has a complete unix path to the binary
18069  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18070    # Keep paths in /bin as-is, but remove trailing .exe if any
18071    new_path="${new_path/%.exe/}"
18072    # Do not save /bin paths to all_fixpath_prefixes!
18073  else
18074    # Not in mixed or Windows style, start by that.
18075    new_path=`cmd //c echo $new_path`
18076
18077  input_path="$new_path"
18078  # Check if we need to convert this using DOS-style short mode. If the path
18079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18080  # take no chances and rewrite it.
18081  # Note: m4 eats our [], so we need to use [ and ] instead.
18082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18083  if test "x$has_forbidden_chars" != x; then
18084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18086  fi
18087
18088    # Output is in $new_path
18089
18090  windows_path="$new_path"
18091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18092    unix_path=`$CYGPATH -u "$windows_path"`
18093    new_path="$unix_path"
18094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18096    new_path="$unix_path"
18097  fi
18098
18099    # remove trailing .exe if any
18100    new_path="${new_path/%.exe/}"
18101
18102    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18103    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18104  fi
18105
18106    else
18107      # We're on a unix platform. Hooray! :)
18108      # First separate the path from the arguments. This will split at the first
18109      # space.
18110      complete="$FOUND_MAKE"
18111      path="${complete%% *}"
18112      tmp="$complete EOL"
18113      arguments="${tmp#* }"
18114
18115      # Cannot rely on the command "which" here since it doesn't always work.
18116      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18117      if test -z "$is_absolute_path"; then
18118        # Path to executable is not absolute. Find it.
18119        IFS_save="$IFS"
18120        IFS=:
18121        for p in $PATH; do
18122          if test -f "$p/$path" && test -x "$p/$path"; then
18123            new_path="$p/$path"
18124            break
18125          fi
18126        done
18127        IFS="$IFS_save"
18128      else
18129        # This is an absolute path, we can use it without further modifications.
18130        new_path="$path"
18131      fi
18132
18133      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
18139$as_echo "$as_me: This might be caused by spaces in the path, 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    # Now join together the path and the arguments once again
18146    if test "x$arguments" != xEOL; then
18147      new_complete="$new_path ${arguments% *}"
18148    else
18149      new_complete="$new_path"
18150    fi
18151
18152    if test "x$complete" != "x$new_complete"; then
18153      FOUND_MAKE="$new_complete"
18154      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18155$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18156    fi
18157  fi
18158
18159        fi
18160      fi
18161    fi
18162  fi
18163
18164
18165    if test "x$FOUND_MAKE" = x; then
18166      for ac_prog in make
18167do
18168  # Extract the first word of "$ac_prog", so it can be a program name with args.
18169set dummy $ac_prog; ac_word=$2
18170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18171$as_echo_n "checking for $ac_word... " >&6; }
18172if ${ac_cv_path_CHECK_MAKE+:} false; then :
18173  $as_echo_n "(cached) " >&6
18174else
18175  case $CHECK_MAKE in
18176  [\\/]* | ?:[\\/]*)
18177  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18178  ;;
18179  *)
18180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18181for as_dir in $PATH
18182do
18183  IFS=$as_save_IFS
18184  test -z "$as_dir" && as_dir=.
18185    for ac_exec_ext in '' $ac_executable_extensions; do
18186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18187    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18189    break 2
18190  fi
18191done
18192  done
18193IFS=$as_save_IFS
18194
18195  ;;
18196esac
18197fi
18198CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18199if test -n "$CHECK_MAKE"; then
18200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18201$as_echo "$CHECK_MAKE" >&6; }
18202else
18203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18204$as_echo "no" >&6; }
18205fi
18206
18207
18208  test -n "$CHECK_MAKE" && break
18209done
18210
18211
18212  MAKE_CANDIDATE=""$CHECK_MAKE""
18213  DESCRIPTION="make in PATH"
18214
18215  # On Cygwin, we require a newer version of make than on other platforms
18216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18217    MAKE_VERSION_EXPR="-e 4\."
18218    MAKE_REQUIRED_VERSION="4.0"
18219   else
18220    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18221    MAKE_REQUIRED_VERSION="3.81"
18222  fi
18223
18224  if test "x$MAKE_CANDIDATE" != x; then
18225    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18226$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18227    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18228    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18229    if test "x$IS_GNU_MAKE" = x; then
18230      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18231$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18232    else
18233      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18234      if test "x$IS_MODERN_MAKE" = x; then
18235        { $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
18236$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;}
18237      else
18238        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18239          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18240            MAKE_EXPECTED_ENV='cygwin'
18241          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18242            MAKE_EXPECTED_ENV='msys'
18243          else
18244            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18245          fi
18246          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18247          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18248        else
18249          # Not relevant for non-Windows
18250          IS_MAKE_CORRECT_ENV=true
18251        fi
18252        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18253          { $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
18254$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;}
18255        else
18256          FOUND_MAKE=$MAKE_CANDIDATE
18257
18258  # Only process if variable expands to non-empty
18259
18260  if test "x$FOUND_MAKE" != x; then
18261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18262
18263  # First separate the path from the arguments. This will split at the first
18264  # space.
18265  complete="$FOUND_MAKE"
18266  path="${complete%% *}"
18267  tmp="$complete EOL"
18268  arguments="${tmp#* }"
18269
18270  # Input might be given as Windows format, start by converting to
18271  # unix format.
18272  new_path=`$CYGPATH -u "$path"`
18273
18274  # Now try to locate executable using which
18275  new_path=`$WHICH "$new_path" 2> /dev/null`
18276  # bat and cmd files are not always considered executable in cygwin causing which
18277  # to not find them
18278  if test "x$new_path" = x \
18279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18281    new_path=`$CYGPATH -u "$path"`
18282  fi
18283  if test "x$new_path" = x; then
18284    # Oops. Which didn't find the executable.
18285    # The splitting of arguments from the executable at a space might have been incorrect,
18286    # since paths with space are more likely in Windows. Give it another try with the whole
18287    # argument.
18288    path="$complete"
18289    arguments="EOL"
18290    new_path=`$CYGPATH -u "$path"`
18291    new_path=`$WHICH "$new_path" 2> /dev/null`
18292    # bat and cmd files are not always considered executable in cygwin causing which
18293    # to not find them
18294    if test "x$new_path" = x \
18295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18297      new_path=`$CYGPATH -u "$path"`
18298    fi
18299    if test "x$new_path" = x; then
18300      # It's still not found. Now this is an unrecoverable error.
18301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18302$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18303      has_space=`$ECHO "$complete" | $GREP " "`
18304      if test "x$has_space" != x; then
18305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18307      fi
18308      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18309    fi
18310  fi
18311
18312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18315  # "foo.exe" is OK but "foo" is an error.
18316  #
18317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18318  # It is also a way to make sure we got the proper file name for the real test later on.
18319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18320  if test "x$test_shortpath" = x; then
18321    # Short path failed, file does not exist as specified.
18322    # Try adding .exe or .cmd
18323    if test -f "${new_path}.exe"; then
18324      input_to_shortpath="${new_path}.exe"
18325    elif test -f "${new_path}.cmd"; then
18326      input_to_shortpath="${new_path}.cmd"
18327    else
18328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18329$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18332      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18333    fi
18334  else
18335    input_to_shortpath="$new_path"
18336  fi
18337
18338  # Call helper function which possibly converts this using DOS-style short mode.
18339  # If so, the updated path is stored in $new_path.
18340  new_path="$input_to_shortpath"
18341
18342  input_path="$input_to_shortpath"
18343  # Check if we need to convert this using DOS-style short mode. If the path
18344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18345  # take no chances and rewrite it.
18346  # Note: m4 eats our [], so we need to use [ and ] instead.
18347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18348  if test "x$has_forbidden_chars" != x; then
18349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18353      # Going to short mode and back again did indeed matter. Since short mode is
18354      # case insensitive, let's make it lowercase to improve readability.
18355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18356      # Now convert it back to Unix-style (cygpath)
18357      input_path=`$CYGPATH -u "$shortmode_path"`
18358      new_path="$input_path"
18359    fi
18360  fi
18361
18362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18363  if test "x$test_cygdrive_prefix" = x; then
18364    # As a simple fix, exclude /usr/bin since it's not a real path.
18365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18367      # a path prefixed by /cygdrive for fixpath to work.
18368      new_path="$CYGWIN_ROOT_PATH$input_path"
18369    fi
18370  fi
18371
18372  # remove trailing .exe if any
18373  new_path="${new_path/%.exe/}"
18374
18375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18376
18377  # First separate the path from the arguments. This will split at the first
18378  # space.
18379  complete="$FOUND_MAKE"
18380  path="${complete%% *}"
18381  tmp="$complete EOL"
18382  arguments="${tmp#* }"
18383
18384  # Input might be given as Windows format, start by converting to
18385  # unix format.
18386  new_path="$path"
18387
18388  windows_path="$new_path"
18389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18390    unix_path=`$CYGPATH -u "$windows_path"`
18391    new_path="$unix_path"
18392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18394    new_path="$unix_path"
18395  fi
18396
18397
18398  # Now try to locate executable using which
18399  new_path=`$WHICH "$new_path" 2> /dev/null`
18400
18401  if test "x$new_path" = x; then
18402    # Oops. Which didn't find the executable.
18403    # The splitting of arguments from the executable at a space might have been incorrect,
18404    # since paths with space are more likely in Windows. Give it another try with the whole
18405    # argument.
18406    path="$complete"
18407    arguments="EOL"
18408    new_path="$path"
18409
18410  windows_path="$new_path"
18411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18412    unix_path=`$CYGPATH -u "$windows_path"`
18413    new_path="$unix_path"
18414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18416    new_path="$unix_path"
18417  fi
18418
18419
18420    new_path=`$WHICH "$new_path" 2> /dev/null`
18421    # bat and cmd files are not always considered executable in MSYS causing which
18422    # to not find them
18423    if test "x$new_path" = x \
18424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18426      new_path="$path"
18427
18428  windows_path="$new_path"
18429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18430    unix_path=`$CYGPATH -u "$windows_path"`
18431    new_path="$unix_path"
18432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18434    new_path="$unix_path"
18435  fi
18436
18437    fi
18438
18439    if test "x$new_path" = x; then
18440      # It's still not found. Now this is an unrecoverable error.
18441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18443      has_space=`$ECHO "$complete" | $GREP " "`
18444      if test "x$has_space" != x; then
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18447      fi
18448      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18449    fi
18450  fi
18451
18452  # Now new_path has a complete unix path to the binary
18453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18454    # Keep paths in /bin as-is, but remove trailing .exe if any
18455    new_path="${new_path/%.exe/}"
18456    # Do not save /bin paths to all_fixpath_prefixes!
18457  else
18458    # Not in mixed or Windows style, start by that.
18459    new_path=`cmd //c echo $new_path`
18460
18461  input_path="$new_path"
18462  # Check if we need to convert this using DOS-style short mode. If the path
18463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18464  # take no chances and rewrite it.
18465  # Note: m4 eats our [], so we need to use [ and ] instead.
18466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18467  if test "x$has_forbidden_chars" != x; then
18468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18470  fi
18471
18472    # Output is in $new_path
18473
18474  windows_path="$new_path"
18475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18476    unix_path=`$CYGPATH -u "$windows_path"`
18477    new_path="$unix_path"
18478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18480    new_path="$unix_path"
18481  fi
18482
18483    # remove trailing .exe if any
18484    new_path="${new_path/%.exe/}"
18485
18486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18488  fi
18489
18490    else
18491      # We're on a unix platform. Hooray! :)
18492      # First separate the path from the arguments. This will split at the first
18493      # space.
18494      complete="$FOUND_MAKE"
18495      path="${complete%% *}"
18496      tmp="$complete EOL"
18497      arguments="${tmp#* }"
18498
18499      # Cannot rely on the command "which" here since it doesn't always work.
18500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18501      if test -z "$is_absolute_path"; then
18502        # Path to executable is not absolute. Find it.
18503        IFS_save="$IFS"
18504        IFS=:
18505        for p in $PATH; do
18506          if test -f "$p/$path" && test -x "$p/$path"; then
18507            new_path="$p/$path"
18508            break
18509          fi
18510        done
18511        IFS="$IFS_save"
18512      else
18513        # This is an absolute path, we can use it without further modifications.
18514        new_path="$path"
18515      fi
18516
18517      if test "x$new_path" = x; then
18518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18519$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18520        has_space=`$ECHO "$complete" | $GREP " "`
18521        if test "x$has_space" != x; then
18522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18524        fi
18525        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18526      fi
18527    fi
18528
18529    # Now join together the path and the arguments once again
18530    if test "x$arguments" != xEOL; then
18531      new_complete="$new_path ${arguments% *}"
18532    else
18533      new_complete="$new_path"
18534    fi
18535
18536    if test "x$complete" != "x$new_complete"; then
18537      FOUND_MAKE="$new_complete"
18538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18539$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18540    fi
18541  fi
18542
18543        fi
18544      fi
18545    fi
18546  fi
18547
18548    fi
18549
18550    if test "x$FOUND_MAKE" = x; then
18551      if test "x$TOOLCHAIN_PATH" != x; then
18552        # We have a toolchain path, check that as well before giving up.
18553        OLD_PATH=$PATH
18554        PATH=$TOOLCHAIN_PATH:$PATH
18555        for ac_prog in gmake
18556do
18557  # Extract the first word of "$ac_prog", so it can be a program name with args.
18558set dummy $ac_prog; ac_word=$2
18559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18560$as_echo_n "checking for $ac_word... " >&6; }
18561if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18562  $as_echo_n "(cached) " >&6
18563else
18564  case $CHECK_TOOLSDIR_GMAKE in
18565  [\\/]* | ?:[\\/]*)
18566  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18567  ;;
18568  *)
18569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18570for as_dir in $PATH
18571do
18572  IFS=$as_save_IFS
18573  test -z "$as_dir" && as_dir=.
18574    for ac_exec_ext in '' $ac_executable_extensions; do
18575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18576    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18578    break 2
18579  fi
18580done
18581  done
18582IFS=$as_save_IFS
18583
18584  ;;
18585esac
18586fi
18587CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18588if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18590$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18591else
18592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18593$as_echo "no" >&6; }
18594fi
18595
18596
18597  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18598done
18599
18600
18601  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18602  DESCRIPTION="gmake in tools-dir"
18603
18604  # On Cygwin, we require a newer version of make than on other platforms
18605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18606    MAKE_VERSION_EXPR="-e 4\."
18607    MAKE_REQUIRED_VERSION="4.0"
18608   else
18609    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18610    MAKE_REQUIRED_VERSION="3.81"
18611  fi
18612
18613  if test "x$MAKE_CANDIDATE" != x; then
18614    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18615$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18616    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18617    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18618    if test "x$IS_GNU_MAKE" = x; then
18619      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18620$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18621    else
18622      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18623      if test "x$IS_MODERN_MAKE" = x; then
18624        { $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
18625$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;}
18626      else
18627        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18628          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18629            MAKE_EXPECTED_ENV='cygwin'
18630          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18631            MAKE_EXPECTED_ENV='msys'
18632          else
18633            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18634          fi
18635          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18636          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18637        else
18638          # Not relevant for non-Windows
18639          IS_MAKE_CORRECT_ENV=true
18640        fi
18641        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18642          { $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
18643$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;}
18644        else
18645          FOUND_MAKE=$MAKE_CANDIDATE
18646
18647  # Only process if variable expands to non-empty
18648
18649  if test "x$FOUND_MAKE" != x; then
18650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18651
18652  # First separate the path from the arguments. This will split at the first
18653  # space.
18654  complete="$FOUND_MAKE"
18655  path="${complete%% *}"
18656  tmp="$complete EOL"
18657  arguments="${tmp#* }"
18658
18659  # Input might be given as Windows format, start by converting to
18660  # unix format.
18661  new_path=`$CYGPATH -u "$path"`
18662
18663  # Now try to locate executable using which
18664  new_path=`$WHICH "$new_path" 2> /dev/null`
18665  # bat and cmd files are not always considered executable in cygwin causing which
18666  # to not find them
18667  if test "x$new_path" = x \
18668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18670    new_path=`$CYGPATH -u "$path"`
18671  fi
18672  if test "x$new_path" = x; then
18673    # Oops. Which didn't find the executable.
18674    # The splitting of arguments from the executable at a space might have been incorrect,
18675    # since paths with space are more likely in Windows. Give it another try with the whole
18676    # argument.
18677    path="$complete"
18678    arguments="EOL"
18679    new_path=`$CYGPATH -u "$path"`
18680    new_path=`$WHICH "$new_path" 2> /dev/null`
18681    # bat and cmd files are not always considered executable in cygwin causing which
18682    # to not find them
18683    if test "x$new_path" = x \
18684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18686      new_path=`$CYGPATH -u "$path"`
18687    fi
18688    if test "x$new_path" = x; then
18689      # It's still not found. Now this is an unrecoverable error.
18690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18691$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18692      has_space=`$ECHO "$complete" | $GREP " "`
18693      if test "x$has_space" != x; then
18694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18696      fi
18697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18698    fi
18699  fi
18700
18701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18704  # "foo.exe" is OK but "foo" is an error.
18705  #
18706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18707  # It is also a way to make sure we got the proper file name for the real test later on.
18708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18709  if test "x$test_shortpath" = x; then
18710    # Short path failed, file does not exist as specified.
18711    # Try adding .exe or .cmd
18712    if test -f "${new_path}.exe"; then
18713      input_to_shortpath="${new_path}.exe"
18714    elif test -f "${new_path}.cmd"; then
18715      input_to_shortpath="${new_path}.cmd"
18716    else
18717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18718$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18721      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18722    fi
18723  else
18724    input_to_shortpath="$new_path"
18725  fi
18726
18727  # Call helper function which possibly converts this using DOS-style short mode.
18728  # If so, the updated path is stored in $new_path.
18729  new_path="$input_to_shortpath"
18730
18731  input_path="$input_to_shortpath"
18732  # Check if we need to convert this using DOS-style short mode. If the path
18733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18734  # take no chances and rewrite it.
18735  # Note: m4 eats our [], so we need to use [ and ] instead.
18736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18737  if test "x$has_forbidden_chars" != x; then
18738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18742      # Going to short mode and back again did indeed matter. Since short mode is
18743      # case insensitive, let's make it lowercase to improve readability.
18744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18745      # Now convert it back to Unix-style (cygpath)
18746      input_path=`$CYGPATH -u "$shortmode_path"`
18747      new_path="$input_path"
18748    fi
18749  fi
18750
18751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18752  if test "x$test_cygdrive_prefix" = x; then
18753    # As a simple fix, exclude /usr/bin since it's not a real path.
18754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18756      # a path prefixed by /cygdrive for fixpath to work.
18757      new_path="$CYGWIN_ROOT_PATH$input_path"
18758    fi
18759  fi
18760
18761  # remove trailing .exe if any
18762  new_path="${new_path/%.exe/}"
18763
18764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18765
18766  # First separate the path from the arguments. This will split at the first
18767  # space.
18768  complete="$FOUND_MAKE"
18769  path="${complete%% *}"
18770  tmp="$complete EOL"
18771  arguments="${tmp#* }"
18772
18773  # Input might be given as Windows format, start by converting to
18774  # unix format.
18775  new_path="$path"
18776
18777  windows_path="$new_path"
18778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18779    unix_path=`$CYGPATH -u "$windows_path"`
18780    new_path="$unix_path"
18781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18783    new_path="$unix_path"
18784  fi
18785
18786
18787  # Now try to locate executable using which
18788  new_path=`$WHICH "$new_path" 2> /dev/null`
18789
18790  if test "x$new_path" = x; then
18791    # Oops. Which didn't find the executable.
18792    # The splitting of arguments from the executable at a space might have been incorrect,
18793    # since paths with space are more likely in Windows. Give it another try with the whole
18794    # argument.
18795    path="$complete"
18796    arguments="EOL"
18797    new_path="$path"
18798
18799  windows_path="$new_path"
18800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18801    unix_path=`$CYGPATH -u "$windows_path"`
18802    new_path="$unix_path"
18803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18805    new_path="$unix_path"
18806  fi
18807
18808
18809    new_path=`$WHICH "$new_path" 2> /dev/null`
18810    # bat and cmd files are not always considered executable in MSYS causing which
18811    # to not find them
18812    if test "x$new_path" = x \
18813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18815      new_path="$path"
18816
18817  windows_path="$new_path"
18818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18819    unix_path=`$CYGPATH -u "$windows_path"`
18820    new_path="$unix_path"
18821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18823    new_path="$unix_path"
18824  fi
18825
18826    fi
18827
18828    if test "x$new_path" = x; then
18829      # It's still not found. Now this is an unrecoverable error.
18830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18831$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18832      has_space=`$ECHO "$complete" | $GREP " "`
18833      if test "x$has_space" != x; then
18834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18836      fi
18837      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18838    fi
18839  fi
18840
18841  # Now new_path has a complete unix path to the binary
18842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18843    # Keep paths in /bin as-is, but remove trailing .exe if any
18844    new_path="${new_path/%.exe/}"
18845    # Do not save /bin paths to all_fixpath_prefixes!
18846  else
18847    # Not in mixed or Windows style, start by that.
18848    new_path=`cmd //c echo $new_path`
18849
18850  input_path="$new_path"
18851  # Check if we need to convert this using DOS-style short mode. If the path
18852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18853  # take no chances and rewrite it.
18854  # Note: m4 eats our [], so we need to use [ and ] instead.
18855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18856  if test "x$has_forbidden_chars" != x; then
18857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18859  fi
18860
18861    # Output is in $new_path
18862
18863  windows_path="$new_path"
18864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18865    unix_path=`$CYGPATH -u "$windows_path"`
18866    new_path="$unix_path"
18867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18869    new_path="$unix_path"
18870  fi
18871
18872    # remove trailing .exe if any
18873    new_path="${new_path/%.exe/}"
18874
18875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18877  fi
18878
18879    else
18880      # We're on a unix platform. Hooray! :)
18881      # First separate the path from the arguments. This will split at the first
18882      # space.
18883      complete="$FOUND_MAKE"
18884      path="${complete%% *}"
18885      tmp="$complete EOL"
18886      arguments="${tmp#* }"
18887
18888      # Cannot rely on the command "which" here since it doesn't always work.
18889      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18890      if test -z "$is_absolute_path"; then
18891        # Path to executable is not absolute. Find it.
18892        IFS_save="$IFS"
18893        IFS=:
18894        for p in $PATH; do
18895          if test -f "$p/$path" && test -x "$p/$path"; then
18896            new_path="$p/$path"
18897            break
18898          fi
18899        done
18900        IFS="$IFS_save"
18901      else
18902        # This is an absolute path, we can use it without further modifications.
18903        new_path="$path"
18904      fi
18905
18906      if test "x$new_path" = x; then
18907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18909        has_space=`$ECHO "$complete" | $GREP " "`
18910        if test "x$has_space" != x; then
18911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18913        fi
18914        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18915      fi
18916    fi
18917
18918    # Now join together the path and the arguments once again
18919    if test "x$arguments" != xEOL; then
18920      new_complete="$new_path ${arguments% *}"
18921    else
18922      new_complete="$new_path"
18923    fi
18924
18925    if test "x$complete" != "x$new_complete"; then
18926      FOUND_MAKE="$new_complete"
18927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18928$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18929    fi
18930  fi
18931
18932        fi
18933      fi
18934    fi
18935  fi
18936
18937        if test "x$FOUND_MAKE" = x; then
18938          for ac_prog in make
18939do
18940  # Extract the first word of "$ac_prog", so it can be a program name with args.
18941set dummy $ac_prog; ac_word=$2
18942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18943$as_echo_n "checking for $ac_word... " >&6; }
18944if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18945  $as_echo_n "(cached) " >&6
18946else
18947  case $CHECK_TOOLSDIR_MAKE in
18948  [\\/]* | ?:[\\/]*)
18949  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18950  ;;
18951  *)
18952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18953for as_dir in $PATH
18954do
18955  IFS=$as_save_IFS
18956  test -z "$as_dir" && as_dir=.
18957    for ac_exec_ext in '' $ac_executable_extensions; do
18958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18959    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18961    break 2
18962  fi
18963done
18964  done
18965IFS=$as_save_IFS
18966
18967  ;;
18968esac
18969fi
18970CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18971if test -n "$CHECK_TOOLSDIR_MAKE"; then
18972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18973$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18974else
18975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18976$as_echo "no" >&6; }
18977fi
18978
18979
18980  test -n "$CHECK_TOOLSDIR_MAKE" && break
18981done
18982
18983
18984  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18985  DESCRIPTION="make in tools-dir"
18986
18987  # On Cygwin, we require a newer version of make than on other platforms
18988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18989    MAKE_VERSION_EXPR="-e 4\."
18990    MAKE_REQUIRED_VERSION="4.0"
18991   else
18992    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18993    MAKE_REQUIRED_VERSION="3.81"
18994  fi
18995
18996  if test "x$MAKE_CANDIDATE" != x; then
18997    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18998$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18999    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19000    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19001    if test "x$IS_GNU_MAKE" = x; then
19002      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19003$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19004    else
19005      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19006      if test "x$IS_MODERN_MAKE" = x; then
19007        { $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
19008$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;}
19009      else
19010        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19011          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19012            MAKE_EXPECTED_ENV='cygwin'
19013          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19014            MAKE_EXPECTED_ENV='msys'
19015          else
19016            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19017          fi
19018          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19019          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19020        else
19021          # Not relevant for non-Windows
19022          IS_MAKE_CORRECT_ENV=true
19023        fi
19024        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19025          { $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
19026$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;}
19027        else
19028          FOUND_MAKE=$MAKE_CANDIDATE
19029
19030  # Only process if variable expands to non-empty
19031
19032  if test "x$FOUND_MAKE" != x; then
19033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19034
19035  # First separate the path from the arguments. This will split at the first
19036  # space.
19037  complete="$FOUND_MAKE"
19038  path="${complete%% *}"
19039  tmp="$complete EOL"
19040  arguments="${tmp#* }"
19041
19042  # Input might be given as Windows format, start by converting to
19043  # unix format.
19044  new_path=`$CYGPATH -u "$path"`
19045
19046  # Now try to locate executable using which
19047  new_path=`$WHICH "$new_path" 2> /dev/null`
19048  # bat and cmd files are not always considered executable in cygwin causing which
19049  # to not find them
19050  if test "x$new_path" = x \
19051      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19052      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19053    new_path=`$CYGPATH -u "$path"`
19054  fi
19055  if test "x$new_path" = x; then
19056    # Oops. Which didn't find the executable.
19057    # The splitting of arguments from the executable at a space might have been incorrect,
19058    # since paths with space are more likely in Windows. Give it another try with the whole
19059    # argument.
19060    path="$complete"
19061    arguments="EOL"
19062    new_path=`$CYGPATH -u "$path"`
19063    new_path=`$WHICH "$new_path" 2> /dev/null`
19064    # bat and cmd files are not always considered executable in cygwin causing which
19065    # to not find them
19066    if test "x$new_path" = x \
19067        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19068        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19069      new_path=`$CYGPATH -u "$path"`
19070    fi
19071    if test "x$new_path" = x; then
19072      # It's still not found. Now this is an unrecoverable error.
19073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19074$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19075      has_space=`$ECHO "$complete" | $GREP " "`
19076      if test "x$has_space" != x; then
19077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19079      fi
19080      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19081    fi
19082  fi
19083
19084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19087  # "foo.exe" is OK but "foo" is an error.
19088  #
19089  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19090  # It is also a way to make sure we got the proper file name for the real test later on.
19091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19092  if test "x$test_shortpath" = x; then
19093    # Short path failed, file does not exist as specified.
19094    # Try adding .exe or .cmd
19095    if test -f "${new_path}.exe"; then
19096      input_to_shortpath="${new_path}.exe"
19097    elif test -f "${new_path}.cmd"; then
19098      input_to_shortpath="${new_path}.cmd"
19099    else
19100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19104      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19105    fi
19106  else
19107    input_to_shortpath="$new_path"
19108  fi
19109
19110  # Call helper function which possibly converts this using DOS-style short mode.
19111  # If so, the updated path is stored in $new_path.
19112  new_path="$input_to_shortpath"
19113
19114  input_path="$input_to_shortpath"
19115  # Check if we need to convert this using DOS-style short mode. If the path
19116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19117  # take no chances and rewrite it.
19118  # Note: m4 eats our [], so we need to use [ and ] instead.
19119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19120  if test "x$has_forbidden_chars" != x; then
19121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19125      # Going to short mode and back again did indeed matter. Since short mode is
19126      # case insensitive, let's make it lowercase to improve readability.
19127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19128      # Now convert it back to Unix-style (cygpath)
19129      input_path=`$CYGPATH -u "$shortmode_path"`
19130      new_path="$input_path"
19131    fi
19132  fi
19133
19134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19135  if test "x$test_cygdrive_prefix" = x; then
19136    # As a simple fix, exclude /usr/bin since it's not a real path.
19137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19139      # a path prefixed by /cygdrive for fixpath to work.
19140      new_path="$CYGWIN_ROOT_PATH$input_path"
19141    fi
19142  fi
19143
19144  # remove trailing .exe if any
19145  new_path="${new_path/%.exe/}"
19146
19147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19148
19149  # First separate the path from the arguments. This will split at the first
19150  # space.
19151  complete="$FOUND_MAKE"
19152  path="${complete%% *}"
19153  tmp="$complete EOL"
19154  arguments="${tmp#* }"
19155
19156  # Input might be given as Windows format, start by converting to
19157  # unix format.
19158  new_path="$path"
19159
19160  windows_path="$new_path"
19161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19162    unix_path=`$CYGPATH -u "$windows_path"`
19163    new_path="$unix_path"
19164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19166    new_path="$unix_path"
19167  fi
19168
19169
19170  # Now try to locate executable using which
19171  new_path=`$WHICH "$new_path" 2> /dev/null`
19172
19173  if test "x$new_path" = x; then
19174    # Oops. Which didn't find the executable.
19175    # The splitting of arguments from the executable at a space might have been incorrect,
19176    # since paths with space are more likely in Windows. Give it another try with the whole
19177    # argument.
19178    path="$complete"
19179    arguments="EOL"
19180    new_path="$path"
19181
19182  windows_path="$new_path"
19183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19184    unix_path=`$CYGPATH -u "$windows_path"`
19185    new_path="$unix_path"
19186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19188    new_path="$unix_path"
19189  fi
19190
19191
19192    new_path=`$WHICH "$new_path" 2> /dev/null`
19193    # bat and cmd files are not always considered executable in MSYS causing which
19194    # to not find them
19195    if test "x$new_path" = x \
19196        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19197        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19198      new_path="$path"
19199
19200  windows_path="$new_path"
19201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19202    unix_path=`$CYGPATH -u "$windows_path"`
19203    new_path="$unix_path"
19204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19206    new_path="$unix_path"
19207  fi
19208
19209    fi
19210
19211    if test "x$new_path" = x; then
19212      # It's still not found. Now this is an unrecoverable error.
19213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19214$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19215      has_space=`$ECHO "$complete" | $GREP " "`
19216      if test "x$has_space" != x; then
19217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19219      fi
19220      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19221    fi
19222  fi
19223
19224  # Now new_path has a complete unix path to the binary
19225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19226    # Keep paths in /bin as-is, but remove trailing .exe if any
19227    new_path="${new_path/%.exe/}"
19228    # Do not save /bin paths to all_fixpath_prefixes!
19229  else
19230    # Not in mixed or Windows style, start by that.
19231    new_path=`cmd //c echo $new_path`
19232
19233  input_path="$new_path"
19234  # Check if we need to convert this using DOS-style short mode. If the path
19235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19236  # take no chances and rewrite it.
19237  # Note: m4 eats our [], so we need to use [ and ] instead.
19238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19239  if test "x$has_forbidden_chars" != x; then
19240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19242  fi
19243
19244    # Output is in $new_path
19245
19246  windows_path="$new_path"
19247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19248    unix_path=`$CYGPATH -u "$windows_path"`
19249    new_path="$unix_path"
19250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19252    new_path="$unix_path"
19253  fi
19254
19255    # remove trailing .exe if any
19256    new_path="${new_path/%.exe/}"
19257
19258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19260  fi
19261
19262    else
19263      # We're on a unix platform. Hooray! :)
19264      # First separate the path from the arguments. This will split at the first
19265      # space.
19266      complete="$FOUND_MAKE"
19267      path="${complete%% *}"
19268      tmp="$complete EOL"
19269      arguments="${tmp#* }"
19270
19271      # Cannot rely on the command "which" here since it doesn't always work.
19272      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19273      if test -z "$is_absolute_path"; then
19274        # Path to executable is not absolute. Find it.
19275        IFS_save="$IFS"
19276        IFS=:
19277        for p in $PATH; do
19278          if test -f "$p/$path" && test -x "$p/$path"; then
19279            new_path="$p/$path"
19280            break
19281          fi
19282        done
19283        IFS="$IFS_save"
19284      else
19285        # This is an absolute path, we can use it without further modifications.
19286        new_path="$path"
19287      fi
19288
19289      if test "x$new_path" = x; then
19290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19291$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19292        has_space=`$ECHO "$complete" | $GREP " "`
19293        if test "x$has_space" != x; then
19294          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19296        fi
19297        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19298      fi
19299    fi
19300
19301    # Now join together the path and the arguments once again
19302    if test "x$arguments" != xEOL; then
19303      new_complete="$new_path ${arguments% *}"
19304    else
19305      new_complete="$new_path"
19306    fi
19307
19308    if test "x$complete" != "x$new_complete"; then
19309      FOUND_MAKE="$new_complete"
19310      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19311$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19312    fi
19313  fi
19314
19315        fi
19316      fi
19317    fi
19318  fi
19319
19320        fi
19321        PATH=$OLD_PATH
19322      fi
19323    fi
19324
19325    if test "x$FOUND_MAKE" = x; then
19326      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
19327    fi
19328
19329  else
19330    # The variable is set, but is it from the command line or the environment?
19331
19332    # Try to remove the string !MAKE! from our list.
19333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19335      # If it failed, the variable was not from the command line. Ignore it,
19336      # but warn the user (except for BASH, which is always set by the calling BASH).
19337      if test "xMAKE" != xBASH; then
19338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19339$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19340      fi
19341      # Try to locate tool using the code snippet
19342
19343    # Try our hardest to locate a correct version of GNU make
19344    for ac_prog in gmake
19345do
19346  # Extract the first word of "$ac_prog", so it can be a program name with args.
19347set dummy $ac_prog; ac_word=$2
19348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19349$as_echo_n "checking for $ac_word... " >&6; }
19350if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19351  $as_echo_n "(cached) " >&6
19352else
19353  case $CHECK_GMAKE in
19354  [\\/]* | ?:[\\/]*)
19355  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19356  ;;
19357  *)
19358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19359for as_dir in $PATH
19360do
19361  IFS=$as_save_IFS
19362  test -z "$as_dir" && as_dir=.
19363    for ac_exec_ext in '' $ac_executable_extensions; do
19364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19365    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19367    break 2
19368  fi
19369done
19370  done
19371IFS=$as_save_IFS
19372
19373  ;;
19374esac
19375fi
19376CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19377if test -n "$CHECK_GMAKE"; then
19378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19379$as_echo "$CHECK_GMAKE" >&6; }
19380else
19381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19382$as_echo "no" >&6; }
19383fi
19384
19385
19386  test -n "$CHECK_GMAKE" && break
19387done
19388
19389
19390  MAKE_CANDIDATE=""$CHECK_GMAKE""
19391  DESCRIPTION="gmake in PATH"
19392
19393  # On Cygwin, we require a newer version of make than on other platforms
19394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19395    MAKE_VERSION_EXPR="-e 4\."
19396    MAKE_REQUIRED_VERSION="4.0"
19397   else
19398    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19399    MAKE_REQUIRED_VERSION="3.81"
19400  fi
19401
19402  if test "x$MAKE_CANDIDATE" != x; then
19403    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19404$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19405    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19406    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19407    if test "x$IS_GNU_MAKE" = x; then
19408      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19409$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19410    else
19411      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19412      if test "x$IS_MODERN_MAKE" = x; then
19413        { $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
19414$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;}
19415      else
19416        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19417          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19418            MAKE_EXPECTED_ENV='cygwin'
19419          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19420            MAKE_EXPECTED_ENV='msys'
19421          else
19422            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19423          fi
19424          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19425          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19426        else
19427          # Not relevant for non-Windows
19428          IS_MAKE_CORRECT_ENV=true
19429        fi
19430        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19431          { $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
19432$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;}
19433        else
19434          FOUND_MAKE=$MAKE_CANDIDATE
19435
19436  # Only process if variable expands to non-empty
19437
19438  if test "x$FOUND_MAKE" != x; then
19439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19440
19441  # First separate the path from the arguments. This will split at the first
19442  # space.
19443  complete="$FOUND_MAKE"
19444  path="${complete%% *}"
19445  tmp="$complete EOL"
19446  arguments="${tmp#* }"
19447
19448  # Input might be given as Windows format, start by converting to
19449  # unix format.
19450  new_path=`$CYGPATH -u "$path"`
19451
19452  # Now try to locate executable using which
19453  new_path=`$WHICH "$new_path" 2> /dev/null`
19454  # bat and cmd files are not always considered executable in cygwin causing which
19455  # to not find them
19456  if test "x$new_path" = x \
19457      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19458      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19459    new_path=`$CYGPATH -u "$path"`
19460  fi
19461  if test "x$new_path" = x; then
19462    # Oops. Which didn't find the executable.
19463    # The splitting of arguments from the executable at a space might have been incorrect,
19464    # since paths with space are more likely in Windows. Give it another try with the whole
19465    # argument.
19466    path="$complete"
19467    arguments="EOL"
19468    new_path=`$CYGPATH -u "$path"`
19469    new_path=`$WHICH "$new_path" 2> /dev/null`
19470    # bat and cmd files are not always considered executable in cygwin causing which
19471    # to not find them
19472    if test "x$new_path" = x \
19473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19475      new_path=`$CYGPATH -u "$path"`
19476    fi
19477    if test "x$new_path" = x; then
19478      # It's still not found. Now this is an unrecoverable error.
19479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19480$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19481      has_space=`$ECHO "$complete" | $GREP " "`
19482      if test "x$has_space" != x; then
19483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19485      fi
19486      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19487    fi
19488  fi
19489
19490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19493  # "foo.exe" is OK but "foo" is an error.
19494  #
19495  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19496  # It is also a way to make sure we got the proper file name for the real test later on.
19497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19498  if test "x$test_shortpath" = x; then
19499    # Short path failed, file does not exist as specified.
19500    # Try adding .exe or .cmd
19501    if test -f "${new_path}.exe"; then
19502      input_to_shortpath="${new_path}.exe"
19503    elif test -f "${new_path}.cmd"; then
19504      input_to_shortpath="${new_path}.cmd"
19505    else
19506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19507$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19508      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19509$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19510      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19511    fi
19512  else
19513    input_to_shortpath="$new_path"
19514  fi
19515
19516  # Call helper function which possibly converts this using DOS-style short mode.
19517  # If so, the updated path is stored in $new_path.
19518  new_path="$input_to_shortpath"
19519
19520  input_path="$input_to_shortpath"
19521  # Check if we need to convert this using DOS-style short mode. If the path
19522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19523  # take no chances and rewrite it.
19524  # Note: m4 eats our [], so we need to use [ and ] instead.
19525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19526  if test "x$has_forbidden_chars" != x; then
19527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19531      # Going to short mode and back again did indeed matter. Since short mode is
19532      # case insensitive, let's make it lowercase to improve readability.
19533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19534      # Now convert it back to Unix-style (cygpath)
19535      input_path=`$CYGPATH -u "$shortmode_path"`
19536      new_path="$input_path"
19537    fi
19538  fi
19539
19540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19541  if test "x$test_cygdrive_prefix" = x; then
19542    # As a simple fix, exclude /usr/bin since it's not a real path.
19543    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19545      # a path prefixed by /cygdrive for fixpath to work.
19546      new_path="$CYGWIN_ROOT_PATH$input_path"
19547    fi
19548  fi
19549
19550  # remove trailing .exe if any
19551  new_path="${new_path/%.exe/}"
19552
19553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19554
19555  # First separate the path from the arguments. This will split at the first
19556  # space.
19557  complete="$FOUND_MAKE"
19558  path="${complete%% *}"
19559  tmp="$complete EOL"
19560  arguments="${tmp#* }"
19561
19562  # Input might be given as Windows format, start by converting to
19563  # unix format.
19564  new_path="$path"
19565
19566  windows_path="$new_path"
19567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19568    unix_path=`$CYGPATH -u "$windows_path"`
19569    new_path="$unix_path"
19570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19572    new_path="$unix_path"
19573  fi
19574
19575
19576  # Now try to locate executable using which
19577  new_path=`$WHICH "$new_path" 2> /dev/null`
19578
19579  if test "x$new_path" = x; then
19580    # Oops. Which didn't find the executable.
19581    # The splitting of arguments from the executable at a space might have been incorrect,
19582    # since paths with space are more likely in Windows. Give it another try with the whole
19583    # argument.
19584    path="$complete"
19585    arguments="EOL"
19586    new_path="$path"
19587
19588  windows_path="$new_path"
19589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19590    unix_path=`$CYGPATH -u "$windows_path"`
19591    new_path="$unix_path"
19592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19594    new_path="$unix_path"
19595  fi
19596
19597
19598    new_path=`$WHICH "$new_path" 2> /dev/null`
19599    # bat and cmd files are not always considered executable in MSYS causing which
19600    # to not find them
19601    if test "x$new_path" = x \
19602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19604      new_path="$path"
19605
19606  windows_path="$new_path"
19607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19608    unix_path=`$CYGPATH -u "$windows_path"`
19609    new_path="$unix_path"
19610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19612    new_path="$unix_path"
19613  fi
19614
19615    fi
19616
19617    if test "x$new_path" = x; then
19618      # It's still not found. Now this is an unrecoverable error.
19619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19620$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19621      has_space=`$ECHO "$complete" | $GREP " "`
19622      if test "x$has_space" != x; then
19623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19625      fi
19626      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19627    fi
19628  fi
19629
19630  # Now new_path has a complete unix path to the binary
19631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19632    # Keep paths in /bin as-is, but remove trailing .exe if any
19633    new_path="${new_path/%.exe/}"
19634    # Do not save /bin paths to all_fixpath_prefixes!
19635  else
19636    # Not in mixed or Windows style, start by that.
19637    new_path=`cmd //c echo $new_path`
19638
19639  input_path="$new_path"
19640  # Check if we need to convert this using DOS-style short mode. If the path
19641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19642  # take no chances and rewrite it.
19643  # Note: m4 eats our [], so we need to use [ and ] instead.
19644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19645  if test "x$has_forbidden_chars" != x; then
19646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19648  fi
19649
19650    # Output is in $new_path
19651
19652  windows_path="$new_path"
19653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19654    unix_path=`$CYGPATH -u "$windows_path"`
19655    new_path="$unix_path"
19656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19658    new_path="$unix_path"
19659  fi
19660
19661    # remove trailing .exe if any
19662    new_path="${new_path/%.exe/}"
19663
19664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19666  fi
19667
19668    else
19669      # We're on a unix platform. Hooray! :)
19670      # First separate the path from the arguments. This will split at the first
19671      # space.
19672      complete="$FOUND_MAKE"
19673      path="${complete%% *}"
19674      tmp="$complete EOL"
19675      arguments="${tmp#* }"
19676
19677      # Cannot rely on the command "which" here since it doesn't always work.
19678      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19679      if test -z "$is_absolute_path"; then
19680        # Path to executable is not absolute. Find it.
19681        IFS_save="$IFS"
19682        IFS=:
19683        for p in $PATH; do
19684          if test -f "$p/$path" && test -x "$p/$path"; then
19685            new_path="$p/$path"
19686            break
19687          fi
19688        done
19689        IFS="$IFS_save"
19690      else
19691        # This is an absolute path, we can use it without further modifications.
19692        new_path="$path"
19693      fi
19694
19695      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
19701$as_echo "$as_me: This might be caused by spaces in the path, 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    # Now join together the path and the arguments once again
19708    if test "x$arguments" != xEOL; then
19709      new_complete="$new_path ${arguments% *}"
19710    else
19711      new_complete="$new_path"
19712    fi
19713
19714    if test "x$complete" != "x$new_complete"; then
19715      FOUND_MAKE="$new_complete"
19716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19717$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19718    fi
19719  fi
19720
19721        fi
19722      fi
19723    fi
19724  fi
19725
19726
19727    if test "x$FOUND_MAKE" = x; then
19728      for ac_prog in make
19729do
19730  # Extract the first word of "$ac_prog", so it can be a program name with args.
19731set dummy $ac_prog; ac_word=$2
19732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19733$as_echo_n "checking for $ac_word... " >&6; }
19734if ${ac_cv_path_CHECK_MAKE+:} false; then :
19735  $as_echo_n "(cached) " >&6
19736else
19737  case $CHECK_MAKE in
19738  [\\/]* | ?:[\\/]*)
19739  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19740  ;;
19741  *)
19742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19743for as_dir in $PATH
19744do
19745  IFS=$as_save_IFS
19746  test -z "$as_dir" && as_dir=.
19747    for ac_exec_ext in '' $ac_executable_extensions; do
19748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19749    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19751    break 2
19752  fi
19753done
19754  done
19755IFS=$as_save_IFS
19756
19757  ;;
19758esac
19759fi
19760CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19761if test -n "$CHECK_MAKE"; then
19762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19763$as_echo "$CHECK_MAKE" >&6; }
19764else
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19766$as_echo "no" >&6; }
19767fi
19768
19769
19770  test -n "$CHECK_MAKE" && break
19771done
19772
19773
19774  MAKE_CANDIDATE=""$CHECK_MAKE""
19775  DESCRIPTION="make in PATH"
19776
19777  # On Cygwin, we require a newer version of make than on other platforms
19778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19779    MAKE_VERSION_EXPR="-e 4\."
19780    MAKE_REQUIRED_VERSION="4.0"
19781   else
19782    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19783    MAKE_REQUIRED_VERSION="3.81"
19784  fi
19785
19786  if test "x$MAKE_CANDIDATE" != x; then
19787    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19788$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19789    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19790    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19791    if test "x$IS_GNU_MAKE" = x; then
19792      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19793$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19794    else
19795      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19796      if test "x$IS_MODERN_MAKE" = x; then
19797        { $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
19798$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;}
19799      else
19800        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19801          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19802            MAKE_EXPECTED_ENV='cygwin'
19803          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19804            MAKE_EXPECTED_ENV='msys'
19805          else
19806            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19807          fi
19808          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19809          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19810        else
19811          # Not relevant for non-Windows
19812          IS_MAKE_CORRECT_ENV=true
19813        fi
19814        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19815          { $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
19816$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;}
19817        else
19818          FOUND_MAKE=$MAKE_CANDIDATE
19819
19820  # Only process if variable expands to non-empty
19821
19822  if test "x$FOUND_MAKE" != x; then
19823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19824
19825  # First separate the path from the arguments. This will split at the first
19826  # space.
19827  complete="$FOUND_MAKE"
19828  path="${complete%% *}"
19829  tmp="$complete EOL"
19830  arguments="${tmp#* }"
19831
19832  # Input might be given as Windows format, start by converting to
19833  # unix format.
19834  new_path=`$CYGPATH -u "$path"`
19835
19836  # Now try to locate executable using which
19837  new_path=`$WHICH "$new_path" 2> /dev/null`
19838  # bat and cmd files are not always considered executable in cygwin causing which
19839  # to not find them
19840  if test "x$new_path" = x \
19841      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19842      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19843    new_path=`$CYGPATH -u "$path"`
19844  fi
19845  if test "x$new_path" = x; then
19846    # Oops. Which didn't find the executable.
19847    # The splitting of arguments from the executable at a space might have been incorrect,
19848    # since paths with space are more likely in Windows. Give it another try with the whole
19849    # argument.
19850    path="$complete"
19851    arguments="EOL"
19852    new_path=`$CYGPATH -u "$path"`
19853    new_path=`$WHICH "$new_path" 2> /dev/null`
19854    # bat and cmd files are not always considered executable in cygwin causing which
19855    # to not find them
19856    if test "x$new_path" = x \
19857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19859      new_path=`$CYGPATH -u "$path"`
19860    fi
19861    if test "x$new_path" = x; then
19862      # It's still not found. Now this is an unrecoverable error.
19863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19864$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19865      has_space=`$ECHO "$complete" | $GREP " "`
19866      if test "x$has_space" != x; then
19867        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19868$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19869      fi
19870      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19871    fi
19872  fi
19873
19874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19877  # "foo.exe" is OK but "foo" is an error.
19878  #
19879  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19880  # It is also a way to make sure we got the proper file name for the real test later on.
19881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19882  if test "x$test_shortpath" = x; then
19883    # Short path failed, file does not exist as specified.
19884    # Try adding .exe or .cmd
19885    if test -f "${new_path}.exe"; then
19886      input_to_shortpath="${new_path}.exe"
19887    elif test -f "${new_path}.cmd"; then
19888      input_to_shortpath="${new_path}.cmd"
19889    else
19890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19891$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19892      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19893$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19894      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19895    fi
19896  else
19897    input_to_shortpath="$new_path"
19898  fi
19899
19900  # Call helper function which possibly converts this using DOS-style short mode.
19901  # If so, the updated path is stored in $new_path.
19902  new_path="$input_to_shortpath"
19903
19904  input_path="$input_to_shortpath"
19905  # Check if we need to convert this using DOS-style short mode. If the path
19906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19907  # take no chances and rewrite it.
19908  # Note: m4 eats our [], so we need to use [ and ] instead.
19909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19910  if test "x$has_forbidden_chars" != x; then
19911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19915      # Going to short mode and back again did indeed matter. Since short mode is
19916      # case insensitive, let's make it lowercase to improve readability.
19917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19918      # Now convert it back to Unix-style (cygpath)
19919      input_path=`$CYGPATH -u "$shortmode_path"`
19920      new_path="$input_path"
19921    fi
19922  fi
19923
19924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19925  if test "x$test_cygdrive_prefix" = x; then
19926    # As a simple fix, exclude /usr/bin since it's not a real path.
19927    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19929      # a path prefixed by /cygdrive for fixpath to work.
19930      new_path="$CYGWIN_ROOT_PATH$input_path"
19931    fi
19932  fi
19933
19934  # remove trailing .exe if any
19935  new_path="${new_path/%.exe/}"
19936
19937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19938
19939  # First separate the path from the arguments. This will split at the first
19940  # space.
19941  complete="$FOUND_MAKE"
19942  path="${complete%% *}"
19943  tmp="$complete EOL"
19944  arguments="${tmp#* }"
19945
19946  # Input might be given as Windows format, start by converting to
19947  # unix format.
19948  new_path="$path"
19949
19950  windows_path="$new_path"
19951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19952    unix_path=`$CYGPATH -u "$windows_path"`
19953    new_path="$unix_path"
19954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19956    new_path="$unix_path"
19957  fi
19958
19959
19960  # Now try to locate executable using which
19961  new_path=`$WHICH "$new_path" 2> /dev/null`
19962
19963  if test "x$new_path" = x; then
19964    # Oops. Which didn't find the executable.
19965    # The splitting of arguments from the executable at a space might have been incorrect,
19966    # since paths with space are more likely in Windows. Give it another try with the whole
19967    # argument.
19968    path="$complete"
19969    arguments="EOL"
19970    new_path="$path"
19971
19972  windows_path="$new_path"
19973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19974    unix_path=`$CYGPATH -u "$windows_path"`
19975    new_path="$unix_path"
19976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19978    new_path="$unix_path"
19979  fi
19980
19981
19982    new_path=`$WHICH "$new_path" 2> /dev/null`
19983    # bat and cmd files are not always considered executable in MSYS causing which
19984    # to not find them
19985    if test "x$new_path" = x \
19986        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19987        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19988      new_path="$path"
19989
19990  windows_path="$new_path"
19991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19992    unix_path=`$CYGPATH -u "$windows_path"`
19993    new_path="$unix_path"
19994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19996    new_path="$unix_path"
19997  fi
19998
19999    fi
20000
20001    if test "x$new_path" = x; then
20002      # It's still not found. Now this is an unrecoverable error.
20003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20005      has_space=`$ECHO "$complete" | $GREP " "`
20006      if test "x$has_space" != x; then
20007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20009      fi
20010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20011    fi
20012  fi
20013
20014  # Now new_path has a complete unix path to the binary
20015  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20016    # Keep paths in /bin as-is, but remove trailing .exe if any
20017    new_path="${new_path/%.exe/}"
20018    # Do not save /bin paths to all_fixpath_prefixes!
20019  else
20020    # Not in mixed or Windows style, start by that.
20021    new_path=`cmd //c echo $new_path`
20022
20023  input_path="$new_path"
20024  # Check if we need to convert this using DOS-style short mode. If the path
20025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20026  # take no chances and rewrite it.
20027  # Note: m4 eats our [], so we need to use [ and ] instead.
20028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20029  if test "x$has_forbidden_chars" != x; then
20030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20031    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20032  fi
20033
20034    # Output is in $new_path
20035
20036  windows_path="$new_path"
20037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20038    unix_path=`$CYGPATH -u "$windows_path"`
20039    new_path="$unix_path"
20040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20042    new_path="$unix_path"
20043  fi
20044
20045    # remove trailing .exe if any
20046    new_path="${new_path/%.exe/}"
20047
20048    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20049    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20050  fi
20051
20052    else
20053      # We're on a unix platform. Hooray! :)
20054      # First separate the path from the arguments. This will split at the first
20055      # space.
20056      complete="$FOUND_MAKE"
20057      path="${complete%% *}"
20058      tmp="$complete EOL"
20059      arguments="${tmp#* }"
20060
20061      # Cannot rely on the command "which" here since it doesn't always work.
20062      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20063      if test -z "$is_absolute_path"; then
20064        # Path to executable is not absolute. Find it.
20065        IFS_save="$IFS"
20066        IFS=:
20067        for p in $PATH; do
20068          if test -f "$p/$path" && test -x "$p/$path"; then
20069            new_path="$p/$path"
20070            break
20071          fi
20072        done
20073        IFS="$IFS_save"
20074      else
20075        # This is an absolute path, we can use it without further modifications.
20076        new_path="$path"
20077      fi
20078
20079      if test "x$new_path" = x; then
20080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20081$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20082        has_space=`$ECHO "$complete" | $GREP " "`
20083        if test "x$has_space" != x; then
20084          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20086        fi
20087        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20088      fi
20089    fi
20090
20091    # Now join together the path and the arguments once again
20092    if test "x$arguments" != xEOL; then
20093      new_complete="$new_path ${arguments% *}"
20094    else
20095      new_complete="$new_path"
20096    fi
20097
20098    if test "x$complete" != "x$new_complete"; then
20099      FOUND_MAKE="$new_complete"
20100      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20101$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20102    fi
20103  fi
20104
20105        fi
20106      fi
20107    fi
20108  fi
20109
20110    fi
20111
20112    if test "x$FOUND_MAKE" = x; then
20113      if test "x$TOOLCHAIN_PATH" != x; then
20114        # We have a toolchain path, check that as well before giving up.
20115        OLD_PATH=$PATH
20116        PATH=$TOOLCHAIN_PATH:$PATH
20117        for ac_prog in gmake
20118do
20119  # Extract the first word of "$ac_prog", so it can be a program name with args.
20120set dummy $ac_prog; ac_word=$2
20121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20122$as_echo_n "checking for $ac_word... " >&6; }
20123if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20124  $as_echo_n "(cached) " >&6
20125else
20126  case $CHECK_TOOLSDIR_GMAKE in
20127  [\\/]* | ?:[\\/]*)
20128  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20129  ;;
20130  *)
20131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20132for as_dir in $PATH
20133do
20134  IFS=$as_save_IFS
20135  test -z "$as_dir" && as_dir=.
20136    for ac_exec_ext in '' $ac_executable_extensions; do
20137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20138    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20140    break 2
20141  fi
20142done
20143  done
20144IFS=$as_save_IFS
20145
20146  ;;
20147esac
20148fi
20149CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20150if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20152$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20153else
20154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20155$as_echo "no" >&6; }
20156fi
20157
20158
20159  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20160done
20161
20162
20163  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20164  DESCRIPTION="gmake in tools-dir"
20165
20166  # On Cygwin, we require a newer version of make than on other platforms
20167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20168    MAKE_VERSION_EXPR="-e 4\."
20169    MAKE_REQUIRED_VERSION="4.0"
20170   else
20171    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20172    MAKE_REQUIRED_VERSION="3.81"
20173  fi
20174
20175  if test "x$MAKE_CANDIDATE" != x; then
20176    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20177$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20178    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20179    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20180    if test "x$IS_GNU_MAKE" = x; then
20181      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20182$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20183    else
20184      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20185      if test "x$IS_MODERN_MAKE" = x; then
20186        { $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
20187$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;}
20188      else
20189        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20190          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20191            MAKE_EXPECTED_ENV='cygwin'
20192          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20193            MAKE_EXPECTED_ENV='msys'
20194          else
20195            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20196          fi
20197          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20198          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20199        else
20200          # Not relevant for non-Windows
20201          IS_MAKE_CORRECT_ENV=true
20202        fi
20203        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20204          { $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
20205$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;}
20206        else
20207          FOUND_MAKE=$MAKE_CANDIDATE
20208
20209  # Only process if variable expands to non-empty
20210
20211  if test "x$FOUND_MAKE" != x; then
20212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20213
20214  # First separate the path from the arguments. This will split at the first
20215  # space.
20216  complete="$FOUND_MAKE"
20217  path="${complete%% *}"
20218  tmp="$complete EOL"
20219  arguments="${tmp#* }"
20220
20221  # Input might be given as Windows format, start by converting to
20222  # unix format.
20223  new_path=`$CYGPATH -u "$path"`
20224
20225  # Now try to locate executable using which
20226  new_path=`$WHICH "$new_path" 2> /dev/null`
20227  # bat and cmd files are not always considered executable in cygwin causing which
20228  # to not find them
20229  if test "x$new_path" = x \
20230      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20231      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20232    new_path=`$CYGPATH -u "$path"`
20233  fi
20234  if test "x$new_path" = x; then
20235    # Oops. Which didn't find the executable.
20236    # The splitting of arguments from the executable at a space might have been incorrect,
20237    # since paths with space are more likely in Windows. Give it another try with the whole
20238    # argument.
20239    path="$complete"
20240    arguments="EOL"
20241    new_path=`$CYGPATH -u "$path"`
20242    new_path=`$WHICH "$new_path" 2> /dev/null`
20243    # bat and cmd files are not always considered executable in cygwin causing which
20244    # to not find them
20245    if test "x$new_path" = x \
20246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20248      new_path=`$CYGPATH -u "$path"`
20249    fi
20250    if test "x$new_path" = x; then
20251      # It's still not found. Now this is an unrecoverable error.
20252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20253$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20254      has_space=`$ECHO "$complete" | $GREP " "`
20255      if test "x$has_space" != x; then
20256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20258      fi
20259      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20260    fi
20261  fi
20262
20263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20266  # "foo.exe" is OK but "foo" is an error.
20267  #
20268  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20269  # It is also a way to make sure we got the proper file name for the real test later on.
20270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20271  if test "x$test_shortpath" = x; then
20272    # Short path failed, file does not exist as specified.
20273    # Try adding .exe or .cmd
20274    if test -f "${new_path}.exe"; then
20275      input_to_shortpath="${new_path}.exe"
20276    elif test -f "${new_path}.cmd"; then
20277      input_to_shortpath="${new_path}.cmd"
20278    else
20279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20280$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20283      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20284    fi
20285  else
20286    input_to_shortpath="$new_path"
20287  fi
20288
20289  # Call helper function which possibly converts this using DOS-style short mode.
20290  # If so, the updated path is stored in $new_path.
20291  new_path="$input_to_shortpath"
20292
20293  input_path="$input_to_shortpath"
20294  # Check if we need to convert this using DOS-style short mode. If the path
20295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20296  # take no chances and rewrite it.
20297  # Note: m4 eats our [], so we need to use [ and ] instead.
20298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20299  if test "x$has_forbidden_chars" != x; then
20300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20304      # Going to short mode and back again did indeed matter. Since short mode is
20305      # case insensitive, let's make it lowercase to improve readability.
20306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20307      # Now convert it back to Unix-style (cygpath)
20308      input_path=`$CYGPATH -u "$shortmode_path"`
20309      new_path="$input_path"
20310    fi
20311  fi
20312
20313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20314  if test "x$test_cygdrive_prefix" = x; then
20315    # As a simple fix, exclude /usr/bin since it's not a real path.
20316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20318      # a path prefixed by /cygdrive for fixpath to work.
20319      new_path="$CYGWIN_ROOT_PATH$input_path"
20320    fi
20321  fi
20322
20323  # remove trailing .exe if any
20324  new_path="${new_path/%.exe/}"
20325
20326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20327
20328  # First separate the path from the arguments. This will split at the first
20329  # space.
20330  complete="$FOUND_MAKE"
20331  path="${complete%% *}"
20332  tmp="$complete EOL"
20333  arguments="${tmp#* }"
20334
20335  # Input might be given as Windows format, start by converting to
20336  # unix format.
20337  new_path="$path"
20338
20339  windows_path="$new_path"
20340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20341    unix_path=`$CYGPATH -u "$windows_path"`
20342    new_path="$unix_path"
20343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20345    new_path="$unix_path"
20346  fi
20347
20348
20349  # Now try to locate executable using which
20350  new_path=`$WHICH "$new_path" 2> /dev/null`
20351
20352  if test "x$new_path" = x; then
20353    # Oops. Which didn't find the executable.
20354    # The splitting of arguments from the executable at a space might have been incorrect,
20355    # since paths with space are more likely in Windows. Give it another try with the whole
20356    # argument.
20357    path="$complete"
20358    arguments="EOL"
20359    new_path="$path"
20360
20361  windows_path="$new_path"
20362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20363    unix_path=`$CYGPATH -u "$windows_path"`
20364    new_path="$unix_path"
20365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20367    new_path="$unix_path"
20368  fi
20369
20370
20371    new_path=`$WHICH "$new_path" 2> /dev/null`
20372    # bat and cmd files are not always considered executable in MSYS causing which
20373    # to not find them
20374    if test "x$new_path" = x \
20375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20377      new_path="$path"
20378
20379  windows_path="$new_path"
20380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20381    unix_path=`$CYGPATH -u "$windows_path"`
20382    new_path="$unix_path"
20383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20385    new_path="$unix_path"
20386  fi
20387
20388    fi
20389
20390    if test "x$new_path" = x; then
20391      # It's still not found. Now this is an unrecoverable error.
20392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20393$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20394      has_space=`$ECHO "$complete" | $GREP " "`
20395      if test "x$has_space" != x; then
20396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20398      fi
20399      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20400    fi
20401  fi
20402
20403  # Now new_path has a complete unix path to the binary
20404  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20405    # Keep paths in /bin as-is, but remove trailing .exe if any
20406    new_path="${new_path/%.exe/}"
20407    # Do not save /bin paths to all_fixpath_prefixes!
20408  else
20409    # Not in mixed or Windows style, start by that.
20410    new_path=`cmd //c echo $new_path`
20411
20412  input_path="$new_path"
20413  # Check if we need to convert this using DOS-style short mode. If the path
20414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20415  # take no chances and rewrite it.
20416  # Note: m4 eats our [], so we need to use [ and ] instead.
20417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20418  if test "x$has_forbidden_chars" != x; then
20419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20421  fi
20422
20423    # Output is in $new_path
20424
20425  windows_path="$new_path"
20426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20427    unix_path=`$CYGPATH -u "$windows_path"`
20428    new_path="$unix_path"
20429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20431    new_path="$unix_path"
20432  fi
20433
20434    # remove trailing .exe if any
20435    new_path="${new_path/%.exe/}"
20436
20437    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20438    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20439  fi
20440
20441    else
20442      # We're on a unix platform. Hooray! :)
20443      # First separate the path from the arguments. This will split at the first
20444      # space.
20445      complete="$FOUND_MAKE"
20446      path="${complete%% *}"
20447      tmp="$complete EOL"
20448      arguments="${tmp#* }"
20449
20450      # Cannot rely on the command "which" here since it doesn't always work.
20451      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20452      if test -z "$is_absolute_path"; then
20453        # Path to executable is not absolute. Find it.
20454        IFS_save="$IFS"
20455        IFS=:
20456        for p in $PATH; do
20457          if test -f "$p/$path" && test -x "$p/$path"; then
20458            new_path="$p/$path"
20459            break
20460          fi
20461        done
20462        IFS="$IFS_save"
20463      else
20464        # This is an absolute path, we can use it without further modifications.
20465        new_path="$path"
20466      fi
20467
20468      if test "x$new_path" = x; then
20469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20471        has_space=`$ECHO "$complete" | $GREP " "`
20472        if test "x$has_space" != x; then
20473          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20474$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20475        fi
20476        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20477      fi
20478    fi
20479
20480    # Now join together the path and the arguments once again
20481    if test "x$arguments" != xEOL; then
20482      new_complete="$new_path ${arguments% *}"
20483    else
20484      new_complete="$new_path"
20485    fi
20486
20487    if test "x$complete" != "x$new_complete"; then
20488      FOUND_MAKE="$new_complete"
20489      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20490$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20491    fi
20492  fi
20493
20494        fi
20495      fi
20496    fi
20497  fi
20498
20499        if test "x$FOUND_MAKE" = x; then
20500          for ac_prog in make
20501do
20502  # Extract the first word of "$ac_prog", so it can be a program name with args.
20503set dummy $ac_prog; ac_word=$2
20504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20505$as_echo_n "checking for $ac_word... " >&6; }
20506if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20507  $as_echo_n "(cached) " >&6
20508else
20509  case $CHECK_TOOLSDIR_MAKE in
20510  [\\/]* | ?:[\\/]*)
20511  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20512  ;;
20513  *)
20514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20515for as_dir in $PATH
20516do
20517  IFS=$as_save_IFS
20518  test -z "$as_dir" && as_dir=.
20519    for ac_exec_ext in '' $ac_executable_extensions; do
20520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20521    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20523    break 2
20524  fi
20525done
20526  done
20527IFS=$as_save_IFS
20528
20529  ;;
20530esac
20531fi
20532CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20533if test -n "$CHECK_TOOLSDIR_MAKE"; then
20534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20535$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20536else
20537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20538$as_echo "no" >&6; }
20539fi
20540
20541
20542  test -n "$CHECK_TOOLSDIR_MAKE" && break
20543done
20544
20545
20546  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20547  DESCRIPTION="make in tools-dir"
20548
20549  # On Cygwin, we require a newer version of make than on other platforms
20550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20551    MAKE_VERSION_EXPR="-e 4\."
20552    MAKE_REQUIRED_VERSION="4.0"
20553   else
20554    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20555    MAKE_REQUIRED_VERSION="3.81"
20556  fi
20557
20558  if test "x$MAKE_CANDIDATE" != x; then
20559    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20560$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20561    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20562    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20563    if test "x$IS_GNU_MAKE" = x; then
20564      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20565$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20566    else
20567      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20568      if test "x$IS_MODERN_MAKE" = x; then
20569        { $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
20570$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;}
20571      else
20572        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20573          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20574            MAKE_EXPECTED_ENV='cygwin'
20575          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20576            MAKE_EXPECTED_ENV='msys'
20577          else
20578            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20579          fi
20580          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20581          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20582        else
20583          # Not relevant for non-Windows
20584          IS_MAKE_CORRECT_ENV=true
20585        fi
20586        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20587          { $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
20588$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;}
20589        else
20590          FOUND_MAKE=$MAKE_CANDIDATE
20591
20592  # Only process if variable expands to non-empty
20593
20594  if test "x$FOUND_MAKE" != x; then
20595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20596
20597  # First separate the path from the arguments. This will split at the first
20598  # space.
20599  complete="$FOUND_MAKE"
20600  path="${complete%% *}"
20601  tmp="$complete EOL"
20602  arguments="${tmp#* }"
20603
20604  # Input might be given as Windows format, start by converting to
20605  # unix format.
20606  new_path=`$CYGPATH -u "$path"`
20607
20608  # Now try to locate executable using which
20609  new_path=`$WHICH "$new_path" 2> /dev/null`
20610  # bat and cmd files are not always considered executable in cygwin causing which
20611  # to not find them
20612  if test "x$new_path" = x \
20613      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20614      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20615    new_path=`$CYGPATH -u "$path"`
20616  fi
20617  if test "x$new_path" = x; then
20618    # Oops. Which didn't find the executable.
20619    # The splitting of arguments from the executable at a space might have been incorrect,
20620    # since paths with space are more likely in Windows. Give it another try with the whole
20621    # argument.
20622    path="$complete"
20623    arguments="EOL"
20624    new_path=`$CYGPATH -u "$path"`
20625    new_path=`$WHICH "$new_path" 2> /dev/null`
20626    # bat and cmd files are not always considered executable in cygwin causing which
20627    # to not find them
20628    if test "x$new_path" = x \
20629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20631      new_path=`$CYGPATH -u "$path"`
20632    fi
20633    if test "x$new_path" = x; then
20634      # It's still not found. Now this is an unrecoverable error.
20635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20636$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20637      has_space=`$ECHO "$complete" | $GREP " "`
20638      if test "x$has_space" != x; then
20639        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20640$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20641      fi
20642      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20643    fi
20644  fi
20645
20646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20649  # "foo.exe" is OK but "foo" is an error.
20650  #
20651  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20652  # It is also a way to make sure we got the proper file name for the real test later on.
20653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20654  if test "x$test_shortpath" = x; then
20655    # Short path failed, file does not exist as specified.
20656    # Try adding .exe or .cmd
20657    if test -f "${new_path}.exe"; then
20658      input_to_shortpath="${new_path}.exe"
20659    elif test -f "${new_path}.cmd"; then
20660      input_to_shortpath="${new_path}.cmd"
20661    else
20662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20664      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20665$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20666      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20667    fi
20668  else
20669    input_to_shortpath="$new_path"
20670  fi
20671
20672  # Call helper function which possibly converts this using DOS-style short mode.
20673  # If so, the updated path is stored in $new_path.
20674  new_path="$input_to_shortpath"
20675
20676  input_path="$input_to_shortpath"
20677  # Check if we need to convert this using DOS-style short mode. If the path
20678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20679  # take no chances and rewrite it.
20680  # Note: m4 eats our [], so we need to use [ and ] instead.
20681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20682  if test "x$has_forbidden_chars" != x; then
20683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20687      # Going to short mode and back again did indeed matter. Since short mode is
20688      # case insensitive, let's make it lowercase to improve readability.
20689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20690      # Now convert it back to Unix-style (cygpath)
20691      input_path=`$CYGPATH -u "$shortmode_path"`
20692      new_path="$input_path"
20693    fi
20694  fi
20695
20696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20697  if test "x$test_cygdrive_prefix" = x; then
20698    # As a simple fix, exclude /usr/bin since it's not a real path.
20699    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20701      # a path prefixed by /cygdrive for fixpath to work.
20702      new_path="$CYGWIN_ROOT_PATH$input_path"
20703    fi
20704  fi
20705
20706  # remove trailing .exe if any
20707  new_path="${new_path/%.exe/}"
20708
20709    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20710
20711  # First separate the path from the arguments. This will split at the first
20712  # space.
20713  complete="$FOUND_MAKE"
20714  path="${complete%% *}"
20715  tmp="$complete EOL"
20716  arguments="${tmp#* }"
20717
20718  # Input might be given as Windows format, start by converting to
20719  # unix format.
20720  new_path="$path"
20721
20722  windows_path="$new_path"
20723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20724    unix_path=`$CYGPATH -u "$windows_path"`
20725    new_path="$unix_path"
20726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20728    new_path="$unix_path"
20729  fi
20730
20731
20732  # Now try to locate executable using which
20733  new_path=`$WHICH "$new_path" 2> /dev/null`
20734
20735  if test "x$new_path" = x; then
20736    # Oops. Which didn't find the executable.
20737    # The splitting of arguments from the executable at a space might have been incorrect,
20738    # since paths with space are more likely in Windows. Give it another try with the whole
20739    # argument.
20740    path="$complete"
20741    arguments="EOL"
20742    new_path="$path"
20743
20744  windows_path="$new_path"
20745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20746    unix_path=`$CYGPATH -u "$windows_path"`
20747    new_path="$unix_path"
20748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20750    new_path="$unix_path"
20751  fi
20752
20753
20754    new_path=`$WHICH "$new_path" 2> /dev/null`
20755    # bat and cmd files are not always considered executable in MSYS causing which
20756    # to not find them
20757    if test "x$new_path" = x \
20758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20760      new_path="$path"
20761
20762  windows_path="$new_path"
20763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20764    unix_path=`$CYGPATH -u "$windows_path"`
20765    new_path="$unix_path"
20766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20768    new_path="$unix_path"
20769  fi
20770
20771    fi
20772
20773    if test "x$new_path" = x; then
20774      # It's still not found. Now this is an unrecoverable error.
20775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20776$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20777      has_space=`$ECHO "$complete" | $GREP " "`
20778      if test "x$has_space" != x; then
20779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20781      fi
20782      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20783    fi
20784  fi
20785
20786  # Now new_path has a complete unix path to the binary
20787  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20788    # Keep paths in /bin as-is, but remove trailing .exe if any
20789    new_path="${new_path/%.exe/}"
20790    # Do not save /bin paths to all_fixpath_prefixes!
20791  else
20792    # Not in mixed or Windows style, start by that.
20793    new_path=`cmd //c echo $new_path`
20794
20795  input_path="$new_path"
20796  # Check if we need to convert this using DOS-style short mode. If the path
20797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20798  # take no chances and rewrite it.
20799  # Note: m4 eats our [], so we need to use [ and ] instead.
20800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20801  if test "x$has_forbidden_chars" != x; then
20802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20804  fi
20805
20806    # Output is in $new_path
20807
20808  windows_path="$new_path"
20809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20810    unix_path=`$CYGPATH -u "$windows_path"`
20811    new_path="$unix_path"
20812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20814    new_path="$unix_path"
20815  fi
20816
20817    # remove trailing .exe if any
20818    new_path="${new_path/%.exe/}"
20819
20820    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20821    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20822  fi
20823
20824    else
20825      # We're on a unix platform. Hooray! :)
20826      # First separate the path from the arguments. This will split at the first
20827      # space.
20828      complete="$FOUND_MAKE"
20829      path="${complete%% *}"
20830      tmp="$complete EOL"
20831      arguments="${tmp#* }"
20832
20833      # Cannot rely on the command "which" here since it doesn't always work.
20834      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20835      if test -z "$is_absolute_path"; then
20836        # Path to executable is not absolute. Find it.
20837        IFS_save="$IFS"
20838        IFS=:
20839        for p in $PATH; do
20840          if test -f "$p/$path" && test -x "$p/$path"; then
20841            new_path="$p/$path"
20842            break
20843          fi
20844        done
20845        IFS="$IFS_save"
20846      else
20847        # This is an absolute path, we can use it without further modifications.
20848        new_path="$path"
20849      fi
20850
20851      if test "x$new_path" = x; then
20852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20853$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20854        has_space=`$ECHO "$complete" | $GREP " "`
20855        if test "x$has_space" != x; then
20856          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20857$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20858        fi
20859        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20860      fi
20861    fi
20862
20863    # Now join together the path and the arguments once again
20864    if test "x$arguments" != xEOL; then
20865      new_complete="$new_path ${arguments% *}"
20866    else
20867      new_complete="$new_path"
20868    fi
20869
20870    if test "x$complete" != "x$new_complete"; then
20871      FOUND_MAKE="$new_complete"
20872      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20873$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20874    fi
20875  fi
20876
20877        fi
20878      fi
20879    fi
20880  fi
20881
20882        fi
20883        PATH=$OLD_PATH
20884      fi
20885    fi
20886
20887    if test "x$FOUND_MAKE" = x; then
20888      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
20889    fi
20890
20891    else
20892      # If it succeeded, then it was overridden by the user. We will use it
20893      # for the tool.
20894
20895      # First remove it from the list of overridden variables, so we can test
20896      # for unknown variables in the end.
20897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20898
20899      # Check if we try to supply an empty value
20900      if test "x$MAKE" = x; then
20901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20902$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20904$as_echo_n "checking for MAKE... " >&6; }
20905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20906$as_echo "disabled" >&6; }
20907      else
20908        # Check if the provided tool contains a complete path.
20909        tool_specified="$MAKE"
20910        tool_basename="${tool_specified##*/}"
20911        if test "x$tool_basename" = "x$tool_specified"; then
20912          # A command without a complete path is provided, search $PATH.
20913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20914$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20915          # Extract the first word of "$tool_basename", so it can be a program name with args.
20916set dummy $tool_basename; ac_word=$2
20917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20918$as_echo_n "checking for $ac_word... " >&6; }
20919if ${ac_cv_path_MAKE+:} false; then :
20920  $as_echo_n "(cached) " >&6
20921else
20922  case $MAKE in
20923  [\\/]* | ?:[\\/]*)
20924  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20925  ;;
20926  *)
20927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20928for as_dir in $PATH
20929do
20930  IFS=$as_save_IFS
20931  test -z "$as_dir" && as_dir=.
20932    for ac_exec_ext in '' $ac_executable_extensions; do
20933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20934    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20936    break 2
20937  fi
20938done
20939  done
20940IFS=$as_save_IFS
20941
20942  ;;
20943esac
20944fi
20945MAKE=$ac_cv_path_MAKE
20946if test -n "$MAKE"; then
20947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20948$as_echo "$MAKE" >&6; }
20949else
20950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20951$as_echo "no" >&6; }
20952fi
20953
20954
20955          if test "x$MAKE" = x; then
20956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20957          fi
20958        else
20959          # Otherwise we believe it is a complete path. Use it as it is.
20960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20961$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20963$as_echo_n "checking for MAKE... " >&6; }
20964          if test ! -x "$tool_specified"; then
20965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20966$as_echo "not found" >&6; }
20967            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20968          fi
20969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20970$as_echo "$tool_specified" >&6; }
20971        fi
20972      fi
20973    fi
20974
20975    # If MAKE was set by user, verify the version
20976
20977  MAKE_CANDIDATE=""$MAKE""
20978  DESCRIPTION="user supplied MAKE=$MAKE"
20979
20980  # On Cygwin, we require a newer version of make than on other platforms
20981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20982    MAKE_VERSION_EXPR="-e 4\."
20983    MAKE_REQUIRED_VERSION="4.0"
20984   else
20985    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20986    MAKE_REQUIRED_VERSION="3.81"
20987  fi
20988
20989  if test "x$MAKE_CANDIDATE" != x; then
20990    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20991$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20992    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20993    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20994    if test "x$IS_GNU_MAKE" = x; then
20995      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20996$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20997    else
20998      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20999      if test "x$IS_MODERN_MAKE" = x; then
21000        { $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
21001$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;}
21002      else
21003        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21004          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21005            MAKE_EXPECTED_ENV='cygwin'
21006          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21007            MAKE_EXPECTED_ENV='msys'
21008          else
21009            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21010          fi
21011          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21012          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21013        else
21014          # Not relevant for non-Windows
21015          IS_MAKE_CORRECT_ENV=true
21016        fi
21017        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21018          { $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
21019$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;}
21020        else
21021          FOUND_MAKE=$MAKE_CANDIDATE
21022
21023  # Only process if variable expands to non-empty
21024
21025  if test "x$FOUND_MAKE" != x; then
21026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21027
21028  # First separate the path from the arguments. This will split at the first
21029  # space.
21030  complete="$FOUND_MAKE"
21031  path="${complete%% *}"
21032  tmp="$complete EOL"
21033  arguments="${tmp#* }"
21034
21035  # Input might be given as Windows format, start by converting to
21036  # unix format.
21037  new_path=`$CYGPATH -u "$path"`
21038
21039  # Now try to locate executable using which
21040  new_path=`$WHICH "$new_path" 2> /dev/null`
21041  # bat and cmd files are not always considered executable in cygwin causing which
21042  # to not find them
21043  if test "x$new_path" = x \
21044      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21045      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21046    new_path=`$CYGPATH -u "$path"`
21047  fi
21048  if test "x$new_path" = x; then
21049    # Oops. Which didn't find the executable.
21050    # The splitting of arguments from the executable at a space might have been incorrect,
21051    # since paths with space are more likely in Windows. Give it another try with the whole
21052    # argument.
21053    path="$complete"
21054    arguments="EOL"
21055    new_path=`$CYGPATH -u "$path"`
21056    new_path=`$WHICH "$new_path" 2> /dev/null`
21057    # bat and cmd files are not always considered executable in cygwin causing which
21058    # to not find them
21059    if test "x$new_path" = x \
21060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21062      new_path=`$CYGPATH -u "$path"`
21063    fi
21064    if test "x$new_path" = x; then
21065      # It's still not found. Now this is an unrecoverable error.
21066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21068      has_space=`$ECHO "$complete" | $GREP " "`
21069      if test "x$has_space" != x; then
21070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21072      fi
21073      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21074    fi
21075  fi
21076
21077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21080  # "foo.exe" is OK but "foo" is an error.
21081  #
21082  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21083  # It is also a way to make sure we got the proper file name for the real test later on.
21084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21085  if test "x$test_shortpath" = x; then
21086    # Short path failed, file does not exist as specified.
21087    # Try adding .exe or .cmd
21088    if test -f "${new_path}.exe"; then
21089      input_to_shortpath="${new_path}.exe"
21090    elif test -f "${new_path}.cmd"; then
21091      input_to_shortpath="${new_path}.cmd"
21092    else
21093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21094$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21097      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21098    fi
21099  else
21100    input_to_shortpath="$new_path"
21101  fi
21102
21103  # Call helper function which possibly converts this using DOS-style short mode.
21104  # If so, the updated path is stored in $new_path.
21105  new_path="$input_to_shortpath"
21106
21107  input_path="$input_to_shortpath"
21108  # Check if we need to convert this using DOS-style short mode. If the path
21109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21110  # take no chances and rewrite it.
21111  # Note: m4 eats our [], so we need to use [ and ] instead.
21112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21113  if test "x$has_forbidden_chars" != x; then
21114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21118      # Going to short mode and back again did indeed matter. Since short mode is
21119      # case insensitive, let's make it lowercase to improve readability.
21120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21121      # Now convert it back to Unix-style (cygpath)
21122      input_path=`$CYGPATH -u "$shortmode_path"`
21123      new_path="$input_path"
21124    fi
21125  fi
21126
21127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21128  if test "x$test_cygdrive_prefix" = x; then
21129    # As a simple fix, exclude /usr/bin since it's not a real path.
21130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21132      # a path prefixed by /cygdrive for fixpath to work.
21133      new_path="$CYGWIN_ROOT_PATH$input_path"
21134    fi
21135  fi
21136
21137  # remove trailing .exe if any
21138  new_path="${new_path/%.exe/}"
21139
21140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21141
21142  # First separate the path from the arguments. This will split at the first
21143  # space.
21144  complete="$FOUND_MAKE"
21145  path="${complete%% *}"
21146  tmp="$complete EOL"
21147  arguments="${tmp#* }"
21148
21149  # Input might be given as Windows format, start by converting to
21150  # unix format.
21151  new_path="$path"
21152
21153  windows_path="$new_path"
21154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21155    unix_path=`$CYGPATH -u "$windows_path"`
21156    new_path="$unix_path"
21157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21159    new_path="$unix_path"
21160  fi
21161
21162
21163  # Now try to locate executable using which
21164  new_path=`$WHICH "$new_path" 2> /dev/null`
21165
21166  if test "x$new_path" = x; then
21167    # Oops. Which didn't find the executable.
21168    # The splitting of arguments from the executable at a space might have been incorrect,
21169    # since paths with space are more likely in Windows. Give it another try with the whole
21170    # argument.
21171    path="$complete"
21172    arguments="EOL"
21173    new_path="$path"
21174
21175  windows_path="$new_path"
21176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21177    unix_path=`$CYGPATH -u "$windows_path"`
21178    new_path="$unix_path"
21179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21181    new_path="$unix_path"
21182  fi
21183
21184
21185    new_path=`$WHICH "$new_path" 2> /dev/null`
21186    # bat and cmd files are not always considered executable in MSYS causing which
21187    # to not find them
21188    if test "x$new_path" = x \
21189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21191      new_path="$path"
21192
21193  windows_path="$new_path"
21194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21195    unix_path=`$CYGPATH -u "$windows_path"`
21196    new_path="$unix_path"
21197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21199    new_path="$unix_path"
21200  fi
21201
21202    fi
21203
21204    if test "x$new_path" = x; then
21205      # It's still not found. Now this is an unrecoverable error.
21206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21208      has_space=`$ECHO "$complete" | $GREP " "`
21209      if test "x$has_space" != x; then
21210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21212      fi
21213      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21214    fi
21215  fi
21216
21217  # Now new_path has a complete unix path to the binary
21218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21219    # Keep paths in /bin as-is, but remove trailing .exe if any
21220    new_path="${new_path/%.exe/}"
21221    # Do not save /bin paths to all_fixpath_prefixes!
21222  else
21223    # Not in mixed or Windows style, start by that.
21224    new_path=`cmd //c echo $new_path`
21225
21226  input_path="$new_path"
21227  # Check if we need to convert this using DOS-style short mode. If the path
21228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21229  # take no chances and rewrite it.
21230  # Note: m4 eats our [], so we need to use [ and ] instead.
21231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21232  if test "x$has_forbidden_chars" != x; then
21233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21235  fi
21236
21237    # Output is in $new_path
21238
21239  windows_path="$new_path"
21240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21241    unix_path=`$CYGPATH -u "$windows_path"`
21242    new_path="$unix_path"
21243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21245    new_path="$unix_path"
21246  fi
21247
21248    # remove trailing .exe if any
21249    new_path="${new_path/%.exe/}"
21250
21251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21253  fi
21254
21255    else
21256      # We're on a unix platform. Hooray! :)
21257      # First separate the path from the arguments. This will split at the first
21258      # space.
21259      complete="$FOUND_MAKE"
21260      path="${complete%% *}"
21261      tmp="$complete EOL"
21262      arguments="${tmp#* }"
21263
21264      # Cannot rely on the command "which" here since it doesn't always work.
21265      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21266      if test -z "$is_absolute_path"; then
21267        # Path to executable is not absolute. Find it.
21268        IFS_save="$IFS"
21269        IFS=:
21270        for p in $PATH; do
21271          if test -f "$p/$path" && test -x "$p/$path"; then
21272            new_path="$p/$path"
21273            break
21274          fi
21275        done
21276        IFS="$IFS_save"
21277      else
21278        # This is an absolute path, we can use it without further modifications.
21279        new_path="$path"
21280      fi
21281
21282      if test "x$new_path" = x; then
21283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21284$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21285        has_space=`$ECHO "$complete" | $GREP " "`
21286        if test "x$has_space" != x; then
21287          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21289        fi
21290        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21291      fi
21292    fi
21293
21294    # Now join together the path and the arguments once again
21295    if test "x$arguments" != xEOL; then
21296      new_complete="$new_path ${arguments% *}"
21297    else
21298      new_complete="$new_path"
21299    fi
21300
21301    if test "x$complete" != "x$new_complete"; then
21302      FOUND_MAKE="$new_complete"
21303      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21304$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21305    fi
21306  fi
21307
21308        fi
21309      fi
21310    fi
21311  fi
21312
21313    if test "x$FOUND_MAKE" = x; then
21314      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21315    fi
21316
21317  fi
21318
21319
21320  MAKE=$FOUND_MAKE
21321
21322  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21323$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21324
21325
21326  # Check if make supports the output sync option and if so, setup using it.
21327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21328$as_echo_n "checking if make --output-sync is supported... " >&6; }
21329  if $MAKE --version -O > /dev/null 2>&1; then
21330    OUTPUT_SYNC_SUPPORTED=true
21331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21332$as_echo "yes" >&6; }
21333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21334$as_echo_n "checking for output-sync value... " >&6; }
21335
21336# Check whether --with-output-sync was given.
21337if test "${with_output_sync+set}" = set; then :
21338  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21339fi
21340
21341    if test "x$OUTPUT_SYNC" = "x"; then
21342      OUTPUT_SYNC=none
21343    fi
21344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21345$as_echo "$OUTPUT_SYNC" >&6; }
21346    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21347      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21348    fi
21349  else
21350    OUTPUT_SYNC_SUPPORTED=false
21351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21352$as_echo "no" >&6; }
21353  fi
21354
21355
21356
21357
21358
21359
21360  # Test if find supports -delete
21361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21362$as_echo_n "checking if find supports -delete... " >&6; }
21363  FIND_DELETE="-delete"
21364
21365  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21366
21367  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21368
21369  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21370  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21371    # No, it does not.
21372    $RM $DELETEDIR/TestIfFindSupportsDelete
21373    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21374      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21375      FIND_DELETE="-print | $XARGS $RM"
21376    else
21377      FIND_DELETE="-exec $RM \{\} \+"
21378    fi
21379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21380$as_echo "no" >&6; }
21381  else
21382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21383$as_echo "yes" >&6; }
21384  fi
21385  $RMDIR $DELETEDIR
21386
21387
21388
21389  # Test which kind of tar was found
21390  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21391    TAR_TYPE="gnu"
21392  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21393    TAR_TYPE="bsd"
21394  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21395    TAR_TYPE="bsd"
21396  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21397    TAR_TYPE="solaris"
21398  fi
21399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21400$as_echo_n "checking what type of tar was found... " >&6; }
21401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21402$as_echo "$TAR_TYPE" >&6; }
21403
21404  TAR_CREATE_FILE_PARAM=""
21405
21406  if test "x$TAR_TYPE" = "xgnu"; then
21407    TAR_INCLUDE_PARAM="T"
21408    TAR_SUPPORTS_TRANSFORM="true"
21409    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21410      # When using gnu tar for Solaris targets, need to use compatibility mode
21411      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21412    fi
21413  else
21414    TAR_INCLUDE_PARAM="I"
21415    TAR_SUPPORTS_TRANSFORM="false"
21416  fi
21417
21418
21419
21420
21421
21422
21423  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21424  # This is a problem for the grep resident on AIX.
21425  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21426$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21427  # Multiple subsequent spaces..
21428  STACK_SPACES='aaa   bbb   ccc'
21429  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21430  # patterns in it.
21431  STACK_LIST=${STACK_SPACES// /$'\n'}
21432  NEEDLE_SPACES='ccc bbb aaa'
21433  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21434  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21435  if test "x$RESULT" == "x"; then
21436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21437$as_echo "yes" >&6; }
21438  else
21439    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21440      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21441    fi
21442    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21443  fi
21444
21445
21446  # These tools might not be installed by default,
21447  # need hint on how to install them.
21448
21449
21450
21451  # Publish this variable in the help.
21452
21453
21454  if [ -z "${UNZIP+x}" ]; then
21455    # The variable is not set by user, try to locate tool using the code snippet
21456    for ac_prog in unzip
21457do
21458  # Extract the first word of "$ac_prog", so it can be a program name with args.
21459set dummy $ac_prog; ac_word=$2
21460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21461$as_echo_n "checking for $ac_word... " >&6; }
21462if ${ac_cv_path_UNZIP+:} false; then :
21463  $as_echo_n "(cached) " >&6
21464else
21465  case $UNZIP in
21466  [\\/]* | ?:[\\/]*)
21467  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21468  ;;
21469  *)
21470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21471for as_dir in $PATH
21472do
21473  IFS=$as_save_IFS
21474  test -z "$as_dir" && as_dir=.
21475    for ac_exec_ext in '' $ac_executable_extensions; do
21476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21477    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21479    break 2
21480  fi
21481done
21482  done
21483IFS=$as_save_IFS
21484
21485  ;;
21486esac
21487fi
21488UNZIP=$ac_cv_path_UNZIP
21489if test -n "$UNZIP"; then
21490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21491$as_echo "$UNZIP" >&6; }
21492else
21493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21494$as_echo "no" >&6; }
21495fi
21496
21497
21498  test -n "$UNZIP" && break
21499done
21500
21501  else
21502    # The variable is set, but is it from the command line or the environment?
21503
21504    # Try to remove the string !UNZIP! from our list.
21505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21507      # If it failed, the variable was not from the command line. Ignore it,
21508      # but warn the user (except for BASH, which is always set by the calling BASH).
21509      if test "xUNZIP" != xBASH; then
21510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21511$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21512      fi
21513      # Try to locate tool using the code snippet
21514      for ac_prog in unzip
21515do
21516  # Extract the first word of "$ac_prog", so it can be a program name with args.
21517set dummy $ac_prog; ac_word=$2
21518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21519$as_echo_n "checking for $ac_word... " >&6; }
21520if ${ac_cv_path_UNZIP+:} false; then :
21521  $as_echo_n "(cached) " >&6
21522else
21523  case $UNZIP in
21524  [\\/]* | ?:[\\/]*)
21525  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21526  ;;
21527  *)
21528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21529for as_dir in $PATH
21530do
21531  IFS=$as_save_IFS
21532  test -z "$as_dir" && as_dir=.
21533    for ac_exec_ext in '' $ac_executable_extensions; do
21534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21535    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21537    break 2
21538  fi
21539done
21540  done
21541IFS=$as_save_IFS
21542
21543  ;;
21544esac
21545fi
21546UNZIP=$ac_cv_path_UNZIP
21547if test -n "$UNZIP"; then
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21549$as_echo "$UNZIP" >&6; }
21550else
21551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21552$as_echo "no" >&6; }
21553fi
21554
21555
21556  test -n "$UNZIP" && break
21557done
21558
21559    else
21560      # If it succeeded, then it was overridden by the user. We will use it
21561      # for the tool.
21562
21563      # First remove it from the list of overridden variables, so we can test
21564      # for unknown variables in the end.
21565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21566
21567      # Check if we try to supply an empty value
21568      if test "x$UNZIP" = x; then
21569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21570$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21572$as_echo_n "checking for UNZIP... " >&6; }
21573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21574$as_echo "disabled" >&6; }
21575      else
21576        # Check if the provided tool contains a complete path.
21577        tool_specified="$UNZIP"
21578        tool_basename="${tool_specified##*/}"
21579        if test "x$tool_basename" = "x$tool_specified"; then
21580          # A command without a complete path is provided, search $PATH.
21581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21582$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21583          # Extract the first word of "$tool_basename", so it can be a program name with args.
21584set dummy $tool_basename; ac_word=$2
21585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21586$as_echo_n "checking for $ac_word... " >&6; }
21587if ${ac_cv_path_UNZIP+:} false; then :
21588  $as_echo_n "(cached) " >&6
21589else
21590  case $UNZIP in
21591  [\\/]* | ?:[\\/]*)
21592  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21593  ;;
21594  *)
21595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21596for as_dir in $PATH
21597do
21598  IFS=$as_save_IFS
21599  test -z "$as_dir" && as_dir=.
21600    for ac_exec_ext in '' $ac_executable_extensions; do
21601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21602    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21604    break 2
21605  fi
21606done
21607  done
21608IFS=$as_save_IFS
21609
21610  ;;
21611esac
21612fi
21613UNZIP=$ac_cv_path_UNZIP
21614if test -n "$UNZIP"; then
21615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21616$as_echo "$UNZIP" >&6; }
21617else
21618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21619$as_echo "no" >&6; }
21620fi
21621
21622
21623          if test "x$UNZIP" = x; then
21624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21625          fi
21626        else
21627          # Otherwise we believe it is a complete path. Use it as it is.
21628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21629$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21631$as_echo_n "checking for UNZIP... " >&6; }
21632          if test ! -x "$tool_specified"; then
21633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21634$as_echo "not found" >&6; }
21635            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21636          fi
21637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21638$as_echo "$tool_specified" >&6; }
21639        fi
21640      fi
21641    fi
21642
21643  fi
21644
21645
21646
21647  if test "x$UNZIP" = x; then
21648    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21649  fi
21650
21651
21652  # Since zip uses "ZIP" as a environment variable for passing options, we need
21653  # to name our variable differently, hence ZIPEXE.
21654
21655
21656
21657  # Publish this variable in the help.
21658
21659
21660  if [ -z "${ZIPEXE+x}" ]; then
21661    # The variable is not set by user, try to locate tool using the code snippet
21662    for ac_prog in zip
21663do
21664  # Extract the first word of "$ac_prog", so it can be a program name with args.
21665set dummy $ac_prog; ac_word=$2
21666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21667$as_echo_n "checking for $ac_word... " >&6; }
21668if ${ac_cv_path_ZIPEXE+:} false; then :
21669  $as_echo_n "(cached) " >&6
21670else
21671  case $ZIPEXE in
21672  [\\/]* | ?:[\\/]*)
21673  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21674  ;;
21675  *)
21676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21677for as_dir in $PATH
21678do
21679  IFS=$as_save_IFS
21680  test -z "$as_dir" && as_dir=.
21681    for ac_exec_ext in '' $ac_executable_extensions; do
21682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21683    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21685    break 2
21686  fi
21687done
21688  done
21689IFS=$as_save_IFS
21690
21691  ;;
21692esac
21693fi
21694ZIPEXE=$ac_cv_path_ZIPEXE
21695if test -n "$ZIPEXE"; then
21696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21697$as_echo "$ZIPEXE" >&6; }
21698else
21699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21700$as_echo "no" >&6; }
21701fi
21702
21703
21704  test -n "$ZIPEXE" && break
21705done
21706
21707  else
21708    # The variable is set, but is it from the command line or the environment?
21709
21710    # Try to remove the string !ZIPEXE! from our list.
21711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21713      # If it failed, the variable was not from the command line. Ignore it,
21714      # but warn the user (except for BASH, which is always set by the calling BASH).
21715      if test "xZIPEXE" != xBASH; then
21716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21717$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21718      fi
21719      # Try to locate tool using the code snippet
21720      for ac_prog in zip
21721do
21722  # Extract the first word of "$ac_prog", so it can be a program name with args.
21723set dummy $ac_prog; ac_word=$2
21724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21725$as_echo_n "checking for $ac_word... " >&6; }
21726if ${ac_cv_path_ZIPEXE+:} false; then :
21727  $as_echo_n "(cached) " >&6
21728else
21729  case $ZIPEXE in
21730  [\\/]* | ?:[\\/]*)
21731  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21732  ;;
21733  *)
21734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21735for as_dir in $PATH
21736do
21737  IFS=$as_save_IFS
21738  test -z "$as_dir" && as_dir=.
21739    for ac_exec_ext in '' $ac_executable_extensions; do
21740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21741    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21743    break 2
21744  fi
21745done
21746  done
21747IFS=$as_save_IFS
21748
21749  ;;
21750esac
21751fi
21752ZIPEXE=$ac_cv_path_ZIPEXE
21753if test -n "$ZIPEXE"; then
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21755$as_echo "$ZIPEXE" >&6; }
21756else
21757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21758$as_echo "no" >&6; }
21759fi
21760
21761
21762  test -n "$ZIPEXE" && break
21763done
21764
21765    else
21766      # If it succeeded, then it was overridden by the user. We will use it
21767      # for the tool.
21768
21769      # First remove it from the list of overridden variables, so we can test
21770      # for unknown variables in the end.
21771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21772
21773      # Check if we try to supply an empty value
21774      if test "x$ZIPEXE" = x; then
21775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21776$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21778$as_echo_n "checking for ZIPEXE... " >&6; }
21779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21780$as_echo "disabled" >&6; }
21781      else
21782        # Check if the provided tool contains a complete path.
21783        tool_specified="$ZIPEXE"
21784        tool_basename="${tool_specified##*/}"
21785        if test "x$tool_basename" = "x$tool_specified"; then
21786          # A command without a complete path is provided, search $PATH.
21787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21788$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21789          # Extract the first word of "$tool_basename", so it can be a program name with args.
21790set dummy $tool_basename; ac_word=$2
21791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21792$as_echo_n "checking for $ac_word... " >&6; }
21793if ${ac_cv_path_ZIPEXE+:} false; then :
21794  $as_echo_n "(cached) " >&6
21795else
21796  case $ZIPEXE in
21797  [\\/]* | ?:[\\/]*)
21798  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21799  ;;
21800  *)
21801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21802for as_dir in $PATH
21803do
21804  IFS=$as_save_IFS
21805  test -z "$as_dir" && as_dir=.
21806    for ac_exec_ext in '' $ac_executable_extensions; do
21807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21808    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21810    break 2
21811  fi
21812done
21813  done
21814IFS=$as_save_IFS
21815
21816  ;;
21817esac
21818fi
21819ZIPEXE=$ac_cv_path_ZIPEXE
21820if test -n "$ZIPEXE"; then
21821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21822$as_echo "$ZIPEXE" >&6; }
21823else
21824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21825$as_echo "no" >&6; }
21826fi
21827
21828
21829          if test "x$ZIPEXE" = x; then
21830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21831          fi
21832        else
21833          # Otherwise we believe it is a complete path. Use it as it is.
21834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21835$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21837$as_echo_n "checking for ZIPEXE... " >&6; }
21838          if test ! -x "$tool_specified"; then
21839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21840$as_echo "not found" >&6; }
21841            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21842          fi
21843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21844$as_echo "$tool_specified" >&6; }
21845        fi
21846      fi
21847    fi
21848
21849  fi
21850
21851
21852
21853  if test "x$ZIPEXE" = x; then
21854    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21855  fi
21856
21857
21858
21859  # Non-required basic tools
21860
21861
21862
21863  # Publish this variable in the help.
21864
21865
21866  if [ -z "${LDD+x}" ]; then
21867    # The variable is not set by user, try to locate tool using the code snippet
21868    for ac_prog in ldd
21869do
21870  # Extract the first word of "$ac_prog", so it can be a program name with args.
21871set dummy $ac_prog; ac_word=$2
21872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21873$as_echo_n "checking for $ac_word... " >&6; }
21874if ${ac_cv_path_LDD+:} false; then :
21875  $as_echo_n "(cached) " >&6
21876else
21877  case $LDD in
21878  [\\/]* | ?:[\\/]*)
21879  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21880  ;;
21881  *)
21882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21883for as_dir in $PATH
21884do
21885  IFS=$as_save_IFS
21886  test -z "$as_dir" && as_dir=.
21887    for ac_exec_ext in '' $ac_executable_extensions; do
21888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21889    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21891    break 2
21892  fi
21893done
21894  done
21895IFS=$as_save_IFS
21896
21897  ;;
21898esac
21899fi
21900LDD=$ac_cv_path_LDD
21901if test -n "$LDD"; then
21902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21903$as_echo "$LDD" >&6; }
21904else
21905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21906$as_echo "no" >&6; }
21907fi
21908
21909
21910  test -n "$LDD" && break
21911done
21912
21913  else
21914    # The variable is set, but is it from the command line or the environment?
21915
21916    # Try to remove the string !LDD! from our list.
21917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21919      # If it failed, the variable was not from the command line. Ignore it,
21920      # but warn the user (except for BASH, which is always set by the calling BASH).
21921      if test "xLDD" != xBASH; then
21922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21923$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21924      fi
21925      # Try to locate tool using the code snippet
21926      for ac_prog in ldd
21927do
21928  # Extract the first word of "$ac_prog", so it can be a program name with args.
21929set dummy $ac_prog; ac_word=$2
21930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21931$as_echo_n "checking for $ac_word... " >&6; }
21932if ${ac_cv_path_LDD+:} false; then :
21933  $as_echo_n "(cached) " >&6
21934else
21935  case $LDD in
21936  [\\/]* | ?:[\\/]*)
21937  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21938  ;;
21939  *)
21940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21941for as_dir in $PATH
21942do
21943  IFS=$as_save_IFS
21944  test -z "$as_dir" && as_dir=.
21945    for ac_exec_ext in '' $ac_executable_extensions; do
21946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21947    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21949    break 2
21950  fi
21951done
21952  done
21953IFS=$as_save_IFS
21954
21955  ;;
21956esac
21957fi
21958LDD=$ac_cv_path_LDD
21959if test -n "$LDD"; then
21960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21961$as_echo "$LDD" >&6; }
21962else
21963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21964$as_echo "no" >&6; }
21965fi
21966
21967
21968  test -n "$LDD" && break
21969done
21970
21971    else
21972      # If it succeeded, then it was overridden by the user. We will use it
21973      # for the tool.
21974
21975      # First remove it from the list of overridden variables, so we can test
21976      # for unknown variables in the end.
21977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21978
21979      # Check if we try to supply an empty value
21980      if test "x$LDD" = x; then
21981        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21982$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21983        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21984$as_echo_n "checking for LDD... " >&6; }
21985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21986$as_echo "disabled" >&6; }
21987      else
21988        # Check if the provided tool contains a complete path.
21989        tool_specified="$LDD"
21990        tool_basename="${tool_specified##*/}"
21991        if test "x$tool_basename" = "x$tool_specified"; then
21992          # A command without a complete path is provided, search $PATH.
21993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21994$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21995          # Extract the first word of "$tool_basename", so it can be a program name with args.
21996set dummy $tool_basename; ac_word=$2
21997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21998$as_echo_n "checking for $ac_word... " >&6; }
21999if ${ac_cv_path_LDD+:} false; then :
22000  $as_echo_n "(cached) " >&6
22001else
22002  case $LDD in
22003  [\\/]* | ?:[\\/]*)
22004  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22005  ;;
22006  *)
22007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22008for as_dir in $PATH
22009do
22010  IFS=$as_save_IFS
22011  test -z "$as_dir" && as_dir=.
22012    for ac_exec_ext in '' $ac_executable_extensions; do
22013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22014    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22016    break 2
22017  fi
22018done
22019  done
22020IFS=$as_save_IFS
22021
22022  ;;
22023esac
22024fi
22025LDD=$ac_cv_path_LDD
22026if test -n "$LDD"; then
22027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22028$as_echo "$LDD" >&6; }
22029else
22030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22031$as_echo "no" >&6; }
22032fi
22033
22034
22035          if test "x$LDD" = x; then
22036            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22037          fi
22038        else
22039          # Otherwise we believe it is a complete path. Use it as it is.
22040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22041$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22042          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22043$as_echo_n "checking for LDD... " >&6; }
22044          if test ! -x "$tool_specified"; then
22045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22046$as_echo "not found" >&6; }
22047            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22048          fi
22049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22050$as_echo "$tool_specified" >&6; }
22051        fi
22052      fi
22053    fi
22054
22055  fi
22056
22057
22058  if test "x$LDD" = "x"; then
22059    # List shared lib dependencies is used for
22060    # debug output and checking for forbidden dependencies.
22061    # We can build without it.
22062    LDD="true"
22063  fi
22064
22065
22066  # Publish this variable in the help.
22067
22068
22069  if [ -z "${OTOOL+x}" ]; then
22070    # The variable is not set by user, try to locate tool using the code snippet
22071    for ac_prog in otool
22072do
22073  # Extract the first word of "$ac_prog", so it can be a program name with args.
22074set dummy $ac_prog; ac_word=$2
22075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22076$as_echo_n "checking for $ac_word... " >&6; }
22077if ${ac_cv_path_OTOOL+:} false; then :
22078  $as_echo_n "(cached) " >&6
22079else
22080  case $OTOOL in
22081  [\\/]* | ?:[\\/]*)
22082  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22083  ;;
22084  *)
22085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22086for as_dir in $PATH
22087do
22088  IFS=$as_save_IFS
22089  test -z "$as_dir" && as_dir=.
22090    for ac_exec_ext in '' $ac_executable_extensions; do
22091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22092    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22094    break 2
22095  fi
22096done
22097  done
22098IFS=$as_save_IFS
22099
22100  ;;
22101esac
22102fi
22103OTOOL=$ac_cv_path_OTOOL
22104if test -n "$OTOOL"; then
22105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22106$as_echo "$OTOOL" >&6; }
22107else
22108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22109$as_echo "no" >&6; }
22110fi
22111
22112
22113  test -n "$OTOOL" && break
22114done
22115
22116  else
22117    # The variable is set, but is it from the command line or the environment?
22118
22119    # Try to remove the string !OTOOL! from our list.
22120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22122      # If it failed, the variable was not from the command line. Ignore it,
22123      # but warn the user (except for BASH, which is always set by the calling BASH).
22124      if test "xOTOOL" != xBASH; then
22125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22126$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22127      fi
22128      # Try to locate tool using the code snippet
22129      for ac_prog in otool
22130do
22131  # Extract the first word of "$ac_prog", so it can be a program name with args.
22132set dummy $ac_prog; ac_word=$2
22133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22134$as_echo_n "checking for $ac_word... " >&6; }
22135if ${ac_cv_path_OTOOL+:} false; then :
22136  $as_echo_n "(cached) " >&6
22137else
22138  case $OTOOL in
22139  [\\/]* | ?:[\\/]*)
22140  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22141  ;;
22142  *)
22143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22144for as_dir in $PATH
22145do
22146  IFS=$as_save_IFS
22147  test -z "$as_dir" && as_dir=.
22148    for ac_exec_ext in '' $ac_executable_extensions; do
22149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22150    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22152    break 2
22153  fi
22154done
22155  done
22156IFS=$as_save_IFS
22157
22158  ;;
22159esac
22160fi
22161OTOOL=$ac_cv_path_OTOOL
22162if test -n "$OTOOL"; then
22163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22164$as_echo "$OTOOL" >&6; }
22165else
22166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22167$as_echo "no" >&6; }
22168fi
22169
22170
22171  test -n "$OTOOL" && break
22172done
22173
22174    else
22175      # If it succeeded, then it was overridden by the user. We will use it
22176      # for the tool.
22177
22178      # First remove it from the list of overridden variables, so we can test
22179      # for unknown variables in the end.
22180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22181
22182      # Check if we try to supply an empty value
22183      if test "x$OTOOL" = x; then
22184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22185$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22187$as_echo_n "checking for OTOOL... " >&6; }
22188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22189$as_echo "disabled" >&6; }
22190      else
22191        # Check if the provided tool contains a complete path.
22192        tool_specified="$OTOOL"
22193        tool_basename="${tool_specified##*/}"
22194        if test "x$tool_basename" = "x$tool_specified"; then
22195          # A command without a complete path is provided, search $PATH.
22196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22197$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22198          # Extract the first word of "$tool_basename", so it can be a program name with args.
22199set dummy $tool_basename; ac_word=$2
22200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22201$as_echo_n "checking for $ac_word... " >&6; }
22202if ${ac_cv_path_OTOOL+:} false; then :
22203  $as_echo_n "(cached) " >&6
22204else
22205  case $OTOOL in
22206  [\\/]* | ?:[\\/]*)
22207  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22208  ;;
22209  *)
22210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22211for as_dir in $PATH
22212do
22213  IFS=$as_save_IFS
22214  test -z "$as_dir" && as_dir=.
22215    for ac_exec_ext in '' $ac_executable_extensions; do
22216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22217    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22219    break 2
22220  fi
22221done
22222  done
22223IFS=$as_save_IFS
22224
22225  ;;
22226esac
22227fi
22228OTOOL=$ac_cv_path_OTOOL
22229if test -n "$OTOOL"; then
22230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22231$as_echo "$OTOOL" >&6; }
22232else
22233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22234$as_echo "no" >&6; }
22235fi
22236
22237
22238          if test "x$OTOOL" = x; then
22239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22240          fi
22241        else
22242          # Otherwise we believe it is a complete path. Use it as it is.
22243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22244$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22246$as_echo_n "checking for OTOOL... " >&6; }
22247          if test ! -x "$tool_specified"; then
22248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22249$as_echo "not found" >&6; }
22250            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22251          fi
22252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22253$as_echo "$tool_specified" >&6; }
22254        fi
22255      fi
22256    fi
22257
22258  fi
22259
22260
22261  if test "x$OTOOL" = "x"; then
22262    OTOOL="true"
22263  fi
22264
22265
22266  # Publish this variable in the help.
22267
22268
22269  if [ -z "${READELF+x}" ]; then
22270    # The variable is not set by user, try to locate tool using the code snippet
22271    for ac_prog in greadelf readelf
22272do
22273  # Extract the first word of "$ac_prog", so it can be a program name with args.
22274set dummy $ac_prog; ac_word=$2
22275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22276$as_echo_n "checking for $ac_word... " >&6; }
22277if ${ac_cv_path_READELF+:} false; then :
22278  $as_echo_n "(cached) " >&6
22279else
22280  case $READELF in
22281  [\\/]* | ?:[\\/]*)
22282  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22283  ;;
22284  *)
22285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22286for as_dir in $PATH
22287do
22288  IFS=$as_save_IFS
22289  test -z "$as_dir" && as_dir=.
22290    for ac_exec_ext in '' $ac_executable_extensions; do
22291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22292    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22294    break 2
22295  fi
22296done
22297  done
22298IFS=$as_save_IFS
22299
22300  ;;
22301esac
22302fi
22303READELF=$ac_cv_path_READELF
22304if test -n "$READELF"; then
22305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22306$as_echo "$READELF" >&6; }
22307else
22308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22309$as_echo "no" >&6; }
22310fi
22311
22312
22313  test -n "$READELF" && break
22314done
22315
22316  else
22317    # The variable is set, but is it from the command line or the environment?
22318
22319    # Try to remove the string !READELF! from our list.
22320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22322      # If it failed, the variable was not from the command line. Ignore it,
22323      # but warn the user (except for BASH, which is always set by the calling BASH).
22324      if test "xREADELF" != xBASH; then
22325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22326$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22327      fi
22328      # Try to locate tool using the code snippet
22329      for ac_prog in greadelf readelf
22330do
22331  # Extract the first word of "$ac_prog", so it can be a program name with args.
22332set dummy $ac_prog; ac_word=$2
22333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22334$as_echo_n "checking for $ac_word... " >&6; }
22335if ${ac_cv_path_READELF+:} false; then :
22336  $as_echo_n "(cached) " >&6
22337else
22338  case $READELF in
22339  [\\/]* | ?:[\\/]*)
22340  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22341  ;;
22342  *)
22343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22344for as_dir in $PATH
22345do
22346  IFS=$as_save_IFS
22347  test -z "$as_dir" && as_dir=.
22348    for ac_exec_ext in '' $ac_executable_extensions; do
22349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22350    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22352    break 2
22353  fi
22354done
22355  done
22356IFS=$as_save_IFS
22357
22358  ;;
22359esac
22360fi
22361READELF=$ac_cv_path_READELF
22362if test -n "$READELF"; then
22363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22364$as_echo "$READELF" >&6; }
22365else
22366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22367$as_echo "no" >&6; }
22368fi
22369
22370
22371  test -n "$READELF" && break
22372done
22373
22374    else
22375      # If it succeeded, then it was overridden by the user. We will use it
22376      # for the tool.
22377
22378      # First remove it from the list of overridden variables, so we can test
22379      # for unknown variables in the end.
22380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22381
22382      # Check if we try to supply an empty value
22383      if test "x$READELF" = x; then
22384        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22385$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22387$as_echo_n "checking for READELF... " >&6; }
22388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22389$as_echo "disabled" >&6; }
22390      else
22391        # Check if the provided tool contains a complete path.
22392        tool_specified="$READELF"
22393        tool_basename="${tool_specified##*/}"
22394        if test "x$tool_basename" = "x$tool_specified"; then
22395          # A command without a complete path is provided, search $PATH.
22396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22397$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22398          # Extract the first word of "$tool_basename", so it can be a program name with args.
22399set dummy $tool_basename; ac_word=$2
22400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22401$as_echo_n "checking for $ac_word... " >&6; }
22402if ${ac_cv_path_READELF+:} false; then :
22403  $as_echo_n "(cached) " >&6
22404else
22405  case $READELF in
22406  [\\/]* | ?:[\\/]*)
22407  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22408  ;;
22409  *)
22410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22411for as_dir in $PATH
22412do
22413  IFS=$as_save_IFS
22414  test -z "$as_dir" && as_dir=.
22415    for ac_exec_ext in '' $ac_executable_extensions; do
22416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22417    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22419    break 2
22420  fi
22421done
22422  done
22423IFS=$as_save_IFS
22424
22425  ;;
22426esac
22427fi
22428READELF=$ac_cv_path_READELF
22429if test -n "$READELF"; then
22430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22431$as_echo "$READELF" >&6; }
22432else
22433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22434$as_echo "no" >&6; }
22435fi
22436
22437
22438          if test "x$READELF" = x; then
22439            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22440          fi
22441        else
22442          # Otherwise we believe it is a complete path. Use it as it is.
22443          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22444$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22445          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22446$as_echo_n "checking for READELF... " >&6; }
22447          if test ! -x "$tool_specified"; then
22448            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22449$as_echo "not found" >&6; }
22450            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22451          fi
22452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22453$as_echo "$tool_specified" >&6; }
22454        fi
22455      fi
22456    fi
22457
22458  fi
22459
22460
22461
22462
22463  # Publish this variable in the help.
22464
22465
22466  if [ -z "${DOT+x}" ]; then
22467    # The variable is not set by user, try to locate tool using the code snippet
22468    for ac_prog in dot
22469do
22470  # Extract the first word of "$ac_prog", so it can be a program name with args.
22471set dummy $ac_prog; ac_word=$2
22472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22473$as_echo_n "checking for $ac_word... " >&6; }
22474if ${ac_cv_path_DOT+:} false; then :
22475  $as_echo_n "(cached) " >&6
22476else
22477  case $DOT in
22478  [\\/]* | ?:[\\/]*)
22479  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22480  ;;
22481  *)
22482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22483for as_dir in $PATH
22484do
22485  IFS=$as_save_IFS
22486  test -z "$as_dir" && as_dir=.
22487    for ac_exec_ext in '' $ac_executable_extensions; do
22488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22489    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22491    break 2
22492  fi
22493done
22494  done
22495IFS=$as_save_IFS
22496
22497  ;;
22498esac
22499fi
22500DOT=$ac_cv_path_DOT
22501if test -n "$DOT"; then
22502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22503$as_echo "$DOT" >&6; }
22504else
22505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22506$as_echo "no" >&6; }
22507fi
22508
22509
22510  test -n "$DOT" && break
22511done
22512
22513  else
22514    # The variable is set, but is it from the command line or the environment?
22515
22516    # Try to remove the string !DOT! from our list.
22517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22519      # If it failed, the variable was not from the command line. Ignore it,
22520      # but warn the user (except for BASH, which is always set by the calling BASH).
22521      if test "xDOT" != xBASH; then
22522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22523$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22524      fi
22525      # Try to locate tool using the code snippet
22526      for ac_prog in dot
22527do
22528  # Extract the first word of "$ac_prog", so it can be a program name with args.
22529set dummy $ac_prog; ac_word=$2
22530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22531$as_echo_n "checking for $ac_word... " >&6; }
22532if ${ac_cv_path_DOT+:} false; then :
22533  $as_echo_n "(cached) " >&6
22534else
22535  case $DOT in
22536  [\\/]* | ?:[\\/]*)
22537  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22538  ;;
22539  *)
22540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22541for as_dir in $PATH
22542do
22543  IFS=$as_save_IFS
22544  test -z "$as_dir" && as_dir=.
22545    for ac_exec_ext in '' $ac_executable_extensions; do
22546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22547    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22549    break 2
22550  fi
22551done
22552  done
22553IFS=$as_save_IFS
22554
22555  ;;
22556esac
22557fi
22558DOT=$ac_cv_path_DOT
22559if test -n "$DOT"; then
22560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22561$as_echo "$DOT" >&6; }
22562else
22563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22564$as_echo "no" >&6; }
22565fi
22566
22567
22568  test -n "$DOT" && break
22569done
22570
22571    else
22572      # If it succeeded, then it was overridden by the user. We will use it
22573      # for the tool.
22574
22575      # First remove it from the list of overridden variables, so we can test
22576      # for unknown variables in the end.
22577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22578
22579      # Check if we try to supply an empty value
22580      if test "x$DOT" = x; then
22581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22582$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22584$as_echo_n "checking for DOT... " >&6; }
22585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22586$as_echo "disabled" >&6; }
22587      else
22588        # Check if the provided tool contains a complete path.
22589        tool_specified="$DOT"
22590        tool_basename="${tool_specified##*/}"
22591        if test "x$tool_basename" = "x$tool_specified"; then
22592          # A command without a complete path is provided, search $PATH.
22593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22594$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22595          # Extract the first word of "$tool_basename", so it can be a program name with args.
22596set dummy $tool_basename; ac_word=$2
22597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22598$as_echo_n "checking for $ac_word... " >&6; }
22599if ${ac_cv_path_DOT+:} false; then :
22600  $as_echo_n "(cached) " >&6
22601else
22602  case $DOT in
22603  [\\/]* | ?:[\\/]*)
22604  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22605  ;;
22606  *)
22607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22608for as_dir in $PATH
22609do
22610  IFS=$as_save_IFS
22611  test -z "$as_dir" && as_dir=.
22612    for ac_exec_ext in '' $ac_executable_extensions; do
22613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22614    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22616    break 2
22617  fi
22618done
22619  done
22620IFS=$as_save_IFS
22621
22622  ;;
22623esac
22624fi
22625DOT=$ac_cv_path_DOT
22626if test -n "$DOT"; then
22627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22628$as_echo "$DOT" >&6; }
22629else
22630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22631$as_echo "no" >&6; }
22632fi
22633
22634
22635          if test "x$DOT" = x; then
22636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22637          fi
22638        else
22639          # Otherwise we believe it is a complete path. Use it as it is.
22640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22641$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22643$as_echo_n "checking for DOT... " >&6; }
22644          if test ! -x "$tool_specified"; then
22645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22646$as_echo "not found" >&6; }
22647            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22648          fi
22649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22650$as_echo "$tool_specified" >&6; }
22651        fi
22652      fi
22653    fi
22654
22655  fi
22656
22657
22658
22659
22660  # Publish this variable in the help.
22661
22662
22663  if [ -z "${HG+x}" ]; then
22664    # The variable is not set by user, try to locate tool using the code snippet
22665    for ac_prog in hg
22666do
22667  # Extract the first word of "$ac_prog", so it can be a program name with args.
22668set dummy $ac_prog; ac_word=$2
22669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22670$as_echo_n "checking for $ac_word... " >&6; }
22671if ${ac_cv_path_HG+:} false; then :
22672  $as_echo_n "(cached) " >&6
22673else
22674  case $HG in
22675  [\\/]* | ?:[\\/]*)
22676  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22677  ;;
22678  *)
22679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22680for as_dir in $PATH
22681do
22682  IFS=$as_save_IFS
22683  test -z "$as_dir" && as_dir=.
22684    for ac_exec_ext in '' $ac_executable_extensions; do
22685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22686    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22688    break 2
22689  fi
22690done
22691  done
22692IFS=$as_save_IFS
22693
22694  ;;
22695esac
22696fi
22697HG=$ac_cv_path_HG
22698if test -n "$HG"; then
22699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22700$as_echo "$HG" >&6; }
22701else
22702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22703$as_echo "no" >&6; }
22704fi
22705
22706
22707  test -n "$HG" && break
22708done
22709
22710  else
22711    # The variable is set, but is it from the command line or the environment?
22712
22713    # Try to remove the string !HG! from our list.
22714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22716      # If it failed, the variable was not from the command line. Ignore it,
22717      # but warn the user (except for BASH, which is always set by the calling BASH).
22718      if test "xHG" != xBASH; then
22719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22720$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22721      fi
22722      # Try to locate tool using the code snippet
22723      for ac_prog in hg
22724do
22725  # Extract the first word of "$ac_prog", so it can be a program name with args.
22726set dummy $ac_prog; ac_word=$2
22727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22728$as_echo_n "checking for $ac_word... " >&6; }
22729if ${ac_cv_path_HG+:} false; then :
22730  $as_echo_n "(cached) " >&6
22731else
22732  case $HG in
22733  [\\/]* | ?:[\\/]*)
22734  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22735  ;;
22736  *)
22737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22738for as_dir in $PATH
22739do
22740  IFS=$as_save_IFS
22741  test -z "$as_dir" && as_dir=.
22742    for ac_exec_ext in '' $ac_executable_extensions; do
22743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22744    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22746    break 2
22747  fi
22748done
22749  done
22750IFS=$as_save_IFS
22751
22752  ;;
22753esac
22754fi
22755HG=$ac_cv_path_HG
22756if test -n "$HG"; then
22757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22758$as_echo "$HG" >&6; }
22759else
22760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22761$as_echo "no" >&6; }
22762fi
22763
22764
22765  test -n "$HG" && break
22766done
22767
22768    else
22769      # If it succeeded, then it was overridden by the user. We will use it
22770      # for the tool.
22771
22772      # First remove it from the list of overridden variables, so we can test
22773      # for unknown variables in the end.
22774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22775
22776      # Check if we try to supply an empty value
22777      if test "x$HG" = x; then
22778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22779$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22781$as_echo_n "checking for HG... " >&6; }
22782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22783$as_echo "disabled" >&6; }
22784      else
22785        # Check if the provided tool contains a complete path.
22786        tool_specified="$HG"
22787        tool_basename="${tool_specified##*/}"
22788        if test "x$tool_basename" = "x$tool_specified"; then
22789          # A command without a complete path is provided, search $PATH.
22790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22791$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22792          # Extract the first word of "$tool_basename", so it can be a program name with args.
22793set dummy $tool_basename; ac_word=$2
22794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22795$as_echo_n "checking for $ac_word... " >&6; }
22796if ${ac_cv_path_HG+:} false; then :
22797  $as_echo_n "(cached) " >&6
22798else
22799  case $HG in
22800  [\\/]* | ?:[\\/]*)
22801  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22802  ;;
22803  *)
22804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22805for as_dir in $PATH
22806do
22807  IFS=$as_save_IFS
22808  test -z "$as_dir" && as_dir=.
22809    for ac_exec_ext in '' $ac_executable_extensions; do
22810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22811    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22813    break 2
22814  fi
22815done
22816  done
22817IFS=$as_save_IFS
22818
22819  ;;
22820esac
22821fi
22822HG=$ac_cv_path_HG
22823if test -n "$HG"; then
22824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22825$as_echo "$HG" >&6; }
22826else
22827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22828$as_echo "no" >&6; }
22829fi
22830
22831
22832          if test "x$HG" = x; then
22833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22834          fi
22835        else
22836          # Otherwise we believe it is a complete path. Use it as it is.
22837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22838$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22840$as_echo_n "checking for HG... " >&6; }
22841          if test ! -x "$tool_specified"; then
22842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22843$as_echo "not found" >&6; }
22844            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22845          fi
22846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22847$as_echo "$tool_specified" >&6; }
22848        fi
22849      fi
22850    fi
22851
22852  fi
22853
22854
22855
22856
22857  # Publish this variable in the help.
22858
22859
22860  if [ -z "${STAT+x}" ]; then
22861    # The variable is not set by user, try to locate tool using the code snippet
22862    for ac_prog in stat
22863do
22864  # Extract the first word of "$ac_prog", so it can be a program name with args.
22865set dummy $ac_prog; ac_word=$2
22866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22867$as_echo_n "checking for $ac_word... " >&6; }
22868if ${ac_cv_path_STAT+:} false; then :
22869  $as_echo_n "(cached) " >&6
22870else
22871  case $STAT in
22872  [\\/]* | ?:[\\/]*)
22873  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22874  ;;
22875  *)
22876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22877for as_dir in $PATH
22878do
22879  IFS=$as_save_IFS
22880  test -z "$as_dir" && as_dir=.
22881    for ac_exec_ext in '' $ac_executable_extensions; do
22882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22883    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22885    break 2
22886  fi
22887done
22888  done
22889IFS=$as_save_IFS
22890
22891  ;;
22892esac
22893fi
22894STAT=$ac_cv_path_STAT
22895if test -n "$STAT"; then
22896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22897$as_echo "$STAT" >&6; }
22898else
22899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22900$as_echo "no" >&6; }
22901fi
22902
22903
22904  test -n "$STAT" && break
22905done
22906
22907  else
22908    # The variable is set, but is it from the command line or the environment?
22909
22910    # Try to remove the string !STAT! from our list.
22911    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22912    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22913      # If it failed, the variable was not from the command line. Ignore it,
22914      # but warn the user (except for BASH, which is always set by the calling BASH).
22915      if test "xSTAT" != xBASH; then
22916        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22917$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22918      fi
22919      # Try to locate tool using the code snippet
22920      for ac_prog in stat
22921do
22922  # Extract the first word of "$ac_prog", so it can be a program name with args.
22923set dummy $ac_prog; ac_word=$2
22924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22925$as_echo_n "checking for $ac_word... " >&6; }
22926if ${ac_cv_path_STAT+:} false; then :
22927  $as_echo_n "(cached) " >&6
22928else
22929  case $STAT in
22930  [\\/]* | ?:[\\/]*)
22931  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22932  ;;
22933  *)
22934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22935for as_dir in $PATH
22936do
22937  IFS=$as_save_IFS
22938  test -z "$as_dir" && as_dir=.
22939    for ac_exec_ext in '' $ac_executable_extensions; do
22940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22941    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22943    break 2
22944  fi
22945done
22946  done
22947IFS=$as_save_IFS
22948
22949  ;;
22950esac
22951fi
22952STAT=$ac_cv_path_STAT
22953if test -n "$STAT"; then
22954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22955$as_echo "$STAT" >&6; }
22956else
22957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22958$as_echo "no" >&6; }
22959fi
22960
22961
22962  test -n "$STAT" && break
22963done
22964
22965    else
22966      # If it succeeded, then it was overridden by the user. We will use it
22967      # for the tool.
22968
22969      # First remove it from the list of overridden variables, so we can test
22970      # for unknown variables in the end.
22971      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22972
22973      # Check if we try to supply an empty value
22974      if test "x$STAT" = x; then
22975        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22976$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22978$as_echo_n "checking for STAT... " >&6; }
22979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22980$as_echo "disabled" >&6; }
22981      else
22982        # Check if the provided tool contains a complete path.
22983        tool_specified="$STAT"
22984        tool_basename="${tool_specified##*/}"
22985        if test "x$tool_basename" = "x$tool_specified"; then
22986          # A command without a complete path is provided, search $PATH.
22987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22988$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22989          # Extract the first word of "$tool_basename", so it can be a program name with args.
22990set dummy $tool_basename; ac_word=$2
22991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22992$as_echo_n "checking for $ac_word... " >&6; }
22993if ${ac_cv_path_STAT+:} false; then :
22994  $as_echo_n "(cached) " >&6
22995else
22996  case $STAT in
22997  [\\/]* | ?:[\\/]*)
22998  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22999  ;;
23000  *)
23001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23002for as_dir in $PATH
23003do
23004  IFS=$as_save_IFS
23005  test -z "$as_dir" && as_dir=.
23006    for ac_exec_ext in '' $ac_executable_extensions; do
23007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23008    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23010    break 2
23011  fi
23012done
23013  done
23014IFS=$as_save_IFS
23015
23016  ;;
23017esac
23018fi
23019STAT=$ac_cv_path_STAT
23020if test -n "$STAT"; then
23021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23022$as_echo "$STAT" >&6; }
23023else
23024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23025$as_echo "no" >&6; }
23026fi
23027
23028
23029          if test "x$STAT" = x; then
23030            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23031          fi
23032        else
23033          # Otherwise we believe it is a complete path. Use it as it is.
23034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23035$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23036          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23037$as_echo_n "checking for STAT... " >&6; }
23038          if test ! -x "$tool_specified"; then
23039            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23040$as_echo "not found" >&6; }
23041            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23042          fi
23043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23044$as_echo "$tool_specified" >&6; }
23045        fi
23046      fi
23047    fi
23048
23049  fi
23050
23051
23052
23053
23054  # Publish this variable in the help.
23055
23056
23057  if [ -z "${TIME+x}" ]; then
23058    # The variable is not set by user, try to locate tool using the code snippet
23059    for ac_prog in time
23060do
23061  # Extract the first word of "$ac_prog", so it can be a program name with args.
23062set dummy $ac_prog; ac_word=$2
23063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23064$as_echo_n "checking for $ac_word... " >&6; }
23065if ${ac_cv_path_TIME+:} false; then :
23066  $as_echo_n "(cached) " >&6
23067else
23068  case $TIME in
23069  [\\/]* | ?:[\\/]*)
23070  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23071  ;;
23072  *)
23073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23074for as_dir in $PATH
23075do
23076  IFS=$as_save_IFS
23077  test -z "$as_dir" && as_dir=.
23078    for ac_exec_ext in '' $ac_executable_extensions; do
23079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23080    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23082    break 2
23083  fi
23084done
23085  done
23086IFS=$as_save_IFS
23087
23088  ;;
23089esac
23090fi
23091TIME=$ac_cv_path_TIME
23092if test -n "$TIME"; then
23093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23094$as_echo "$TIME" >&6; }
23095else
23096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23097$as_echo "no" >&6; }
23098fi
23099
23100
23101  test -n "$TIME" && break
23102done
23103
23104  else
23105    # The variable is set, but is it from the command line or the environment?
23106
23107    # Try to remove the string !TIME! from our list.
23108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23110      # If it failed, the variable was not from the command line. Ignore it,
23111      # but warn the user (except for BASH, which is always set by the calling BASH).
23112      if test "xTIME" != xBASH; then
23113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23114$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23115      fi
23116      # Try to locate tool using the code snippet
23117      for ac_prog in time
23118do
23119  # Extract the first word of "$ac_prog", so it can be a program name with args.
23120set dummy $ac_prog; ac_word=$2
23121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23122$as_echo_n "checking for $ac_word... " >&6; }
23123if ${ac_cv_path_TIME+:} false; then :
23124  $as_echo_n "(cached) " >&6
23125else
23126  case $TIME in
23127  [\\/]* | ?:[\\/]*)
23128  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23129  ;;
23130  *)
23131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23132for as_dir in $PATH
23133do
23134  IFS=$as_save_IFS
23135  test -z "$as_dir" && as_dir=.
23136    for ac_exec_ext in '' $ac_executable_extensions; do
23137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23138    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23140    break 2
23141  fi
23142done
23143  done
23144IFS=$as_save_IFS
23145
23146  ;;
23147esac
23148fi
23149TIME=$ac_cv_path_TIME
23150if test -n "$TIME"; then
23151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23152$as_echo "$TIME" >&6; }
23153else
23154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23155$as_echo "no" >&6; }
23156fi
23157
23158
23159  test -n "$TIME" && break
23160done
23161
23162    else
23163      # If it succeeded, then it was overridden by the user. We will use it
23164      # for the tool.
23165
23166      # First remove it from the list of overridden variables, so we can test
23167      # for unknown variables in the end.
23168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23169
23170      # Check if we try to supply an empty value
23171      if test "x$TIME" = x; then
23172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23173$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23175$as_echo_n "checking for TIME... " >&6; }
23176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23177$as_echo "disabled" >&6; }
23178      else
23179        # Check if the provided tool contains a complete path.
23180        tool_specified="$TIME"
23181        tool_basename="${tool_specified##*/}"
23182        if test "x$tool_basename" = "x$tool_specified"; then
23183          # A command without a complete path is provided, search $PATH.
23184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23185$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23186          # Extract the first word of "$tool_basename", so it can be a program name with args.
23187set dummy $tool_basename; ac_word=$2
23188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23189$as_echo_n "checking for $ac_word... " >&6; }
23190if ${ac_cv_path_TIME+:} false; then :
23191  $as_echo_n "(cached) " >&6
23192else
23193  case $TIME in
23194  [\\/]* | ?:[\\/]*)
23195  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23196  ;;
23197  *)
23198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23199for as_dir in $PATH
23200do
23201  IFS=$as_save_IFS
23202  test -z "$as_dir" && as_dir=.
23203    for ac_exec_ext in '' $ac_executable_extensions; do
23204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23205    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23207    break 2
23208  fi
23209done
23210  done
23211IFS=$as_save_IFS
23212
23213  ;;
23214esac
23215fi
23216TIME=$ac_cv_path_TIME
23217if test -n "$TIME"; then
23218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23219$as_echo "$TIME" >&6; }
23220else
23221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23222$as_echo "no" >&6; }
23223fi
23224
23225
23226          if test "x$TIME" = x; then
23227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23228          fi
23229        else
23230          # Otherwise we believe it is a complete path. Use it as it is.
23231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23232$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23234$as_echo_n "checking for TIME... " >&6; }
23235          if test ! -x "$tool_specified"; then
23236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23237$as_echo "not found" >&6; }
23238            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23239          fi
23240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23241$as_echo "$tool_specified" >&6; }
23242        fi
23243      fi
23244    fi
23245
23246  fi
23247
23248
23249  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23250  # be in the user path.
23251
23252
23253  # Publish this variable in the help.
23254
23255
23256  if [ -z "${DTRACE+x}" ]; then
23257    # The variable is not set by user, try to locate tool using the code snippet
23258    for ac_prog in dtrace
23259do
23260  # Extract the first word of "$ac_prog", so it can be a program name with args.
23261set dummy $ac_prog; ac_word=$2
23262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23263$as_echo_n "checking for $ac_word... " >&6; }
23264if ${ac_cv_path_DTRACE+:} false; then :
23265  $as_echo_n "(cached) " >&6
23266else
23267  case $DTRACE in
23268  [\\/]* | ?:[\\/]*)
23269  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23270  ;;
23271  *)
23272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23273as_dummy="$PATH:/usr/sbin"
23274for as_dir in $as_dummy
23275do
23276  IFS=$as_save_IFS
23277  test -z "$as_dir" && as_dir=.
23278    for ac_exec_ext in '' $ac_executable_extensions; do
23279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23280    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23282    break 2
23283  fi
23284done
23285  done
23286IFS=$as_save_IFS
23287
23288  ;;
23289esac
23290fi
23291DTRACE=$ac_cv_path_DTRACE
23292if test -n "$DTRACE"; then
23293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23294$as_echo "$DTRACE" >&6; }
23295else
23296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23297$as_echo "no" >&6; }
23298fi
23299
23300
23301  test -n "$DTRACE" && break
23302done
23303
23304  else
23305    # The variable is set, but is it from the command line or the environment?
23306
23307    # Try to remove the string !DTRACE! from our list.
23308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23310      # If it failed, the variable was not from the command line. Ignore it,
23311      # but warn the user (except for BASH, which is always set by the calling BASH).
23312      if test "xDTRACE" != xBASH; then
23313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23314$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23315      fi
23316      # Try to locate tool using the code snippet
23317      for ac_prog in dtrace
23318do
23319  # Extract the first word of "$ac_prog", so it can be a program name with args.
23320set dummy $ac_prog; ac_word=$2
23321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23322$as_echo_n "checking for $ac_word... " >&6; }
23323if ${ac_cv_path_DTRACE+:} false; then :
23324  $as_echo_n "(cached) " >&6
23325else
23326  case $DTRACE in
23327  [\\/]* | ?:[\\/]*)
23328  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23329  ;;
23330  *)
23331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23332as_dummy="$PATH:/usr/sbin"
23333for as_dir in $as_dummy
23334do
23335  IFS=$as_save_IFS
23336  test -z "$as_dir" && as_dir=.
23337    for ac_exec_ext in '' $ac_executable_extensions; do
23338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23339    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23341    break 2
23342  fi
23343done
23344  done
23345IFS=$as_save_IFS
23346
23347  ;;
23348esac
23349fi
23350DTRACE=$ac_cv_path_DTRACE
23351if test -n "$DTRACE"; then
23352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23353$as_echo "$DTRACE" >&6; }
23354else
23355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23356$as_echo "no" >&6; }
23357fi
23358
23359
23360  test -n "$DTRACE" && break
23361done
23362
23363    else
23364      # If it succeeded, then it was overridden by the user. We will use it
23365      # for the tool.
23366
23367      # First remove it from the list of overridden variables, so we can test
23368      # for unknown variables in the end.
23369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23370
23371      # Check if we try to supply an empty value
23372      if test "x$DTRACE" = x; then
23373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23374$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23376$as_echo_n "checking for DTRACE... " >&6; }
23377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23378$as_echo "disabled" >&6; }
23379      else
23380        # Check if the provided tool contains a complete path.
23381        tool_specified="$DTRACE"
23382        tool_basename="${tool_specified##*/}"
23383        if test "x$tool_basename" = "x$tool_specified"; then
23384          # A command without a complete path is provided, search $PATH.
23385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23386$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23387          # Extract the first word of "$tool_basename", so it can be a program name with args.
23388set dummy $tool_basename; ac_word=$2
23389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23390$as_echo_n "checking for $ac_word... " >&6; }
23391if ${ac_cv_path_DTRACE+:} false; then :
23392  $as_echo_n "(cached) " >&6
23393else
23394  case $DTRACE in
23395  [\\/]* | ?:[\\/]*)
23396  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23397  ;;
23398  *)
23399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23400for as_dir in $PATH
23401do
23402  IFS=$as_save_IFS
23403  test -z "$as_dir" && as_dir=.
23404    for ac_exec_ext in '' $ac_executable_extensions; do
23405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23406    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23408    break 2
23409  fi
23410done
23411  done
23412IFS=$as_save_IFS
23413
23414  ;;
23415esac
23416fi
23417DTRACE=$ac_cv_path_DTRACE
23418if test -n "$DTRACE"; then
23419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23420$as_echo "$DTRACE" >&6; }
23421else
23422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23423$as_echo "no" >&6; }
23424fi
23425
23426
23427          if test "x$DTRACE" = x; then
23428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23429          fi
23430        else
23431          # Otherwise we believe it is a complete path. Use it as it is.
23432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23433$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23435$as_echo_n "checking for DTRACE... " >&6; }
23436          if test ! -x "$tool_specified"; then
23437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23438$as_echo "not found" >&6; }
23439            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23440          fi
23441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23442$as_echo "$tool_specified" >&6; }
23443        fi
23444      fi
23445    fi
23446
23447  fi
23448
23449
23450
23451
23452  # Publish this variable in the help.
23453
23454
23455  if [ -z "${PATCH+x}" ]; then
23456    # The variable is not set by user, try to locate tool using the code snippet
23457    for ac_prog in gpatch patch
23458do
23459  # Extract the first word of "$ac_prog", so it can be a program name with args.
23460set dummy $ac_prog; ac_word=$2
23461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23462$as_echo_n "checking for $ac_word... " >&6; }
23463if ${ac_cv_path_PATCH+:} false; then :
23464  $as_echo_n "(cached) " >&6
23465else
23466  case $PATCH in
23467  [\\/]* | ?:[\\/]*)
23468  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23469  ;;
23470  *)
23471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23472for as_dir in $PATH
23473do
23474  IFS=$as_save_IFS
23475  test -z "$as_dir" && as_dir=.
23476    for ac_exec_ext in '' $ac_executable_extensions; do
23477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23478    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23480    break 2
23481  fi
23482done
23483  done
23484IFS=$as_save_IFS
23485
23486  ;;
23487esac
23488fi
23489PATCH=$ac_cv_path_PATCH
23490if test -n "$PATCH"; then
23491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23492$as_echo "$PATCH" >&6; }
23493else
23494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23495$as_echo "no" >&6; }
23496fi
23497
23498
23499  test -n "$PATCH" && break
23500done
23501
23502  else
23503    # The variable is set, but is it from the command line or the environment?
23504
23505    # Try to remove the string !PATCH! from our list.
23506    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23507    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23508      # If it failed, the variable was not from the command line. Ignore it,
23509      # but warn the user (except for BASH, which is always set by the calling BASH).
23510      if test "xPATCH" != xBASH; then
23511        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23512$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23513      fi
23514      # Try to locate tool using the code snippet
23515      for ac_prog in gpatch patch
23516do
23517  # Extract the first word of "$ac_prog", so it can be a program name with args.
23518set dummy $ac_prog; ac_word=$2
23519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23520$as_echo_n "checking for $ac_word... " >&6; }
23521if ${ac_cv_path_PATCH+:} false; then :
23522  $as_echo_n "(cached) " >&6
23523else
23524  case $PATCH in
23525  [\\/]* | ?:[\\/]*)
23526  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23527  ;;
23528  *)
23529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23530for as_dir in $PATH
23531do
23532  IFS=$as_save_IFS
23533  test -z "$as_dir" && as_dir=.
23534    for ac_exec_ext in '' $ac_executable_extensions; do
23535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23536    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23538    break 2
23539  fi
23540done
23541  done
23542IFS=$as_save_IFS
23543
23544  ;;
23545esac
23546fi
23547PATCH=$ac_cv_path_PATCH
23548if test -n "$PATCH"; then
23549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23550$as_echo "$PATCH" >&6; }
23551else
23552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23553$as_echo "no" >&6; }
23554fi
23555
23556
23557  test -n "$PATCH" && break
23558done
23559
23560    else
23561      # If it succeeded, then it was overridden by the user. We will use it
23562      # for the tool.
23563
23564      # First remove it from the list of overridden variables, so we can test
23565      # for unknown variables in the end.
23566      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23567
23568      # Check if we try to supply an empty value
23569      if test "x$PATCH" = x; then
23570        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23571$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23573$as_echo_n "checking for PATCH... " >&6; }
23574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23575$as_echo "disabled" >&6; }
23576      else
23577        # Check if the provided tool contains a complete path.
23578        tool_specified="$PATCH"
23579        tool_basename="${tool_specified##*/}"
23580        if test "x$tool_basename" = "x$tool_specified"; then
23581          # A command without a complete path is provided, search $PATH.
23582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23583$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23584          # Extract the first word of "$tool_basename", so it can be a program name with args.
23585set dummy $tool_basename; ac_word=$2
23586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23587$as_echo_n "checking for $ac_word... " >&6; }
23588if ${ac_cv_path_PATCH+:} false; then :
23589  $as_echo_n "(cached) " >&6
23590else
23591  case $PATCH in
23592  [\\/]* | ?:[\\/]*)
23593  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23594  ;;
23595  *)
23596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23597for as_dir in $PATH
23598do
23599  IFS=$as_save_IFS
23600  test -z "$as_dir" && as_dir=.
23601    for ac_exec_ext in '' $ac_executable_extensions; do
23602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23603    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23605    break 2
23606  fi
23607done
23608  done
23609IFS=$as_save_IFS
23610
23611  ;;
23612esac
23613fi
23614PATCH=$ac_cv_path_PATCH
23615if test -n "$PATCH"; then
23616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23617$as_echo "$PATCH" >&6; }
23618else
23619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23620$as_echo "no" >&6; }
23621fi
23622
23623
23624          if test "x$PATCH" = x; then
23625            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23626          fi
23627        else
23628          # Otherwise we believe it is a complete path. Use it as it is.
23629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23630$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23631          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23632$as_echo_n "checking for PATCH... " >&6; }
23633          if test ! -x "$tool_specified"; then
23634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23635$as_echo "not found" >&6; }
23636            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23637          fi
23638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23639$as_echo "$tool_specified" >&6; }
23640        fi
23641      fi
23642    fi
23643
23644  fi
23645
23646
23647  # Check if it's GNU time
23648  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23649  if test "x$IS_GNU_TIME" != x; then
23650    IS_GNU_TIME=yes
23651  else
23652    IS_GNU_TIME=no
23653  fi
23654
23655
23656  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23657
23658
23659
23660  # Publish this variable in the help.
23661
23662
23663  if [ -z "${DSYMUTIL+x}" ]; then
23664    # The variable is not set by user, try to locate tool using the code snippet
23665    for ac_prog in dsymutil
23666do
23667  # Extract the first word of "$ac_prog", so it can be a program name with args.
23668set dummy $ac_prog; ac_word=$2
23669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23670$as_echo_n "checking for $ac_word... " >&6; }
23671if ${ac_cv_path_DSYMUTIL+:} false; then :
23672  $as_echo_n "(cached) " >&6
23673else
23674  case $DSYMUTIL in
23675  [\\/]* | ?:[\\/]*)
23676  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23677  ;;
23678  *)
23679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23680for as_dir in $PATH
23681do
23682  IFS=$as_save_IFS
23683  test -z "$as_dir" && as_dir=.
23684    for ac_exec_ext in '' $ac_executable_extensions; do
23685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23686    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23688    break 2
23689  fi
23690done
23691  done
23692IFS=$as_save_IFS
23693
23694  ;;
23695esac
23696fi
23697DSYMUTIL=$ac_cv_path_DSYMUTIL
23698if test -n "$DSYMUTIL"; then
23699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23700$as_echo "$DSYMUTIL" >&6; }
23701else
23702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23703$as_echo "no" >&6; }
23704fi
23705
23706
23707  test -n "$DSYMUTIL" && break
23708done
23709
23710  else
23711    # The variable is set, but is it from the command line or the environment?
23712
23713    # Try to remove the string !DSYMUTIL! from our list.
23714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23716      # If it failed, the variable was not from the command line. Ignore it,
23717      # but warn the user (except for BASH, which is always set by the calling BASH).
23718      if test "xDSYMUTIL" != xBASH; then
23719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23720$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23721      fi
23722      # Try to locate tool using the code snippet
23723      for ac_prog in dsymutil
23724do
23725  # Extract the first word of "$ac_prog", so it can be a program name with args.
23726set dummy $ac_prog; ac_word=$2
23727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23728$as_echo_n "checking for $ac_word... " >&6; }
23729if ${ac_cv_path_DSYMUTIL+:} false; then :
23730  $as_echo_n "(cached) " >&6
23731else
23732  case $DSYMUTIL in
23733  [\\/]* | ?:[\\/]*)
23734  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23735  ;;
23736  *)
23737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23738for as_dir in $PATH
23739do
23740  IFS=$as_save_IFS
23741  test -z "$as_dir" && as_dir=.
23742    for ac_exec_ext in '' $ac_executable_extensions; do
23743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23744    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23746    break 2
23747  fi
23748done
23749  done
23750IFS=$as_save_IFS
23751
23752  ;;
23753esac
23754fi
23755DSYMUTIL=$ac_cv_path_DSYMUTIL
23756if test -n "$DSYMUTIL"; then
23757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23758$as_echo "$DSYMUTIL" >&6; }
23759else
23760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23761$as_echo "no" >&6; }
23762fi
23763
23764
23765  test -n "$DSYMUTIL" && break
23766done
23767
23768    else
23769      # If it succeeded, then it was overridden by the user. We will use it
23770      # for the tool.
23771
23772      # First remove it from the list of overridden variables, so we can test
23773      # for unknown variables in the end.
23774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23775
23776      # Check if we try to supply an empty value
23777      if test "x$DSYMUTIL" = x; then
23778        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23779$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23780        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23781$as_echo_n "checking for DSYMUTIL... " >&6; }
23782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23783$as_echo "disabled" >&6; }
23784      else
23785        # Check if the provided tool contains a complete path.
23786        tool_specified="$DSYMUTIL"
23787        tool_basename="${tool_specified##*/}"
23788        if test "x$tool_basename" = "x$tool_specified"; then
23789          # A command without a complete path is provided, search $PATH.
23790          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23791$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23792          # Extract the first word of "$tool_basename", so it can be a program name with args.
23793set dummy $tool_basename; ac_word=$2
23794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23795$as_echo_n "checking for $ac_word... " >&6; }
23796if ${ac_cv_path_DSYMUTIL+:} false; then :
23797  $as_echo_n "(cached) " >&6
23798else
23799  case $DSYMUTIL in
23800  [\\/]* | ?:[\\/]*)
23801  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23802  ;;
23803  *)
23804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23805for as_dir in $PATH
23806do
23807  IFS=$as_save_IFS
23808  test -z "$as_dir" && as_dir=.
23809    for ac_exec_ext in '' $ac_executable_extensions; do
23810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23811    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23813    break 2
23814  fi
23815done
23816  done
23817IFS=$as_save_IFS
23818
23819  ;;
23820esac
23821fi
23822DSYMUTIL=$ac_cv_path_DSYMUTIL
23823if test -n "$DSYMUTIL"; then
23824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23825$as_echo "$DSYMUTIL" >&6; }
23826else
23827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23828$as_echo "no" >&6; }
23829fi
23830
23831
23832          if test "x$DSYMUTIL" = x; then
23833            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23834          fi
23835        else
23836          # Otherwise we believe it is a complete path. Use it as it is.
23837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23838$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23839          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23840$as_echo_n "checking for DSYMUTIL... " >&6; }
23841          if test ! -x "$tool_specified"; then
23842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23843$as_echo "not found" >&6; }
23844            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23845          fi
23846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23847$as_echo "$tool_specified" >&6; }
23848        fi
23849      fi
23850    fi
23851
23852  fi
23853
23854
23855
23856  if test "x$DSYMUTIL" = x; then
23857    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23858  fi
23859
23860
23861
23862
23863
23864  # Publish this variable in the help.
23865
23866
23867  if [ -z "${XATTR+x}" ]; then
23868    # The variable is not set by user, try to locate tool using the code snippet
23869    for ac_prog in xattr
23870do
23871  # Extract the first word of "$ac_prog", so it can be a program name with args.
23872set dummy $ac_prog; ac_word=$2
23873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23874$as_echo_n "checking for $ac_word... " >&6; }
23875if ${ac_cv_path_XATTR+:} false; then :
23876  $as_echo_n "(cached) " >&6
23877else
23878  case $XATTR in
23879  [\\/]* | ?:[\\/]*)
23880  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23881  ;;
23882  *)
23883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23884for as_dir in $PATH
23885do
23886  IFS=$as_save_IFS
23887  test -z "$as_dir" && as_dir=.
23888    for ac_exec_ext in '' $ac_executable_extensions; do
23889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23890    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23892    break 2
23893  fi
23894done
23895  done
23896IFS=$as_save_IFS
23897
23898  ;;
23899esac
23900fi
23901XATTR=$ac_cv_path_XATTR
23902if test -n "$XATTR"; then
23903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23904$as_echo "$XATTR" >&6; }
23905else
23906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23907$as_echo "no" >&6; }
23908fi
23909
23910
23911  test -n "$XATTR" && break
23912done
23913
23914  else
23915    # The variable is set, but is it from the command line or the environment?
23916
23917    # Try to remove the string !XATTR! from our list.
23918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23920      # If it failed, the variable was not from the command line. Ignore it,
23921      # but warn the user (except for BASH, which is always set by the calling BASH).
23922      if test "xXATTR" != xBASH; then
23923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23924$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23925      fi
23926      # Try to locate tool using the code snippet
23927      for ac_prog in xattr
23928do
23929  # Extract the first word of "$ac_prog", so it can be a program name with args.
23930set dummy $ac_prog; ac_word=$2
23931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23932$as_echo_n "checking for $ac_word... " >&6; }
23933if ${ac_cv_path_XATTR+:} false; then :
23934  $as_echo_n "(cached) " >&6
23935else
23936  case $XATTR in
23937  [\\/]* | ?:[\\/]*)
23938  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23939  ;;
23940  *)
23941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23942for as_dir in $PATH
23943do
23944  IFS=$as_save_IFS
23945  test -z "$as_dir" && as_dir=.
23946    for ac_exec_ext in '' $ac_executable_extensions; do
23947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23948    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23950    break 2
23951  fi
23952done
23953  done
23954IFS=$as_save_IFS
23955
23956  ;;
23957esac
23958fi
23959XATTR=$ac_cv_path_XATTR
23960if test -n "$XATTR"; then
23961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23962$as_echo "$XATTR" >&6; }
23963else
23964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23965$as_echo "no" >&6; }
23966fi
23967
23968
23969  test -n "$XATTR" && break
23970done
23971
23972    else
23973      # If it succeeded, then it was overridden by the user. We will use it
23974      # for the tool.
23975
23976      # First remove it from the list of overridden variables, so we can test
23977      # for unknown variables in the end.
23978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23979
23980      # Check if we try to supply an empty value
23981      if test "x$XATTR" = x; then
23982        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23983$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23984        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23985$as_echo_n "checking for XATTR... " >&6; }
23986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23987$as_echo "disabled" >&6; }
23988      else
23989        # Check if the provided tool contains a complete path.
23990        tool_specified="$XATTR"
23991        tool_basename="${tool_specified##*/}"
23992        if test "x$tool_basename" = "x$tool_specified"; then
23993          # A command without a complete path is provided, search $PATH.
23994          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23995$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23996          # Extract the first word of "$tool_basename", so it can be a program name with args.
23997set dummy $tool_basename; ac_word=$2
23998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23999$as_echo_n "checking for $ac_word... " >&6; }
24000if ${ac_cv_path_XATTR+:} false; then :
24001  $as_echo_n "(cached) " >&6
24002else
24003  case $XATTR in
24004  [\\/]* | ?:[\\/]*)
24005  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24006  ;;
24007  *)
24008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24009for as_dir in $PATH
24010do
24011  IFS=$as_save_IFS
24012  test -z "$as_dir" && as_dir=.
24013    for ac_exec_ext in '' $ac_executable_extensions; do
24014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24015    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24017    break 2
24018  fi
24019done
24020  done
24021IFS=$as_save_IFS
24022
24023  ;;
24024esac
24025fi
24026XATTR=$ac_cv_path_XATTR
24027if test -n "$XATTR"; then
24028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24029$as_echo "$XATTR" >&6; }
24030else
24031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24032$as_echo "no" >&6; }
24033fi
24034
24035
24036          if test "x$XATTR" = x; then
24037            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24038          fi
24039        else
24040          # Otherwise we believe it is a complete path. Use it as it is.
24041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24042$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24043          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24044$as_echo_n "checking for XATTR... " >&6; }
24045          if test ! -x "$tool_specified"; then
24046            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24047$as_echo "not found" >&6; }
24048            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24049          fi
24050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24051$as_echo "$tool_specified" >&6; }
24052        fi
24053      fi
24054    fi
24055
24056  fi
24057
24058
24059
24060  if test "x$XATTR" = x; then
24061    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24062  fi
24063
24064
24065
24066
24067  # Publish this variable in the help.
24068
24069
24070  if [ -z "${CODESIGN+x}" ]; then
24071    # The variable is not set by user, try to locate tool using the code snippet
24072    for ac_prog in codesign
24073do
24074  # Extract the first word of "$ac_prog", so it can be a program name with args.
24075set dummy $ac_prog; ac_word=$2
24076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24077$as_echo_n "checking for $ac_word... " >&6; }
24078if ${ac_cv_path_CODESIGN+:} false; then :
24079  $as_echo_n "(cached) " >&6
24080else
24081  case $CODESIGN in
24082  [\\/]* | ?:[\\/]*)
24083  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24084  ;;
24085  *)
24086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24087for as_dir in $PATH
24088do
24089  IFS=$as_save_IFS
24090  test -z "$as_dir" && as_dir=.
24091    for ac_exec_ext in '' $ac_executable_extensions; do
24092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24093    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24095    break 2
24096  fi
24097done
24098  done
24099IFS=$as_save_IFS
24100
24101  ;;
24102esac
24103fi
24104CODESIGN=$ac_cv_path_CODESIGN
24105if test -n "$CODESIGN"; then
24106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24107$as_echo "$CODESIGN" >&6; }
24108else
24109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24110$as_echo "no" >&6; }
24111fi
24112
24113
24114  test -n "$CODESIGN" && break
24115done
24116
24117  else
24118    # The variable is set, but is it from the command line or the environment?
24119
24120    # Try to remove the string !CODESIGN! from our list.
24121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24123      # If it failed, the variable was not from the command line. Ignore it,
24124      # but warn the user (except for BASH, which is always set by the calling BASH).
24125      if test "xCODESIGN" != xBASH; then
24126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24127$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24128      fi
24129      # Try to locate tool using the code snippet
24130      for ac_prog in codesign
24131do
24132  # Extract the first word of "$ac_prog", so it can be a program name with args.
24133set dummy $ac_prog; ac_word=$2
24134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24135$as_echo_n "checking for $ac_word... " >&6; }
24136if ${ac_cv_path_CODESIGN+:} false; then :
24137  $as_echo_n "(cached) " >&6
24138else
24139  case $CODESIGN in
24140  [\\/]* | ?:[\\/]*)
24141  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24142  ;;
24143  *)
24144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24145for as_dir in $PATH
24146do
24147  IFS=$as_save_IFS
24148  test -z "$as_dir" && as_dir=.
24149    for ac_exec_ext in '' $ac_executable_extensions; do
24150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24151    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24153    break 2
24154  fi
24155done
24156  done
24157IFS=$as_save_IFS
24158
24159  ;;
24160esac
24161fi
24162CODESIGN=$ac_cv_path_CODESIGN
24163if test -n "$CODESIGN"; then
24164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24165$as_echo "$CODESIGN" >&6; }
24166else
24167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24168$as_echo "no" >&6; }
24169fi
24170
24171
24172  test -n "$CODESIGN" && break
24173done
24174
24175    else
24176      # If it succeeded, then it was overridden by the user. We will use it
24177      # for the tool.
24178
24179      # First remove it from the list of overridden variables, so we can test
24180      # for unknown variables in the end.
24181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24182
24183      # Check if we try to supply an empty value
24184      if test "x$CODESIGN" = x; then
24185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24186$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24188$as_echo_n "checking for CODESIGN... " >&6; }
24189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24190$as_echo "disabled" >&6; }
24191      else
24192        # Check if the provided tool contains a complete path.
24193        tool_specified="$CODESIGN"
24194        tool_basename="${tool_specified##*/}"
24195        if test "x$tool_basename" = "x$tool_specified"; then
24196          # A command without a complete path is provided, search $PATH.
24197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24198$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24199          # Extract the first word of "$tool_basename", so it can be a program name with args.
24200set dummy $tool_basename; ac_word=$2
24201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24202$as_echo_n "checking for $ac_word... " >&6; }
24203if ${ac_cv_path_CODESIGN+:} false; then :
24204  $as_echo_n "(cached) " >&6
24205else
24206  case $CODESIGN in
24207  [\\/]* | ?:[\\/]*)
24208  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24209  ;;
24210  *)
24211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24212for as_dir in $PATH
24213do
24214  IFS=$as_save_IFS
24215  test -z "$as_dir" && as_dir=.
24216    for ac_exec_ext in '' $ac_executable_extensions; do
24217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24218    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24220    break 2
24221  fi
24222done
24223  done
24224IFS=$as_save_IFS
24225
24226  ;;
24227esac
24228fi
24229CODESIGN=$ac_cv_path_CODESIGN
24230if test -n "$CODESIGN"; then
24231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24232$as_echo "$CODESIGN" >&6; }
24233else
24234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24235$as_echo "no" >&6; }
24236fi
24237
24238
24239          if test "x$CODESIGN" = x; then
24240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24241          fi
24242        else
24243          # Otherwise we believe it is a complete path. Use it as it is.
24244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24245$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24247$as_echo_n "checking for CODESIGN... " >&6; }
24248          if test ! -x "$tool_specified"; then
24249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24250$as_echo "not found" >&6; }
24251            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24252          fi
24253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24254$as_echo "$tool_specified" >&6; }
24255        fi
24256      fi
24257    fi
24258
24259  fi
24260
24261
24262    if test "x$CODESIGN" != "x"; then
24263      # Verify that the openjdk_codesign certificate is present
24264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24265$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24266      $RM codesign-testfile
24267      $TOUCH codesign-testfile
24268      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24269      $RM codesign-testfile
24270      if test "x$CODESIGN" = x; then
24271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24272$as_echo "no" >&6; }
24273      else
24274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24275$as_echo "yes" >&6; }
24276      fi
24277    fi
24278
24279
24280
24281  # Publish this variable in the help.
24282
24283
24284  if [ -z "${SETFILE+x}" ]; then
24285    # The variable is not set by user, try to locate tool using the code snippet
24286    for ac_prog in SetFile
24287do
24288  # Extract the first word of "$ac_prog", so it can be a program name with args.
24289set dummy $ac_prog; ac_word=$2
24290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24291$as_echo_n "checking for $ac_word... " >&6; }
24292if ${ac_cv_path_SETFILE+:} false; then :
24293  $as_echo_n "(cached) " >&6
24294else
24295  case $SETFILE in
24296  [\\/]* | ?:[\\/]*)
24297  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24298  ;;
24299  *)
24300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24301for as_dir in $PATH
24302do
24303  IFS=$as_save_IFS
24304  test -z "$as_dir" && as_dir=.
24305    for ac_exec_ext in '' $ac_executable_extensions; do
24306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24307    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24309    break 2
24310  fi
24311done
24312  done
24313IFS=$as_save_IFS
24314
24315  ;;
24316esac
24317fi
24318SETFILE=$ac_cv_path_SETFILE
24319if test -n "$SETFILE"; then
24320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24321$as_echo "$SETFILE" >&6; }
24322else
24323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24324$as_echo "no" >&6; }
24325fi
24326
24327
24328  test -n "$SETFILE" && break
24329done
24330
24331  else
24332    # The variable is set, but is it from the command line or the environment?
24333
24334    # Try to remove the string !SETFILE! from our list.
24335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24337      # If it failed, the variable was not from the command line. Ignore it,
24338      # but warn the user (except for BASH, which is always set by the calling BASH).
24339      if test "xSETFILE" != xBASH; then
24340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24341$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24342      fi
24343      # Try to locate tool using the code snippet
24344      for ac_prog in SetFile
24345do
24346  # Extract the first word of "$ac_prog", so it can be a program name with args.
24347set dummy $ac_prog; ac_word=$2
24348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24349$as_echo_n "checking for $ac_word... " >&6; }
24350if ${ac_cv_path_SETFILE+:} false; then :
24351  $as_echo_n "(cached) " >&6
24352else
24353  case $SETFILE in
24354  [\\/]* | ?:[\\/]*)
24355  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24356  ;;
24357  *)
24358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24359for as_dir in $PATH
24360do
24361  IFS=$as_save_IFS
24362  test -z "$as_dir" && as_dir=.
24363    for ac_exec_ext in '' $ac_executable_extensions; do
24364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24365    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24367    break 2
24368  fi
24369done
24370  done
24371IFS=$as_save_IFS
24372
24373  ;;
24374esac
24375fi
24376SETFILE=$ac_cv_path_SETFILE
24377if test -n "$SETFILE"; then
24378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24379$as_echo "$SETFILE" >&6; }
24380else
24381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24382$as_echo "no" >&6; }
24383fi
24384
24385
24386  test -n "$SETFILE" && break
24387done
24388
24389    else
24390      # If it succeeded, then it was overridden by the user. We will use it
24391      # for the tool.
24392
24393      # First remove it from the list of overridden variables, so we can test
24394      # for unknown variables in the end.
24395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24396
24397      # Check if we try to supply an empty value
24398      if test "x$SETFILE" = x; then
24399        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24400$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24402$as_echo_n "checking for SETFILE... " >&6; }
24403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24404$as_echo "disabled" >&6; }
24405      else
24406        # Check if the provided tool contains a complete path.
24407        tool_specified="$SETFILE"
24408        tool_basename="${tool_specified##*/}"
24409        if test "x$tool_basename" = "x$tool_specified"; then
24410          # A command without a complete path is provided, search $PATH.
24411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24412$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24413          # Extract the first word of "$tool_basename", so it can be a program name with args.
24414set dummy $tool_basename; ac_word=$2
24415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24416$as_echo_n "checking for $ac_word... " >&6; }
24417if ${ac_cv_path_SETFILE+:} false; then :
24418  $as_echo_n "(cached) " >&6
24419else
24420  case $SETFILE in
24421  [\\/]* | ?:[\\/]*)
24422  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24423  ;;
24424  *)
24425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24426for as_dir in $PATH
24427do
24428  IFS=$as_save_IFS
24429  test -z "$as_dir" && as_dir=.
24430    for ac_exec_ext in '' $ac_executable_extensions; do
24431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24432    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24434    break 2
24435  fi
24436done
24437  done
24438IFS=$as_save_IFS
24439
24440  ;;
24441esac
24442fi
24443SETFILE=$ac_cv_path_SETFILE
24444if test -n "$SETFILE"; then
24445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24446$as_echo "$SETFILE" >&6; }
24447else
24448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24449$as_echo "no" >&6; }
24450fi
24451
24452
24453          if test "x$SETFILE" = x; then
24454            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24455          fi
24456        else
24457          # Otherwise we believe it is a complete path. Use it as it is.
24458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24459$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24460          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24461$as_echo_n "checking for SETFILE... " >&6; }
24462          if test ! -x "$tool_specified"; then
24463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24464$as_echo "not found" >&6; }
24465            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24466          fi
24467          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24468$as_echo "$tool_specified" >&6; }
24469        fi
24470      fi
24471    fi
24472
24473  fi
24474
24475
24476
24477  if test "x$SETFILE" = x; then
24478    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24479  fi
24480
24481
24482  fi
24483
24484
24485  # Check bash version
24486  # Extra [ ] to stop m4 mangling
24487   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24489$as_echo_n "checking bash version... " >&6; }
24490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24491$as_echo "$BASH_VER" >&6; }
24492
24493  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24494  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24495  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24496    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24497  fi
24498
24499  # Test if bash supports pipefail.
24500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24501$as_echo_n "checking if bash supports pipefail... " >&6; }
24502  if ${BASH} -c 'set -o pipefail'; then
24503    BASH_ARGS="$BASH_ARGS -o pipefail"
24504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24505$as_echo "yes" >&6; }
24506  else
24507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24508$as_echo "no" >&6; }
24509  fi
24510
24511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24512$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24513  if ${BASH} -e -c 'true'; then
24514    BASH_ARGS="$BASH_ARGS -e"
24515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24516$as_echo "yes" >&6; }
24517  else
24518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24519$as_echo "no" >&6; }
24520  fi
24521
24522
24523
24524
24525# Check if pkg-config is available.
24526
24527
24528if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24529	if test -n "$ac_tool_prefix"; then
24530  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24531set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24533$as_echo_n "checking for $ac_word... " >&6; }
24534if ${ac_cv_path_PKG_CONFIG+:} false; then :
24535  $as_echo_n "(cached) " >&6
24536else
24537  case $PKG_CONFIG in
24538  [\\/]* | ?:[\\/]*)
24539  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24540  ;;
24541  *)
24542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24543for as_dir in $PATH
24544do
24545  IFS=$as_save_IFS
24546  test -z "$as_dir" && as_dir=.
24547    for ac_exec_ext in '' $ac_executable_extensions; do
24548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24549    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24551    break 2
24552  fi
24553done
24554  done
24555IFS=$as_save_IFS
24556
24557  ;;
24558esac
24559fi
24560PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24561if test -n "$PKG_CONFIG"; then
24562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24563$as_echo "$PKG_CONFIG" >&6; }
24564else
24565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24566$as_echo "no" >&6; }
24567fi
24568
24569
24570fi
24571if test -z "$ac_cv_path_PKG_CONFIG"; then
24572  ac_pt_PKG_CONFIG=$PKG_CONFIG
24573  # Extract the first word of "pkg-config", so it can be a program name with args.
24574set dummy pkg-config; ac_word=$2
24575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24576$as_echo_n "checking for $ac_word... " >&6; }
24577if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24578  $as_echo_n "(cached) " >&6
24579else
24580  case $ac_pt_PKG_CONFIG in
24581  [\\/]* | ?:[\\/]*)
24582  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24583  ;;
24584  *)
24585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24586for as_dir in $PATH
24587do
24588  IFS=$as_save_IFS
24589  test -z "$as_dir" && as_dir=.
24590    for ac_exec_ext in '' $ac_executable_extensions; do
24591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24592    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24594    break 2
24595  fi
24596done
24597  done
24598IFS=$as_save_IFS
24599
24600  ;;
24601esac
24602fi
24603ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24604if test -n "$ac_pt_PKG_CONFIG"; then
24605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24606$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24607else
24608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24609$as_echo "no" >&6; }
24610fi
24611
24612  if test "x$ac_pt_PKG_CONFIG" = x; then
24613    PKG_CONFIG=""
24614  else
24615    case $cross_compiling:$ac_tool_warned in
24616yes:)
24617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24619ac_tool_warned=yes ;;
24620esac
24621    PKG_CONFIG=$ac_pt_PKG_CONFIG
24622  fi
24623else
24624  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24625fi
24626
24627fi
24628if test -n "$PKG_CONFIG"; then
24629	_pkg_min_version=0.9.0
24630	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24631$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24632	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24633		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24634$as_echo "yes" >&6; }
24635	else
24636		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24637$as_echo "no" >&6; }
24638		PKG_CONFIG=""
24639	fi
24640
24641fi
24642
24643# After basic tools have been setup, we can check build os specific details.
24644
24645  ###############################################################################
24646
24647  # Note that this is the build platform OS version!
24648
24649  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24650  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24651  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24652  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24653
24654
24655
24656
24657
24658# Misc basic settings
24659
24660
24661# Check whether --with-default-make-target was given.
24662if test "${with_default_make_target+set}" = set; then :
24663  withval=$with_default_make_target;
24664fi
24665
24666  if test "x$with_default_make_target" = "x" \
24667      || test "x$with_default_make_target" = "xyes"; then
24668    DEFAULT_MAKE_TARGET="exploded-image"
24669  elif test "x$with_default_make_target" = "xno"; then
24670    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24671  else
24672    DEFAULT_MAKE_TARGET="$with_default_make_target"
24673  fi
24674
24675
24676
24677
24678###############################################################################
24679#
24680# Determine OpenJDK variants, options and version numbers.
24681#
24682###############################################################################
24683
24684# We need build & target for this.
24685
24686  # Should we build a JDK without a graphical UI?
24687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24688$as_echo_n "checking headless only... " >&6; }
24689  # Check whether --enable-headless-only was given.
24690if test "${enable_headless_only+set}" = set; then :
24691  enableval=$enable_headless_only;
24692fi
24693
24694
24695  if test "x$enable_headless_only" = "xyes"; then
24696    ENABLE_HEADLESS_ONLY="true"
24697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24698$as_echo "yes" >&6; }
24699  elif test "x$enable_headless_only" = "xno"; then
24700    ENABLE_HEADLESS_ONLY="false"
24701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24702$as_echo "no" >&6; }
24703  elif test "x$enable_headless_only" = "x"; then
24704    ENABLE_HEADLESS_ONLY="false"
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24706$as_echo "no" >&6; }
24707  else
24708    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24709  fi
24710
24711
24712
24713  # Should we build the complete docs, or just a lightweight version?
24714  # Check whether --enable-full-docs was given.
24715if test "${enable_full_docs+set}" = set; then :
24716  enableval=$enable_full_docs;
24717fi
24718
24719
24720  # Verify dependencies
24721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24722$as_echo_n "checking for graphviz dot... " >&6; }
24723  if test "x$DOT" != "x"; then
24724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24725$as_echo "yes" >&6; }
24726  else
24727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24728$as_echo "no, cannot generate full docs" >&6; }
24729    FULL_DOCS_DEP_MISSING=true
24730  fi
24731
24732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24733$as_echo_n "checking full docs... " >&6; }
24734  if test "x$enable_full_docs" = xyes; then
24735    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24737$as_echo "no, missing dependencies" >&6; }
24738
24739  # Print a helpful message on how to acquire the necessary build dependency.
24740  # dot is the help tag: freetype, cups, alsa etc
24741  MISSING_DEPENDENCY=dot
24742
24743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24744    cygwin_help $MISSING_DEPENDENCY
24745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24746    msys_help $MISSING_DEPENDENCY
24747  else
24748    PKGHANDLER_COMMAND=
24749
24750    case $PKGHANDLER in
24751      apt-get)
24752        apt_help     $MISSING_DEPENDENCY ;;
24753      yum)
24754        yum_help     $MISSING_DEPENDENCY ;;
24755      brew)
24756        brew_help    $MISSING_DEPENDENCY ;;
24757      port)
24758        port_help    $MISSING_DEPENDENCY ;;
24759      pkgutil)
24760        pkgutil_help $MISSING_DEPENDENCY ;;
24761      pkgadd)
24762        pkgadd_help  $MISSING_DEPENDENCY ;;
24763    esac
24764
24765    if test "x$PKGHANDLER_COMMAND" != x; then
24766      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24767    fi
24768  fi
24769
24770      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24771    else
24772      ENABLE_FULL_DOCS=true
24773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24774$as_echo "yes, forced" >&6; }
24775    fi
24776  elif test "x$enable_full_docs" = xno; then
24777    ENABLE_FULL_DOCS=false
24778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24779$as_echo "no, forced" >&6; }
24780  elif test "x$enable_full_docs" = x; then
24781    ENABLE_FULL_DOCS=false
24782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, default" >&5
24783$as_echo "no, default" >&6; }
24784  else
24785    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24786  fi
24787
24788
24789
24790  # Choose cacerts source file
24791
24792# Check whether --with-cacerts-file was given.
24793if test "${with_cacerts_file+set}" = set; then :
24794  withval=$with_cacerts_file;
24795fi
24796
24797  if test "x$with_cacerts_file" != x; then
24798    CACERTS_FILE=$with_cacerts_file
24799  fi
24800
24801
24802  # Enable or disable unlimited crypto
24803  # Check whether --enable-unlimited-crypto was given.
24804if test "${enable_unlimited_crypto+set}" = set; then :
24805  enableval=$enable_unlimited_crypto;
24806else
24807  enable_unlimited_crypto=yes
24808fi
24809
24810  if test "x$enable_unlimited_crypto" = "xyes"; then
24811    UNLIMITED_CRYPTO=true
24812  else
24813    UNLIMITED_CRYPTO=false
24814  fi
24815
24816
24817  # Should we build the serviceability agent (SA)?
24818  INCLUDE_SA=true
24819  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24820    INCLUDE_SA=false
24821  fi
24822  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24823    INCLUDE_SA=false
24824  fi
24825
24826
24827  # Compress jars
24828  COMPRESS_JARS=false
24829
24830
24831
24832  # Setup default copyright year. Mostly overridden when building close to a new year.
24833
24834# Check whether --with-copyright-year was given.
24835if test "${with_copyright_year+set}" = set; then :
24836  withval=$with_copyright_year;
24837fi
24838
24839  if test "x$with_copyright_year" = xyes; then
24840    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24841  elif test "x$with_copyright_year" != x; then
24842    COPYRIGHT_YEAR="$with_copyright_year"
24843  else
24844    COPYRIGHT_YEAR=`$DATE +'%Y'`
24845  fi
24846
24847
24848
24849  # Check whether --enable-keep-packaged-modules was given.
24850if test "${enable_keep_packaged_modules+set}" = set; then :
24851  enableval=$enable_keep_packaged_modules;
24852fi
24853
24854
24855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24856$as_echo_n "checking if packaged modules are kept... " >&6; }
24857  if test "x$enable_keep_packaged_modules" = "xyes"; then
24858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24859$as_echo "yes" >&6; }
24860    JLINK_KEEP_PACKAGED_MODULES=true
24861  elif test "x$enable_keep_packaged_modules" = "xno"; then
24862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24863$as_echo "no" >&6; }
24864    JLINK_KEEP_PACKAGED_MODULES=false
24865  elif test "x$enable_keep_packaged_modules" = "x"; then
24866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24867$as_echo "yes (default)" >&6; }
24868    JLINK_KEEP_PACKAGED_MODULES=true
24869  else
24870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24871$as_echo "error" >&6; }
24872    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24873  fi
24874
24875
24876
24877
24878  # Warn user that old version arguments are deprecated.
24879
24880
24881# Check whether --with-milestone was given.
24882if test "${with_milestone+set}" = set; then :
24883  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24884$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24885fi
24886
24887
24888
24889
24890# Check whether --with-update-version was given.
24891if test "${with_update_version+set}" = set; then :
24892  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24893$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24894fi
24895
24896
24897
24898
24899# Check whether --with-user-release-suffix was given.
24900if test "${with_user_release_suffix+set}" = set; then :
24901  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
24902$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24903fi
24904
24905
24906
24907
24908# Check whether --with-build-number was given.
24909if test "${with_build_number+set}" = set; then :
24910  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24911$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24912fi
24913
24914
24915
24916  # Source the version numbers file
24917  . $AUTOCONF_DIR/version-numbers
24918
24919  # Some non-version number information is set in that file
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929  # Override version from arguments
24930
24931  # If --with-version-string is set, process it first. It is possible to
24932  # override parts with more specific flags, since these are processed later.
24933
24934# Check whether --with-version-string was given.
24935if test "${with_version_string+set}" = set; then :
24936  withval=$with_version_string;
24937fi
24938
24939  if test "x$with_version_string" = xyes; then
24940    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24941  elif test "x$with_version_string" != x; then
24942    # Additional [] needed to keep m4 from mangling shell constructs.
24943    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24944      VERSION_MAJOR=${BASH_REMATCH[1]}
24945      VERSION_MINOR=${BASH_REMATCH[3]}
24946      VERSION_SECURITY=${BASH_REMATCH[5]}
24947      VERSION_PATCH=${BASH_REMATCH[7]}
24948      VERSION_PRE=${BASH_REMATCH[9]}
24949      version_plus_separator=${BASH_REMATCH[11]}
24950      VERSION_BUILD=${BASH_REMATCH[12]}
24951      VERSION_OPT=${BASH_REMATCH[14]}
24952      # Unspecified numerical fields are interpreted as 0.
24953      if test "x$VERSION_MINOR" = x; then
24954        VERSION_MINOR=0
24955      fi
24956      if test "x$VERSION_SECURITY" = x; then
24957        VERSION_SECURITY=0
24958      fi
24959      if test "x$VERSION_PATCH" = x; then
24960        VERSION_PATCH=0
24961      fi
24962      if test "x$version_plus_separator" != x \
24963          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24964        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24965      fi
24966      # Stop the version part process from setting default values.
24967      # We still allow them to explicitly override though.
24968      NO_DEFAULT_VERSION_PARTS=true
24969    else
24970      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24971    fi
24972  fi
24973
24974
24975# Check whether --with-version-pre was given.
24976if test "${with_version_pre+set}" = set; then :
24977  withval=$with_version_pre; with_version_pre_present=true
24978else
24979  with_version_pre_present=false
24980fi
24981
24982
24983  if test "x$with_version_pre_present" = xtrue; then
24984    if test "x$with_version_pre" = xyes; then
24985      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24986    elif test "x$with_version_pre" = xno; then
24987      # Interpret --without-* as empty string instead of the literal "no"
24988      VERSION_PRE=
24989    else
24990      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24991       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24992      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24994$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24995      fi
24996    fi
24997  else
24998    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24999      # Default is to use "internal" as pre
25000      VERSION_PRE="internal"
25001    fi
25002  fi
25003
25004
25005# Check whether --with-version-opt was given.
25006if test "${with_version_opt+set}" = set; then :
25007  withval=$with_version_opt; with_version_opt_present=true
25008else
25009  with_version_opt_present=false
25010fi
25011
25012
25013  if test "x$with_version_opt_present" = xtrue; then
25014    if test "x$with_version_opt" = xyes; then
25015      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25016    elif test "x$with_version_opt" = xno; then
25017      # Interpret --without-* as empty string instead of the literal "no"
25018      VERSION_OPT=
25019    else
25020      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25021       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25022      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25024$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25025      fi
25026    fi
25027  else
25028    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25029      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25030      # Outer [ ] to quote m4.
25031       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25032      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25033    fi
25034  fi
25035
25036
25037# Check whether --with-version-build was given.
25038if test "${with_version_build+set}" = set; then :
25039  withval=$with_version_build; with_version_build_present=true
25040else
25041  with_version_build_present=false
25042fi
25043
25044
25045  if test "x$with_version_build_present" = xtrue; then
25046    if test "x$with_version_build" = xyes; then
25047      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25048    elif test "x$with_version_build" = xno; then
25049      # Interpret --without-* as empty string instead of the literal "no"
25050      VERSION_BUILD=
25051    elif test "x$with_version_build" = x; then
25052      VERSION_BUILD=
25053    else
25054
25055  # Additional [] needed to keep m4 from mangling shell constructs.
25056  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25057    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25058  fi
25059  # Extract the version number without leading zeros.
25060  cleaned_value=${BASH_REMATCH[1]}
25061  if test "x$cleaned_value" = x; then
25062    # Special case for zero
25063    cleaned_value=${BASH_REMATCH[2]}
25064  fi
25065
25066  if test $cleaned_value -gt 255; then
25067    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25068  fi
25069  if test "x$cleaned_value" != "x$with_version_build"; then
25070    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25071$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25072  fi
25073  VERSION_BUILD=$cleaned_value
25074
25075    fi
25076  else
25077    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25078      # Default is to not have a build number.
25079      VERSION_BUILD=""
25080      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25081      VERSION_BUILD=0
25082    fi
25083  fi
25084
25085
25086# Check whether --with-version-major was given.
25087if test "${with_version_major+set}" = set; then :
25088  withval=$with_version_major; with_version_major_present=true
25089else
25090  with_version_major_present=false
25091fi
25092
25093
25094  if test "x$with_version_major_present" = xtrue; then
25095    if test "x$with_version_major" = xyes; then
25096      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25097    else
25098
25099  # Additional [] needed to keep m4 from mangling shell constructs.
25100  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25101    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25102  fi
25103  # Extract the version number without leading zeros.
25104  cleaned_value=${BASH_REMATCH[1]}
25105  if test "x$cleaned_value" = x; then
25106    # Special case for zero
25107    cleaned_value=${BASH_REMATCH[2]}
25108  fi
25109
25110  if test $cleaned_value -gt 255; then
25111    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25112  fi
25113  if test "x$cleaned_value" != "x$with_version_major"; then
25114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25115$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25116  fi
25117  VERSION_MAJOR=$cleaned_value
25118
25119    fi
25120  else
25121    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25122      # Default is to get value from version-numbers
25123      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25124    fi
25125  fi
25126
25127
25128# Check whether --with-version-minor was given.
25129if test "${with_version_minor+set}" = set; then :
25130  withval=$with_version_minor; with_version_minor_present=true
25131else
25132  with_version_minor_present=false
25133fi
25134
25135
25136  if test "x$with_version_minor_present" = xtrue; then
25137    if test "x$with_version_minor" = xyes; then
25138      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25139    elif test "x$with_version_minor" = xno; then
25140      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25141      VERSION_MINOR=0
25142    elif test "x$with_version_minor" = x; then
25143      VERSION_MINOR=0
25144    else
25145
25146  # Additional [] needed to keep m4 from mangling shell constructs.
25147  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25148    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25149  fi
25150  # Extract the version number without leading zeros.
25151  cleaned_value=${BASH_REMATCH[1]}
25152  if test "x$cleaned_value" = x; then
25153    # Special case for zero
25154    cleaned_value=${BASH_REMATCH[2]}
25155  fi
25156
25157  if test $cleaned_value -gt 255; then
25158    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25159  fi
25160  if test "x$cleaned_value" != "x$with_version_minor"; then
25161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25162$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25163  fi
25164  VERSION_MINOR=$cleaned_value
25165
25166    fi
25167  else
25168    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25169      # Default is 0, if unspecified
25170      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25171    fi
25172  fi
25173
25174
25175# Check whether --with-version-security was given.
25176if test "${with_version_security+set}" = set; then :
25177  withval=$with_version_security; with_version_security_present=true
25178else
25179  with_version_security_present=false
25180fi
25181
25182
25183  if test "x$with_version_security_present" = xtrue; then
25184    if test "x$with_version_security" = xyes; then
25185      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25186    elif test "x$with_version_security" = xno; then
25187      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25188      VERSION_SECURITY=0
25189    elif test "x$with_version_security" = x; then
25190      VERSION_SECURITY=0
25191    else
25192
25193  # Additional [] needed to keep m4 from mangling shell constructs.
25194  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25195    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25196  fi
25197  # Extract the version number without leading zeros.
25198  cleaned_value=${BASH_REMATCH[1]}
25199  if test "x$cleaned_value" = x; then
25200    # Special case for zero
25201    cleaned_value=${BASH_REMATCH[2]}
25202  fi
25203
25204  if test $cleaned_value -gt 255; then
25205    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25206  fi
25207  if test "x$cleaned_value" != "x$with_version_security"; then
25208    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25209$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25210  fi
25211  VERSION_SECURITY=$cleaned_value
25212
25213    fi
25214  else
25215    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25216      # Default is 0, if unspecified
25217      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25218    fi
25219  fi
25220
25221
25222# Check whether --with-version-patch was given.
25223if test "${with_version_patch+set}" = set; then :
25224  withval=$with_version_patch; with_version_patch_present=true
25225else
25226  with_version_patch_present=false
25227fi
25228
25229
25230  if test "x$with_version_patch_present" = xtrue; then
25231    if test "x$with_version_patch" = xyes; then
25232      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25233    elif test "x$with_version_patch" = xno; then
25234      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25235      VERSION_PATCH=0
25236    elif test "x$with_version_patch" = x; then
25237      VERSION_PATCH=0
25238    else
25239
25240  # Additional [] needed to keep m4 from mangling shell constructs.
25241  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25242    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25243  fi
25244  # Extract the version number without leading zeros.
25245  cleaned_value=${BASH_REMATCH[1]}
25246  if test "x$cleaned_value" = x; then
25247    # Special case for zero
25248    cleaned_value=${BASH_REMATCH[2]}
25249  fi
25250
25251  if test $cleaned_value -gt 255; then
25252    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25253  fi
25254  if test "x$cleaned_value" != "x$with_version_patch"; then
25255    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25256$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25257  fi
25258  VERSION_PATCH=$cleaned_value
25259
25260    fi
25261  else
25262    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25263      # Default is 0, if unspecified
25264      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25265    fi
25266  fi
25267
25268  # Calculate derived version properties
25269
25270  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25271  if test "x$VERSION_PRE" = x; then
25272    VERSION_IS_GA=true
25273  else
25274    VERSION_IS_GA=false
25275  fi
25276
25277  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25278  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25279
25280  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25281  # Strip trailing zeroes from stripped_version_number
25282  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25283  VERSION_NUMBER=$stripped_version_number
25284
25285  # The complete version string, with additional build information
25286  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25287    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25288  else
25289    # If either build or opt is set, we need a + separator
25290    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25291  fi
25292
25293  # The short version string, just VERSION_NUMBER and PRE, if present.
25294  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25295
25296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25297$as_echo_n "checking for version string... " >&6; }
25298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25299$as_echo "$VERSION_STRING" >&6; }
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315###############################################################################
25316#
25317# Setup BootJDK, used to bootstrap the build.
25318#
25319###############################################################################
25320
25321
25322  BOOT_JDK_FOUND=no
25323
25324# Check whether --with-boot-jdk was given.
25325if test "${with_boot_jdk+set}" = set; then :
25326  withval=$with_boot_jdk;
25327fi
25328
25329
25330  # We look for the Boot JDK through various means, going from more certain to
25331  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25332  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25333  # must check if this is indeed valid; otherwise we'll continue looking.
25334
25335  # Test: Is bootjdk explicitly set by command line arguments?
25336
25337  if test "x$BOOT_JDK_FOUND" = xno; then
25338    # Now execute the test
25339
25340  if test "x$with_boot_jdk" != x; then
25341    BOOT_JDK=$with_boot_jdk
25342    BOOT_JDK_FOUND=maybe
25343    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25344$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25345  fi
25346
25347
25348    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25349    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25350      # Do we have a bin/java?
25351      if test ! -x "$BOOT_JDK/bin/java"; then
25352        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25354        BOOT_JDK_FOUND=no
25355      else
25356        # Do we have a bin/javac?
25357        if test ! -x "$BOOT_JDK/bin/javac"; then
25358          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25360          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25361$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25362          BOOT_JDK_FOUND=no
25363        else
25364          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25365          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25366
25367          # Extra M4 quote needed to protect [] in grep expression.
25368          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25369          if test "x$FOUND_CORRECT_VERSION" = x; then
25370            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25372            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25373$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25374            BOOT_JDK_FOUND=no
25375          else
25376            # We're done! :-)
25377            BOOT_JDK_FOUND=yes
25378
25379  # Only process if variable expands to non-empty
25380
25381  if test "x$BOOT_JDK" != x; then
25382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25383
25384  # Input might be given as Windows format, start by converting to
25385  # unix format.
25386  path="$BOOT_JDK"
25387  new_path=`$CYGPATH -u "$path"`
25388
25389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25392  # "foo.exe" is OK but "foo" is an error.
25393  #
25394  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25395  # It is also a way to make sure we got the proper file name for the real test later on.
25396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25397  if test "x$test_shortpath" = x; then
25398    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25399$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25400    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25401  fi
25402
25403  # Call helper function which possibly converts this using DOS-style short mode.
25404  # If so, the updated path is stored in $new_path.
25405
25406  input_path="$new_path"
25407  # Check if we need to convert this using DOS-style short mode. If the path
25408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25409  # take no chances and rewrite it.
25410  # Note: m4 eats our [], so we need to use [ and ] instead.
25411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25412  if test "x$has_forbidden_chars" != x; then
25413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25417      # Going to short mode and back again did indeed matter. Since short mode is
25418      # case insensitive, let's make it lowercase to improve readability.
25419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25420      # Now convert it back to Unix-style (cygpath)
25421      input_path=`$CYGPATH -u "$shortmode_path"`
25422      new_path="$input_path"
25423    fi
25424  fi
25425
25426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25427  if test "x$test_cygdrive_prefix" = x; then
25428    # As a simple fix, exclude /usr/bin since it's not a real path.
25429    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25431      # a path prefixed by /cygdrive for fixpath to work.
25432      new_path="$CYGWIN_ROOT_PATH$input_path"
25433    fi
25434  fi
25435
25436
25437  if test "x$path" != "x$new_path"; then
25438    BOOT_JDK="$new_path"
25439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25441  fi
25442
25443    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25444
25445  path="$BOOT_JDK"
25446  has_colon=`$ECHO $path | $GREP ^.:`
25447  new_path="$path"
25448  if test "x$has_colon" = x; then
25449    # Not in mixed or Windows style, start by that.
25450    new_path=`cmd //c echo $path`
25451  fi
25452
25453
25454  input_path="$new_path"
25455  # Check if we need to convert this using DOS-style short mode. If the path
25456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25457  # take no chances and rewrite it.
25458  # Note: m4 eats our [], so we need to use [ and ] instead.
25459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25460  if test "x$has_forbidden_chars" != x; then
25461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25463  fi
25464
25465
25466  windows_path="$new_path"
25467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25468    unix_path=`$CYGPATH -u "$windows_path"`
25469    new_path="$unix_path"
25470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25472    new_path="$unix_path"
25473  fi
25474
25475  if test "x$path" != "x$new_path"; then
25476    BOOT_JDK="$new_path"
25477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25479  fi
25480
25481  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25482  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25483
25484    else
25485      # We're on a unix platform. Hooray! :)
25486      path="$BOOT_JDK"
25487      has_space=`$ECHO "$path" | $GREP " "`
25488      if test "x$has_space" != x; then
25489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25491        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25492      fi
25493
25494      # Use eval to expand a potential ~
25495      eval path="$path"
25496      if test ! -f "$path" && test ! -d "$path"; then
25497        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25498      fi
25499
25500      if test -d "$path"; then
25501        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25502      else
25503        dir="`$DIRNAME "$path"`"
25504        base="`$BASENAME "$path"`"
25505        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25506      fi
25507    fi
25508  fi
25509
25510            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25511$as_echo_n "checking for Boot JDK... " >&6; }
25512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25513$as_echo "$BOOT_JDK" >&6; }
25514            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25515$as_echo_n "checking Boot JDK version... " >&6; }
25516            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25518$as_echo "$BOOT_JDK_VERSION" >&6; }
25519          fi # end check jdk version
25520        fi # end check javac
25521      fi # end check java
25522    fi # end check boot jdk found
25523  fi
25524
25525  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25526    # Having specified an argument which is incorrect will produce an instant failure;
25527    # we should not go on looking
25528    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25529  fi
25530
25531  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25532
25533  if test "x$BOOT_JDK_FOUND" = xno; then
25534    # Now execute the test
25535
25536  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25537    # First check at user selected default
25538
25539  if test "x$BOOT_JDK_FOUND" = xno; then
25540    # Now execute the test
25541
25542  if test -x /usr/libexec/java_home; then
25543    BOOT_JDK=`/usr/libexec/java_home `
25544    BOOT_JDK_FOUND=maybe
25545    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25546$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25547  fi
25548
25549
25550    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25551    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25552      # Do we have a bin/java?
25553      if test ! -x "$BOOT_JDK/bin/java"; then
25554        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25556        BOOT_JDK_FOUND=no
25557      else
25558        # Do we have a bin/javac?
25559        if test ! -x "$BOOT_JDK/bin/javac"; then
25560          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25562          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25563$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25564          BOOT_JDK_FOUND=no
25565        else
25566          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25567          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25568
25569          # Extra M4 quote needed to protect [] in grep expression.
25570          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25571          if test "x$FOUND_CORRECT_VERSION" = x; then
25572            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25574            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25575$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25576            BOOT_JDK_FOUND=no
25577          else
25578            # We're done! :-)
25579            BOOT_JDK_FOUND=yes
25580
25581  # Only process if variable expands to non-empty
25582
25583  if test "x$BOOT_JDK" != x; then
25584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25585
25586  # Input might be given as Windows format, start by converting to
25587  # unix format.
25588  path="$BOOT_JDK"
25589  new_path=`$CYGPATH -u "$path"`
25590
25591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25594  # "foo.exe" is OK but "foo" is an error.
25595  #
25596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25597  # It is also a way to make sure we got the proper file name for the real test later on.
25598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25599  if test "x$test_shortpath" = x; then
25600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25601$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25602    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25603  fi
25604
25605  # Call helper function which possibly converts this using DOS-style short mode.
25606  # If so, the updated path is stored in $new_path.
25607
25608  input_path="$new_path"
25609  # Check if we need to convert this using DOS-style short mode. If the path
25610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25611  # take no chances and rewrite it.
25612  # Note: m4 eats our [], so we need to use [ and ] instead.
25613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25614  if test "x$has_forbidden_chars" != x; then
25615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25619      # Going to short mode and back again did indeed matter. Since short mode is
25620      # case insensitive, let's make it lowercase to improve readability.
25621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25622      # Now convert it back to Unix-style (cygpath)
25623      input_path=`$CYGPATH -u "$shortmode_path"`
25624      new_path="$input_path"
25625    fi
25626  fi
25627
25628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25629  if test "x$test_cygdrive_prefix" = x; then
25630    # As a simple fix, exclude /usr/bin since it's not a real path.
25631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25633      # a path prefixed by /cygdrive for fixpath to work.
25634      new_path="$CYGWIN_ROOT_PATH$input_path"
25635    fi
25636  fi
25637
25638
25639  if test "x$path" != "x$new_path"; then
25640    BOOT_JDK="$new_path"
25641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25643  fi
25644
25645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25646
25647  path="$BOOT_JDK"
25648  has_colon=`$ECHO $path | $GREP ^.:`
25649  new_path="$path"
25650  if test "x$has_colon" = x; then
25651    # Not in mixed or Windows style, start by that.
25652    new_path=`cmd //c echo $path`
25653  fi
25654
25655
25656  input_path="$new_path"
25657  # Check if we need to convert this using DOS-style short mode. If the path
25658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25659  # take no chances and rewrite it.
25660  # Note: m4 eats our [], so we need to use [ and ] instead.
25661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25662  if test "x$has_forbidden_chars" != x; then
25663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25665  fi
25666
25667
25668  windows_path="$new_path"
25669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25670    unix_path=`$CYGPATH -u "$windows_path"`
25671    new_path="$unix_path"
25672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25674    new_path="$unix_path"
25675  fi
25676
25677  if test "x$path" != "x$new_path"; then
25678    BOOT_JDK="$new_path"
25679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25681  fi
25682
25683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25685
25686    else
25687      # We're on a unix platform. Hooray! :)
25688      path="$BOOT_JDK"
25689      has_space=`$ECHO "$path" | $GREP " "`
25690      if test "x$has_space" != x; then
25691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25694      fi
25695
25696      # Use eval to expand a potential ~
25697      eval path="$path"
25698      if test ! -f "$path" && test ! -d "$path"; then
25699        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25700      fi
25701
25702      if test -d "$path"; then
25703        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25704      else
25705        dir="`$DIRNAME "$path"`"
25706        base="`$BASENAME "$path"`"
25707        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25708      fi
25709    fi
25710  fi
25711
25712            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25713$as_echo_n "checking for Boot JDK... " >&6; }
25714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25715$as_echo "$BOOT_JDK" >&6; }
25716            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25717$as_echo_n "checking Boot JDK version... " >&6; }
25718            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25720$as_echo "$BOOT_JDK_VERSION" >&6; }
25721          fi # end check jdk version
25722        fi # end check javac
25723      fi # end check java
25724    fi # end check boot jdk found
25725  fi
25726
25727    # If that did not work out (e.g. too old), try explicit versions instead
25728
25729  if test "x$BOOT_JDK_FOUND" = xno; then
25730    # Now execute the test
25731
25732  if test -x /usr/libexec/java_home; then
25733    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25734    BOOT_JDK_FOUND=maybe
25735    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25736$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25737  fi
25738
25739
25740    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25741    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25742      # Do we have a bin/java?
25743      if test ! -x "$BOOT_JDK/bin/java"; then
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25746        BOOT_JDK_FOUND=no
25747      else
25748        # Do we have a bin/javac?
25749        if test ! -x "$BOOT_JDK/bin/javac"; then
25750          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25752          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25753$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25754          BOOT_JDK_FOUND=no
25755        else
25756          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25757          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25758
25759          # Extra M4 quote needed to protect [] in grep expression.
25760          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25761          if test "x$FOUND_CORRECT_VERSION" = x; then
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25764            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25765$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25766            BOOT_JDK_FOUND=no
25767          else
25768            # We're done! :-)
25769            BOOT_JDK_FOUND=yes
25770
25771  # Only process if variable expands to non-empty
25772
25773  if test "x$BOOT_JDK" != x; then
25774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25775
25776  # Input might be given as Windows format, start by converting to
25777  # unix format.
25778  path="$BOOT_JDK"
25779  new_path=`$CYGPATH -u "$path"`
25780
25781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25784  # "foo.exe" is OK but "foo" is an error.
25785  #
25786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25787  # It is also a way to make sure we got the proper file name for the real test later on.
25788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25789  if test "x$test_shortpath" = x; then
25790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25791$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25792    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25793  fi
25794
25795  # Call helper function which possibly converts this using DOS-style short mode.
25796  # If so, the updated path is stored in $new_path.
25797
25798  input_path="$new_path"
25799  # Check if we need to convert this using DOS-style short mode. If the path
25800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25801  # take no chances and rewrite it.
25802  # Note: m4 eats our [], so we need to use [ and ] instead.
25803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25804  if test "x$has_forbidden_chars" != x; then
25805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25809      # Going to short mode and back again did indeed matter. Since short mode is
25810      # case insensitive, let's make it lowercase to improve readability.
25811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25812      # Now convert it back to Unix-style (cygpath)
25813      input_path=`$CYGPATH -u "$shortmode_path"`
25814      new_path="$input_path"
25815    fi
25816  fi
25817
25818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25819  if test "x$test_cygdrive_prefix" = x; then
25820    # As a simple fix, exclude /usr/bin since it's not a real path.
25821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25823      # a path prefixed by /cygdrive for fixpath to work.
25824      new_path="$CYGWIN_ROOT_PATH$input_path"
25825    fi
25826  fi
25827
25828
25829  if test "x$path" != "x$new_path"; then
25830    BOOT_JDK="$new_path"
25831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25832$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25833  fi
25834
25835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25836
25837  path="$BOOT_JDK"
25838  has_colon=`$ECHO $path | $GREP ^.:`
25839  new_path="$path"
25840  if test "x$has_colon" = x; then
25841    # Not in mixed or Windows style, start by that.
25842    new_path=`cmd //c echo $path`
25843  fi
25844
25845
25846  input_path="$new_path"
25847  # Check if we need to convert this using DOS-style short mode. If the path
25848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25849  # take no chances and rewrite it.
25850  # Note: m4 eats our [], so we need to use [ and ] instead.
25851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25852  if test "x$has_forbidden_chars" != x; then
25853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25855  fi
25856
25857
25858  windows_path="$new_path"
25859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25860    unix_path=`$CYGPATH -u "$windows_path"`
25861    new_path="$unix_path"
25862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25864    new_path="$unix_path"
25865  fi
25866
25867  if test "x$path" != "x$new_path"; then
25868    BOOT_JDK="$new_path"
25869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25870$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25871  fi
25872
25873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25875
25876    else
25877      # We're on a unix platform. Hooray! :)
25878      path="$BOOT_JDK"
25879      has_space=`$ECHO "$path" | $GREP " "`
25880      if test "x$has_space" != x; then
25881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25884      fi
25885
25886      # Use eval to expand a potential ~
25887      eval path="$path"
25888      if test ! -f "$path" && test ! -d "$path"; then
25889        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25890      fi
25891
25892      if test -d "$path"; then
25893        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25894      else
25895        dir="`$DIRNAME "$path"`"
25896        base="`$BASENAME "$path"`"
25897        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25898      fi
25899    fi
25900  fi
25901
25902            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25903$as_echo_n "checking for Boot JDK... " >&6; }
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25905$as_echo "$BOOT_JDK" >&6; }
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25907$as_echo_n "checking Boot JDK version... " >&6; }
25908            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25910$as_echo "$BOOT_JDK_VERSION" >&6; }
25911          fi # end check jdk version
25912        fi # end check javac
25913      fi # end check java
25914    fi # end check boot jdk found
25915  fi
25916
25917
25918  if test "x$BOOT_JDK_FOUND" = xno; then
25919    # Now execute the test
25920
25921  if test -x /usr/libexec/java_home; then
25922    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25923    BOOT_JDK_FOUND=maybe
25924    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25925$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25926  fi
25927
25928
25929    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25930    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25931      # Do we have a bin/java?
25932      if test ! -x "$BOOT_JDK/bin/java"; then
25933        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25934$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25935        BOOT_JDK_FOUND=no
25936      else
25937        # Do we have a bin/javac?
25938        if test ! -x "$BOOT_JDK/bin/javac"; then
25939          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25941          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25942$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25943          BOOT_JDK_FOUND=no
25944        else
25945          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25946          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25947
25948          # Extra M4 quote needed to protect [] in grep expression.
25949          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25950          if test "x$FOUND_CORRECT_VERSION" = x; then
25951            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25953            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25954$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25955            BOOT_JDK_FOUND=no
25956          else
25957            # We're done! :-)
25958            BOOT_JDK_FOUND=yes
25959
25960  # Only process if variable expands to non-empty
25961
25962  if test "x$BOOT_JDK" != x; then
25963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25964
25965  # Input might be given as Windows format, start by converting to
25966  # unix format.
25967  path="$BOOT_JDK"
25968  new_path=`$CYGPATH -u "$path"`
25969
25970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25973  # "foo.exe" is OK but "foo" is an error.
25974  #
25975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25976  # It is also a way to make sure we got the proper file name for the real test later on.
25977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25978  if test "x$test_shortpath" = x; then
25979    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25980$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25981    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25982  fi
25983
25984  # Call helper function which possibly converts this using DOS-style short mode.
25985  # If so, the updated path is stored in $new_path.
25986
25987  input_path="$new_path"
25988  # Check if we need to convert this using DOS-style short mode. If the path
25989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25990  # take no chances and rewrite it.
25991  # Note: m4 eats our [], so we need to use [ and ] instead.
25992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25993  if test "x$has_forbidden_chars" != x; then
25994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25998      # Going to short mode and back again did indeed matter. Since short mode is
25999      # case insensitive, let's make it lowercase to improve readability.
26000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26001      # Now convert it back to Unix-style (cygpath)
26002      input_path=`$CYGPATH -u "$shortmode_path"`
26003      new_path="$input_path"
26004    fi
26005  fi
26006
26007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26008  if test "x$test_cygdrive_prefix" = x; then
26009    # As a simple fix, exclude /usr/bin since it's not a real path.
26010    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26012      # a path prefixed by /cygdrive for fixpath to work.
26013      new_path="$CYGWIN_ROOT_PATH$input_path"
26014    fi
26015  fi
26016
26017
26018  if test "x$path" != "x$new_path"; then
26019    BOOT_JDK="$new_path"
26020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26021$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26022  fi
26023
26024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26025
26026  path="$BOOT_JDK"
26027  has_colon=`$ECHO $path | $GREP ^.:`
26028  new_path="$path"
26029  if test "x$has_colon" = x; then
26030    # Not in mixed or Windows style, start by that.
26031    new_path=`cmd //c echo $path`
26032  fi
26033
26034
26035  input_path="$new_path"
26036  # Check if we need to convert this using DOS-style short mode. If the path
26037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26038  # take no chances and rewrite it.
26039  # Note: m4 eats our [], so we need to use [ and ] instead.
26040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26041  if test "x$has_forbidden_chars" != x; then
26042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26044  fi
26045
26046
26047  windows_path="$new_path"
26048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26049    unix_path=`$CYGPATH -u "$windows_path"`
26050    new_path="$unix_path"
26051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26053    new_path="$unix_path"
26054  fi
26055
26056  if test "x$path" != "x$new_path"; then
26057    BOOT_JDK="$new_path"
26058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26059$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26060  fi
26061
26062  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26063  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26064
26065    else
26066      # We're on a unix platform. Hooray! :)
26067      path="$BOOT_JDK"
26068      has_space=`$ECHO "$path" | $GREP " "`
26069      if test "x$has_space" != x; then
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26072        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26073      fi
26074
26075      # Use eval to expand a potential ~
26076      eval path="$path"
26077      if test ! -f "$path" && test ! -d "$path"; then
26078        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26079      fi
26080
26081      if test -d "$path"; then
26082        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26083      else
26084        dir="`$DIRNAME "$path"`"
26085        base="`$BASENAME "$path"`"
26086        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26087      fi
26088    fi
26089  fi
26090
26091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26092$as_echo_n "checking for Boot JDK... " >&6; }
26093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26094$as_echo "$BOOT_JDK" >&6; }
26095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26096$as_echo_n "checking Boot JDK version... " >&6; }
26097            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26099$as_echo "$BOOT_JDK_VERSION" >&6; }
26100          fi # end check jdk version
26101        fi # end check javac
26102      fi # end check java
26103    fi # end check boot jdk found
26104  fi
26105
26106
26107  if test "x$BOOT_JDK_FOUND" = xno; then
26108    # Now execute the test
26109
26110  if test -x /usr/libexec/java_home; then
26111    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26112    BOOT_JDK_FOUND=maybe
26113    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26114$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26115  fi
26116
26117
26118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26120      # Do we have a bin/java?
26121      if test ! -x "$BOOT_JDK/bin/java"; then
26122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26124        BOOT_JDK_FOUND=no
26125      else
26126        # Do we have a bin/javac?
26127        if test ! -x "$BOOT_JDK/bin/javac"; then
26128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26132          BOOT_JDK_FOUND=no
26133        else
26134          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26135          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26136
26137          # Extra M4 quote needed to protect [] in grep expression.
26138          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26139          if test "x$FOUND_CORRECT_VERSION" = x; then
26140            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26142            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26143$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26144            BOOT_JDK_FOUND=no
26145          else
26146            # We're done! :-)
26147            BOOT_JDK_FOUND=yes
26148
26149  # Only process if variable expands to non-empty
26150
26151  if test "x$BOOT_JDK" != x; then
26152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26153
26154  # Input might be given as Windows format, start by converting to
26155  # unix format.
26156  path="$BOOT_JDK"
26157  new_path=`$CYGPATH -u "$path"`
26158
26159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26162  # "foo.exe" is OK but "foo" is an error.
26163  #
26164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26165  # It is also a way to make sure we got the proper file name for the real test later on.
26166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26167  if test "x$test_shortpath" = x; then
26168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26171  fi
26172
26173  # Call helper function which possibly converts this using DOS-style short mode.
26174  # If so, the updated path is stored in $new_path.
26175
26176  input_path="$new_path"
26177  # Check if we need to convert this using DOS-style short mode. If the path
26178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26179  # take no chances and rewrite it.
26180  # Note: m4 eats our [], so we need to use [ and ] instead.
26181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26182  if test "x$has_forbidden_chars" != x; then
26183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26187      # Going to short mode and back again did indeed matter. Since short mode is
26188      # case insensitive, let's make it lowercase to improve readability.
26189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26190      # Now convert it back to Unix-style (cygpath)
26191      input_path=`$CYGPATH -u "$shortmode_path"`
26192      new_path="$input_path"
26193    fi
26194  fi
26195
26196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26197  if test "x$test_cygdrive_prefix" = x; then
26198    # As a simple fix, exclude /usr/bin since it's not a real path.
26199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26201      # a path prefixed by /cygdrive for fixpath to work.
26202      new_path="$CYGWIN_ROOT_PATH$input_path"
26203    fi
26204  fi
26205
26206
26207  if test "x$path" != "x$new_path"; then
26208    BOOT_JDK="$new_path"
26209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26211  fi
26212
26213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26214
26215  path="$BOOT_JDK"
26216  has_colon=`$ECHO $path | $GREP ^.:`
26217  new_path="$path"
26218  if test "x$has_colon" = x; then
26219    # Not in mixed or Windows style, start by that.
26220    new_path=`cmd //c echo $path`
26221  fi
26222
26223
26224  input_path="$new_path"
26225  # Check if we need to convert this using DOS-style short mode. If the path
26226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26227  # take no chances and rewrite it.
26228  # Note: m4 eats our [], so we need to use [ and ] instead.
26229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26230  if test "x$has_forbidden_chars" != x; then
26231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233  fi
26234
26235
26236  windows_path="$new_path"
26237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26238    unix_path=`$CYGPATH -u "$windows_path"`
26239    new_path="$unix_path"
26240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26242    new_path="$unix_path"
26243  fi
26244
26245  if test "x$path" != "x$new_path"; then
26246    BOOT_JDK="$new_path"
26247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26249  fi
26250
26251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26253
26254    else
26255      # We're on a unix platform. Hooray! :)
26256      path="$BOOT_JDK"
26257      has_space=`$ECHO "$path" | $GREP " "`
26258      if test "x$has_space" != x; then
26259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26262      fi
26263
26264      # Use eval to expand a potential ~
26265      eval path="$path"
26266      if test ! -f "$path" && test ! -d "$path"; then
26267        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26268      fi
26269
26270      if test -d "$path"; then
26271        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26272      else
26273        dir="`$DIRNAME "$path"`"
26274        base="`$BASENAME "$path"`"
26275        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26276      fi
26277    fi
26278  fi
26279
26280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26281$as_echo_n "checking for Boot JDK... " >&6; }
26282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26283$as_echo "$BOOT_JDK" >&6; }
26284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26285$as_echo_n "checking Boot JDK version... " >&6; }
26286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26288$as_echo "$BOOT_JDK_VERSION" >&6; }
26289          fi # end check jdk version
26290        fi # end check javac
26291      fi # end check java
26292    fi # end check boot jdk found
26293  fi
26294
26295  fi
26296
26297
26298    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26299    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26300      # Do we have a bin/java?
26301      if test ! -x "$BOOT_JDK/bin/java"; then
26302        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26304        BOOT_JDK_FOUND=no
26305      else
26306        # Do we have a bin/javac?
26307        if test ! -x "$BOOT_JDK/bin/javac"; then
26308          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26310          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26311$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26312          BOOT_JDK_FOUND=no
26313        else
26314          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26315          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26316
26317          # Extra M4 quote needed to protect [] in grep expression.
26318          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26319          if test "x$FOUND_CORRECT_VERSION" = x; then
26320            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26322            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26323$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26324            BOOT_JDK_FOUND=no
26325          else
26326            # We're done! :-)
26327            BOOT_JDK_FOUND=yes
26328
26329  # Only process if variable expands to non-empty
26330
26331  if test "x$BOOT_JDK" != x; then
26332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26333
26334  # Input might be given as Windows format, start by converting to
26335  # unix format.
26336  path="$BOOT_JDK"
26337  new_path=`$CYGPATH -u "$path"`
26338
26339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26342  # "foo.exe" is OK but "foo" is an error.
26343  #
26344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26345  # It is also a way to make sure we got the proper file name for the real test later on.
26346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26347  if test "x$test_shortpath" = x; then
26348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26350    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26351  fi
26352
26353  # Call helper function which possibly converts this using DOS-style short mode.
26354  # If so, the updated path is stored in $new_path.
26355
26356  input_path="$new_path"
26357  # Check if we need to convert this using DOS-style short mode. If the path
26358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26359  # take no chances and rewrite it.
26360  # Note: m4 eats our [], so we need to use [ and ] instead.
26361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26362  if test "x$has_forbidden_chars" != x; then
26363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26367      # Going to short mode and back again did indeed matter. Since short mode is
26368      # case insensitive, let's make it lowercase to improve readability.
26369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26370      # Now convert it back to Unix-style (cygpath)
26371      input_path=`$CYGPATH -u "$shortmode_path"`
26372      new_path="$input_path"
26373    fi
26374  fi
26375
26376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26377  if test "x$test_cygdrive_prefix" = x; then
26378    # As a simple fix, exclude /usr/bin since it's not a real path.
26379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26381      # a path prefixed by /cygdrive for fixpath to work.
26382      new_path="$CYGWIN_ROOT_PATH$input_path"
26383    fi
26384  fi
26385
26386
26387  if test "x$path" != "x$new_path"; then
26388    BOOT_JDK="$new_path"
26389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26391  fi
26392
26393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26394
26395  path="$BOOT_JDK"
26396  has_colon=`$ECHO $path | $GREP ^.:`
26397  new_path="$path"
26398  if test "x$has_colon" = x; then
26399    # Not in mixed or Windows style, start by that.
26400    new_path=`cmd //c echo $path`
26401  fi
26402
26403
26404  input_path="$new_path"
26405  # Check if we need to convert this using DOS-style short mode. If the path
26406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26407  # take no chances and rewrite it.
26408  # Note: m4 eats our [], so we need to use [ and ] instead.
26409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26410  if test "x$has_forbidden_chars" != x; then
26411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26413  fi
26414
26415
26416  windows_path="$new_path"
26417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26418    unix_path=`$CYGPATH -u "$windows_path"`
26419    new_path="$unix_path"
26420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26422    new_path="$unix_path"
26423  fi
26424
26425  if test "x$path" != "x$new_path"; then
26426    BOOT_JDK="$new_path"
26427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26428$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26429  fi
26430
26431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26433
26434    else
26435      # We're on a unix platform. Hooray! :)
26436      path="$BOOT_JDK"
26437      has_space=`$ECHO "$path" | $GREP " "`
26438      if test "x$has_space" != x; then
26439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26440$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26442      fi
26443
26444      # Use eval to expand a potential ~
26445      eval path="$path"
26446      if test ! -f "$path" && test ! -d "$path"; then
26447        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26448      fi
26449
26450      if test -d "$path"; then
26451        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26452      else
26453        dir="`$DIRNAME "$path"`"
26454        base="`$BASENAME "$path"`"
26455        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26456      fi
26457    fi
26458  fi
26459
26460            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26461$as_echo_n "checking for Boot JDK... " >&6; }
26462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26463$as_echo "$BOOT_JDK" >&6; }
26464            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26465$as_echo_n "checking Boot JDK version... " >&6; }
26466            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26468$as_echo "$BOOT_JDK_VERSION" >&6; }
26469          fi # end check jdk version
26470        fi # end check javac
26471      fi # end check java
26472    fi # end check boot jdk found
26473  fi
26474
26475
26476  # Test: Is $JAVA_HOME set?
26477
26478  if test "x$BOOT_JDK_FOUND" = xno; then
26479    # Now execute the test
26480
26481  if test "x$JAVA_HOME" != x; then
26482    JAVA_HOME_PROCESSED="$JAVA_HOME"
26483
26484  # Only process if variable expands to non-empty
26485
26486  if test "x$JAVA_HOME_PROCESSED" != x; then
26487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488
26489  # Input might be given as Windows format, start by converting to
26490  # unix format.
26491  path="$JAVA_HOME_PROCESSED"
26492  new_path=`$CYGPATH -u "$path"`
26493
26494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26497  # "foo.exe" is OK but "foo" is an error.
26498  #
26499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26500  # It is also a way to make sure we got the proper file name for the real test later on.
26501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26502  if test "x$test_shortpath" = x; then
26503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26504$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26505    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26506  fi
26507
26508  # Call helper function which possibly converts this using DOS-style short mode.
26509  # If so, the updated path is stored in $new_path.
26510
26511  input_path="$new_path"
26512  # Check if we need to convert this using DOS-style short mode. If the path
26513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26514  # take no chances and rewrite it.
26515  # Note: m4 eats our [], so we need to use [ and ] instead.
26516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26517  if test "x$has_forbidden_chars" != x; then
26518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26522      # Going to short mode and back again did indeed matter. Since short mode is
26523      # case insensitive, let's make it lowercase to improve readability.
26524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26525      # Now convert it back to Unix-style (cygpath)
26526      input_path=`$CYGPATH -u "$shortmode_path"`
26527      new_path="$input_path"
26528    fi
26529  fi
26530
26531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26532  if test "x$test_cygdrive_prefix" = x; then
26533    # As a simple fix, exclude /usr/bin since it's not a real path.
26534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26536      # a path prefixed by /cygdrive for fixpath to work.
26537      new_path="$CYGWIN_ROOT_PATH$input_path"
26538    fi
26539  fi
26540
26541
26542  if test "x$path" != "x$new_path"; then
26543    JAVA_HOME_PROCESSED="$new_path"
26544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26545$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26546  fi
26547
26548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26549
26550  path="$JAVA_HOME_PROCESSED"
26551  has_colon=`$ECHO $path | $GREP ^.:`
26552  new_path="$path"
26553  if test "x$has_colon" = x; then
26554    # Not in mixed or Windows style, start by that.
26555    new_path=`cmd //c echo $path`
26556  fi
26557
26558
26559  input_path="$new_path"
26560  # Check if we need to convert this using DOS-style short mode. If the path
26561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26562  # take no chances and rewrite it.
26563  # Note: m4 eats our [], so we need to use [ and ] instead.
26564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26565  if test "x$has_forbidden_chars" != x; then
26566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26568  fi
26569
26570
26571  windows_path="$new_path"
26572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26573    unix_path=`$CYGPATH -u "$windows_path"`
26574    new_path="$unix_path"
26575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26577    new_path="$unix_path"
26578  fi
26579
26580  if test "x$path" != "x$new_path"; then
26581    JAVA_HOME_PROCESSED="$new_path"
26582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26583$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26584  fi
26585
26586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26588
26589    else
26590      # We're on a unix platform. Hooray! :)
26591      path="$JAVA_HOME_PROCESSED"
26592      has_space=`$ECHO "$path" | $GREP " "`
26593      if test "x$has_space" != x; then
26594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26595$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26597      fi
26598
26599      # Use eval to expand a potential ~
26600      eval path="$path"
26601      if test ! -f "$path" && test ! -d "$path"; then
26602        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26603      fi
26604
26605      if test -d "$path"; then
26606        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26607      else
26608        dir="`$DIRNAME "$path"`"
26609        base="`$BASENAME "$path"`"
26610        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26611      fi
26612    fi
26613  fi
26614
26615    if test ! -d "$JAVA_HOME_PROCESSED"; then
26616      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26617$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26618    else
26619      # Aha, the user has set a JAVA_HOME
26620      # let us use that as the Boot JDK.
26621      BOOT_JDK="$JAVA_HOME_PROCESSED"
26622      BOOT_JDK_FOUND=maybe
26623      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26624$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26625    fi
26626  fi
26627
26628
26629    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26630    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26631      # Do we have a bin/java?
26632      if test ! -x "$BOOT_JDK/bin/java"; then
26633        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26635        BOOT_JDK_FOUND=no
26636      else
26637        # Do we have a bin/javac?
26638        if test ! -x "$BOOT_JDK/bin/javac"; then
26639          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26641          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26642$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26643          BOOT_JDK_FOUND=no
26644        else
26645          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26646          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26647
26648          # Extra M4 quote needed to protect [] in grep expression.
26649          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26650          if test "x$FOUND_CORRECT_VERSION" = x; then
26651            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26653            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26654$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26655            BOOT_JDK_FOUND=no
26656          else
26657            # We're done! :-)
26658            BOOT_JDK_FOUND=yes
26659
26660  # Only process if variable expands to non-empty
26661
26662  if test "x$BOOT_JDK" != x; then
26663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26664
26665  # Input might be given as Windows format, start by converting to
26666  # unix format.
26667  path="$BOOT_JDK"
26668  new_path=`$CYGPATH -u "$path"`
26669
26670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26673  # "foo.exe" is OK but "foo" is an error.
26674  #
26675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26676  # It is also a way to make sure we got the proper file name for the real test later on.
26677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26678  if test "x$test_shortpath" = x; then
26679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26681    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26682  fi
26683
26684  # Call helper function which possibly converts this using DOS-style short mode.
26685  # If so, the updated path is stored in $new_path.
26686
26687  input_path="$new_path"
26688  # Check if we need to convert this using DOS-style short mode. If the path
26689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26690  # take no chances and rewrite it.
26691  # Note: m4 eats our [], so we need to use [ and ] instead.
26692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26693  if test "x$has_forbidden_chars" != x; then
26694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26698      # Going to short mode and back again did indeed matter. Since short mode is
26699      # case insensitive, let's make it lowercase to improve readability.
26700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26701      # Now convert it back to Unix-style (cygpath)
26702      input_path=`$CYGPATH -u "$shortmode_path"`
26703      new_path="$input_path"
26704    fi
26705  fi
26706
26707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26708  if test "x$test_cygdrive_prefix" = x; then
26709    # As a simple fix, exclude /usr/bin since it's not a real path.
26710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26712      # a path prefixed by /cygdrive for fixpath to work.
26713      new_path="$CYGWIN_ROOT_PATH$input_path"
26714    fi
26715  fi
26716
26717
26718  if test "x$path" != "x$new_path"; then
26719    BOOT_JDK="$new_path"
26720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26722  fi
26723
26724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26725
26726  path="$BOOT_JDK"
26727  has_colon=`$ECHO $path | $GREP ^.:`
26728  new_path="$path"
26729  if test "x$has_colon" = x; then
26730    # Not in mixed or Windows style, start by that.
26731    new_path=`cmd //c echo $path`
26732  fi
26733
26734
26735  input_path="$new_path"
26736  # Check if we need to convert this using DOS-style short mode. If the path
26737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26738  # take no chances and rewrite it.
26739  # Note: m4 eats our [], so we need to use [ and ] instead.
26740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26741  if test "x$has_forbidden_chars" != x; then
26742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26744  fi
26745
26746
26747  windows_path="$new_path"
26748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26749    unix_path=`$CYGPATH -u "$windows_path"`
26750    new_path="$unix_path"
26751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26753    new_path="$unix_path"
26754  fi
26755
26756  if test "x$path" != "x$new_path"; then
26757    BOOT_JDK="$new_path"
26758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26759$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26760  fi
26761
26762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26764
26765    else
26766      # We're on a unix platform. Hooray! :)
26767      path="$BOOT_JDK"
26768      has_space=`$ECHO "$path" | $GREP " "`
26769      if test "x$has_space" != x; then
26770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26771$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26773      fi
26774
26775      # Use eval to expand a potential ~
26776      eval path="$path"
26777      if test ! -f "$path" && test ! -d "$path"; then
26778        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26779      fi
26780
26781      if test -d "$path"; then
26782        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26783      else
26784        dir="`$DIRNAME "$path"`"
26785        base="`$BASENAME "$path"`"
26786        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26787      fi
26788    fi
26789  fi
26790
26791            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26792$as_echo_n "checking for Boot JDK... " >&6; }
26793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26794$as_echo "$BOOT_JDK" >&6; }
26795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26796$as_echo_n "checking Boot JDK version... " >&6; }
26797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26799$as_echo "$BOOT_JDK_VERSION" >&6; }
26800          fi # end check jdk version
26801        fi # end check javac
26802      fi # end check java
26803    fi # end check boot jdk found
26804  fi
26805
26806
26807  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26808
26809  if test "x$BOOT_JDK_FOUND" = xno; then
26810    # Now execute the test
26811
26812  # Extract the first word of "javac", so it can be a program name with args.
26813set dummy javac; ac_word=$2
26814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26815$as_echo_n "checking for $ac_word... " >&6; }
26816if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26817  $as_echo_n "(cached) " >&6
26818else
26819  case $JAVAC_CHECK in
26820  [\\/]* | ?:[\\/]*)
26821  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26822  ;;
26823  *)
26824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26825for as_dir in $PATH
26826do
26827  IFS=$as_save_IFS
26828  test -z "$as_dir" && as_dir=.
26829    for ac_exec_ext in '' $ac_executable_extensions; do
26830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26831    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26833    break 2
26834  fi
26835done
26836  done
26837IFS=$as_save_IFS
26838
26839  ;;
26840esac
26841fi
26842JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26843if test -n "$JAVAC_CHECK"; then
26844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26845$as_echo "$JAVAC_CHECK" >&6; }
26846else
26847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26848$as_echo "no" >&6; }
26849fi
26850
26851
26852  # Extract the first word of "java", so it can be a program name with args.
26853set dummy java; ac_word=$2
26854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26855$as_echo_n "checking for $ac_word... " >&6; }
26856if ${ac_cv_path_JAVA_CHECK+:} false; then :
26857  $as_echo_n "(cached) " >&6
26858else
26859  case $JAVA_CHECK in
26860  [\\/]* | ?:[\\/]*)
26861  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26862  ;;
26863  *)
26864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26865for as_dir in $PATH
26866do
26867  IFS=$as_save_IFS
26868  test -z "$as_dir" && as_dir=.
26869    for ac_exec_ext in '' $ac_executable_extensions; do
26870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26871    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26873    break 2
26874  fi
26875done
26876  done
26877IFS=$as_save_IFS
26878
26879  ;;
26880esac
26881fi
26882JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26883if test -n "$JAVA_CHECK"; then
26884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26885$as_echo "$JAVA_CHECK" >&6; }
26886else
26887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26888$as_echo "no" >&6; }
26889fi
26890
26891
26892  BINARY="$JAVAC_CHECK"
26893  if test "x$JAVAC_CHECK" = x; then
26894    BINARY="$JAVA_CHECK"
26895  fi
26896  if test "x$BINARY" != x; then
26897    # So there is a java(c) binary, it might be part of a JDK.
26898    # Lets find the JDK/JRE directory by following symbolic links.
26899    # Linux/GNU systems often have links from /usr/bin/java to
26900    # /etc/alternatives/java to the real JDK binary.
26901
26902  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26903    # Follow a chain of symbolic links. Use readlink
26904    # where it exists, else fall back to horribly
26905    # complicated shell code.
26906    if test "x$READLINK_TESTED" != yes; then
26907      # On MacOSX there is a readlink tool with a different
26908      # purpose than the GNU readlink tool. Check the found readlink.
26909      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26910      if test "x$ISGNU" = x; then
26911        # A readlink that we do not know how to use.
26912        # Are there other non-GNU readlinks out there?
26913        READLINK_TESTED=yes
26914        READLINK=
26915      fi
26916    fi
26917
26918    if test "x$READLINK" != x; then
26919      BINARY=`$READLINK -f $BINARY`
26920    else
26921      # Save the current directory for restoring afterwards
26922      STARTDIR=$PWD
26923      COUNTER=0
26924      sym_link_dir=`$DIRNAME $BINARY`
26925      sym_link_file=`$BASENAME $BINARY`
26926      cd $sym_link_dir
26927      # Use -P flag to resolve symlinks in directories.
26928      cd `$THEPWDCMD -P`
26929      sym_link_dir=`$THEPWDCMD -P`
26930      # Resolve file symlinks
26931      while test $COUNTER -lt 20; do
26932        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26933        if test "x$ISLINK" == x; then
26934          # This is not a symbolic link! We are done!
26935          break
26936        fi
26937        # Again resolve directory symlinks since the target of the just found
26938        # link could be in a different directory
26939        cd `$DIRNAME $ISLINK`
26940        sym_link_dir=`$THEPWDCMD -P`
26941        sym_link_file=`$BASENAME $ISLINK`
26942        let COUNTER=COUNTER+1
26943      done
26944      cd $STARTDIR
26945      BINARY=$sym_link_dir/$sym_link_file
26946    fi
26947  fi
26948
26949    BOOT_JDK=`dirname "$BINARY"`
26950    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26951    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26952      # Looks like we found ourselves an JDK
26953      BOOT_JDK_FOUND=maybe
26954      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26955$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26956    fi
26957  fi
26958
26959
26960    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26961    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26962      # Do we have a bin/java?
26963      if test ! -x "$BOOT_JDK/bin/java"; then
26964        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26966        BOOT_JDK_FOUND=no
26967      else
26968        # Do we have a bin/javac?
26969        if test ! -x "$BOOT_JDK/bin/javac"; then
26970          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26972          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26973$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26974          BOOT_JDK_FOUND=no
26975        else
26976          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26977          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26978
26979          # Extra M4 quote needed to protect [] in grep expression.
26980          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26981          if test "x$FOUND_CORRECT_VERSION" = x; then
26982            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26984            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26985$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26986            BOOT_JDK_FOUND=no
26987          else
26988            # We're done! :-)
26989            BOOT_JDK_FOUND=yes
26990
26991  # Only process if variable expands to non-empty
26992
26993  if test "x$BOOT_JDK" != x; then
26994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26995
26996  # Input might be given as Windows format, start by converting to
26997  # unix format.
26998  path="$BOOT_JDK"
26999  new_path=`$CYGPATH -u "$path"`
27000
27001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27004  # "foo.exe" is OK but "foo" is an error.
27005  #
27006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27007  # It is also a way to make sure we got the proper file name for the real test later on.
27008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27009  if test "x$test_shortpath" = x; then
27010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27012    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27013  fi
27014
27015  # Call helper function which possibly converts this using DOS-style short mode.
27016  # If so, the updated path is stored in $new_path.
27017
27018  input_path="$new_path"
27019  # Check if we need to convert this using DOS-style short mode. If the path
27020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27021  # take no chances and rewrite it.
27022  # Note: m4 eats our [], so we need to use [ and ] instead.
27023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27024  if test "x$has_forbidden_chars" != x; then
27025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27029      # Going to short mode and back again did indeed matter. Since short mode is
27030      # case insensitive, let's make it lowercase to improve readability.
27031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27032      # Now convert it back to Unix-style (cygpath)
27033      input_path=`$CYGPATH -u "$shortmode_path"`
27034      new_path="$input_path"
27035    fi
27036  fi
27037
27038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27039  if test "x$test_cygdrive_prefix" = x; then
27040    # As a simple fix, exclude /usr/bin since it's not a real path.
27041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27043      # a path prefixed by /cygdrive for fixpath to work.
27044      new_path="$CYGWIN_ROOT_PATH$input_path"
27045    fi
27046  fi
27047
27048
27049  if test "x$path" != "x$new_path"; then
27050    BOOT_JDK="$new_path"
27051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27053  fi
27054
27055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27056
27057  path="$BOOT_JDK"
27058  has_colon=`$ECHO $path | $GREP ^.:`
27059  new_path="$path"
27060  if test "x$has_colon" = x; then
27061    # Not in mixed or Windows style, start by that.
27062    new_path=`cmd //c echo $path`
27063  fi
27064
27065
27066  input_path="$new_path"
27067  # Check if we need to convert this using DOS-style short mode. If the path
27068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27069  # take no chances and rewrite it.
27070  # Note: m4 eats our [], so we need to use [ and ] instead.
27071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27072  if test "x$has_forbidden_chars" != x; then
27073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27075  fi
27076
27077
27078  windows_path="$new_path"
27079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27080    unix_path=`$CYGPATH -u "$windows_path"`
27081    new_path="$unix_path"
27082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27084    new_path="$unix_path"
27085  fi
27086
27087  if test "x$path" != "x$new_path"; then
27088    BOOT_JDK="$new_path"
27089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27091  fi
27092
27093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27095
27096    else
27097      # We're on a unix platform. Hooray! :)
27098      path="$BOOT_JDK"
27099      has_space=`$ECHO "$path" | $GREP " "`
27100      if test "x$has_space" != x; then
27101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27104      fi
27105
27106      # Use eval to expand a potential ~
27107      eval path="$path"
27108      if test ! -f "$path" && test ! -d "$path"; then
27109        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27110      fi
27111
27112      if test -d "$path"; then
27113        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27114      else
27115        dir="`$DIRNAME "$path"`"
27116        base="`$BASENAME "$path"`"
27117        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27118      fi
27119    fi
27120  fi
27121
27122            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27123$as_echo_n "checking for Boot JDK... " >&6; }
27124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27125$as_echo "$BOOT_JDK" >&6; }
27126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27127$as_echo_n "checking Boot JDK version... " >&6; }
27128            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27130$as_echo "$BOOT_JDK_VERSION" >&6; }
27131          fi # end check jdk version
27132        fi # end check javac
27133      fi # end check java
27134    fi # end check boot jdk found
27135  fi
27136
27137
27138  # Test: Is there a JDK installed in default, well-known locations?
27139
27140  if test "x$BOOT_JDK_FOUND" = xno; then
27141    # Now execute the test
27142
27143  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27144
27145  if test "x$BOOT_JDK_FOUND" = xno; then
27146    # Now execute the test
27147
27148  if test "x$ProgramW6432" != x; then
27149    VIRTUAL_DIR="$ProgramW6432/Java"
27150
27151  windows_path="$VIRTUAL_DIR"
27152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27153    unix_path=`$CYGPATH -u "$windows_path"`
27154    VIRTUAL_DIR="$unix_path"
27155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27157    VIRTUAL_DIR="$unix_path"
27158  fi
27159
27160
27161  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27162  BOOT_JDK_SUFFIX=""
27163  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27164  if test "x$ALL_JDKS_FOUND" != x; then
27165    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27166
27167  if test "x$BOOT_JDK_FOUND" = xno; then
27168    # Now execute the test
27169
27170        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27171        if test -d "$BOOT_JDK"; then
27172          BOOT_JDK_FOUND=maybe
27173          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27174$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27175        fi
27176
27177
27178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27180      # Do we have a bin/java?
27181      if test ! -x "$BOOT_JDK/bin/java"; then
27182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27184        BOOT_JDK_FOUND=no
27185      else
27186        # Do we have a bin/javac?
27187        if test ! -x "$BOOT_JDK/bin/javac"; then
27188          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27190          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27192          BOOT_JDK_FOUND=no
27193        else
27194          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27195          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27196
27197          # Extra M4 quote needed to protect [] in grep expression.
27198          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27199          if test "x$FOUND_CORRECT_VERSION" = x; then
27200            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27202            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27203$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27204            BOOT_JDK_FOUND=no
27205          else
27206            # We're done! :-)
27207            BOOT_JDK_FOUND=yes
27208
27209  # Only process if variable expands to non-empty
27210
27211  if test "x$BOOT_JDK" != x; then
27212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27213
27214  # Input might be given as Windows format, start by converting to
27215  # unix format.
27216  path="$BOOT_JDK"
27217  new_path=`$CYGPATH -u "$path"`
27218
27219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27222  # "foo.exe" is OK but "foo" is an error.
27223  #
27224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27225  # It is also a way to make sure we got the proper file name for the real test later on.
27226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27227  if test "x$test_shortpath" = x; then
27228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27230    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27231  fi
27232
27233  # Call helper function which possibly converts this using DOS-style short mode.
27234  # If so, the updated path is stored in $new_path.
27235
27236  input_path="$new_path"
27237  # Check if we need to convert this using DOS-style short mode. If the path
27238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27239  # take no chances and rewrite it.
27240  # Note: m4 eats our [], so we need to use [ and ] instead.
27241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27242  if test "x$has_forbidden_chars" != x; then
27243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27247      # Going to short mode and back again did indeed matter. Since short mode is
27248      # case insensitive, let's make it lowercase to improve readability.
27249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27250      # Now convert it back to Unix-style (cygpath)
27251      input_path=`$CYGPATH -u "$shortmode_path"`
27252      new_path="$input_path"
27253    fi
27254  fi
27255
27256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27257  if test "x$test_cygdrive_prefix" = x; then
27258    # As a simple fix, exclude /usr/bin since it's not a real path.
27259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27261      # a path prefixed by /cygdrive for fixpath to work.
27262      new_path="$CYGWIN_ROOT_PATH$input_path"
27263    fi
27264  fi
27265
27266
27267  if test "x$path" != "x$new_path"; then
27268    BOOT_JDK="$new_path"
27269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27271  fi
27272
27273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27274
27275  path="$BOOT_JDK"
27276  has_colon=`$ECHO $path | $GREP ^.:`
27277  new_path="$path"
27278  if test "x$has_colon" = x; then
27279    # Not in mixed or Windows style, start by that.
27280    new_path=`cmd //c echo $path`
27281  fi
27282
27283
27284  input_path="$new_path"
27285  # Check if we need to convert this using DOS-style short mode. If the path
27286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27287  # take no chances and rewrite it.
27288  # Note: m4 eats our [], so we need to use [ and ] instead.
27289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27290  if test "x$has_forbidden_chars" != x; then
27291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27293  fi
27294
27295
27296  windows_path="$new_path"
27297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27298    unix_path=`$CYGPATH -u "$windows_path"`
27299    new_path="$unix_path"
27300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27302    new_path="$unix_path"
27303  fi
27304
27305  if test "x$path" != "x$new_path"; then
27306    BOOT_JDK="$new_path"
27307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27309  fi
27310
27311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27313
27314    else
27315      # We're on a unix platform. Hooray! :)
27316      path="$BOOT_JDK"
27317      has_space=`$ECHO "$path" | $GREP " "`
27318      if test "x$has_space" != x; then
27319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27322      fi
27323
27324      # Use eval to expand a potential ~
27325      eval path="$path"
27326      if test ! -f "$path" && test ! -d "$path"; then
27327        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27328      fi
27329
27330      if test -d "$path"; then
27331        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27332      else
27333        dir="`$DIRNAME "$path"`"
27334        base="`$BASENAME "$path"`"
27335        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27336      fi
27337    fi
27338  fi
27339
27340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27341$as_echo_n "checking for Boot JDK... " >&6; }
27342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27343$as_echo "$BOOT_JDK" >&6; }
27344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27345$as_echo_n "checking Boot JDK version... " >&6; }
27346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27348$as_echo "$BOOT_JDK_VERSION" >&6; }
27349          fi # end check jdk version
27350        fi # end check javac
27351      fi # end check java
27352    fi # end check boot jdk found
27353  fi
27354
27355    done
27356  fi
27357
27358  fi
27359
27360
27361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27363      # Do we have a bin/java?
27364      if test ! -x "$BOOT_JDK/bin/java"; then
27365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27367        BOOT_JDK_FOUND=no
27368      else
27369        # Do we have a bin/javac?
27370        if test ! -x "$BOOT_JDK/bin/javac"; then
27371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27375          BOOT_JDK_FOUND=no
27376        else
27377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27379
27380          # Extra M4 quote needed to protect [] in grep expression.
27381          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27382          if test "x$FOUND_CORRECT_VERSION" = x; then
27383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27387            BOOT_JDK_FOUND=no
27388          else
27389            # We're done! :-)
27390            BOOT_JDK_FOUND=yes
27391
27392  # Only process if variable expands to non-empty
27393
27394  if test "x$BOOT_JDK" != x; then
27395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27396
27397  # Input might be given as Windows format, start by converting to
27398  # unix format.
27399  path="$BOOT_JDK"
27400  new_path=`$CYGPATH -u "$path"`
27401
27402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27405  # "foo.exe" is OK but "foo" is an error.
27406  #
27407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27408  # It is also a way to make sure we got the proper file name for the real test later on.
27409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27410  if test "x$test_shortpath" = x; then
27411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27414  fi
27415
27416  # Call helper function which possibly converts this using DOS-style short mode.
27417  # If so, the updated path is stored in $new_path.
27418
27419  input_path="$new_path"
27420  # Check if we need to convert this using DOS-style short mode. If the path
27421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27422  # take no chances and rewrite it.
27423  # Note: m4 eats our [], so we need to use [ and ] instead.
27424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27425  if test "x$has_forbidden_chars" != x; then
27426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27430      # Going to short mode and back again did indeed matter. Since short mode is
27431      # case insensitive, let's make it lowercase to improve readability.
27432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27433      # Now convert it back to Unix-style (cygpath)
27434      input_path=`$CYGPATH -u "$shortmode_path"`
27435      new_path="$input_path"
27436    fi
27437  fi
27438
27439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27440  if test "x$test_cygdrive_prefix" = x; then
27441    # As a simple fix, exclude /usr/bin since it's not a real path.
27442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27444      # a path prefixed by /cygdrive for fixpath to work.
27445      new_path="$CYGWIN_ROOT_PATH$input_path"
27446    fi
27447  fi
27448
27449
27450  if test "x$path" != "x$new_path"; then
27451    BOOT_JDK="$new_path"
27452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27454  fi
27455
27456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457
27458  path="$BOOT_JDK"
27459  has_colon=`$ECHO $path | $GREP ^.:`
27460  new_path="$path"
27461  if test "x$has_colon" = x; then
27462    # Not in mixed or Windows style, start by that.
27463    new_path=`cmd //c echo $path`
27464  fi
27465
27466
27467  input_path="$new_path"
27468  # Check if we need to convert this using DOS-style short mode. If the path
27469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27470  # take no chances and rewrite it.
27471  # Note: m4 eats our [], so we need to use [ and ] instead.
27472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27473  if test "x$has_forbidden_chars" != x; then
27474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27476  fi
27477
27478
27479  windows_path="$new_path"
27480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27481    unix_path=`$CYGPATH -u "$windows_path"`
27482    new_path="$unix_path"
27483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27485    new_path="$unix_path"
27486  fi
27487
27488  if test "x$path" != "x$new_path"; then
27489    BOOT_JDK="$new_path"
27490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27492  fi
27493
27494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27496
27497    else
27498      # We're on a unix platform. Hooray! :)
27499      path="$BOOT_JDK"
27500      has_space=`$ECHO "$path" | $GREP " "`
27501      if test "x$has_space" != x; then
27502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27505      fi
27506
27507      # Use eval to expand a potential ~
27508      eval path="$path"
27509      if test ! -f "$path" && test ! -d "$path"; then
27510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27511      fi
27512
27513      if test -d "$path"; then
27514        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27515      else
27516        dir="`$DIRNAME "$path"`"
27517        base="`$BASENAME "$path"`"
27518        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27519      fi
27520    fi
27521  fi
27522
27523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27524$as_echo_n "checking for Boot JDK... " >&6; }
27525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27526$as_echo "$BOOT_JDK" >&6; }
27527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27528$as_echo_n "checking Boot JDK version... " >&6; }
27529            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27531$as_echo "$BOOT_JDK_VERSION" >&6; }
27532          fi # end check jdk version
27533        fi # end check javac
27534      fi # end check java
27535    fi # end check boot jdk found
27536  fi
27537
27538
27539  if test "x$BOOT_JDK_FOUND" = xno; then
27540    # Now execute the test
27541
27542  if test "x$PROGRAMW6432" != x; then
27543    VIRTUAL_DIR="$PROGRAMW6432/Java"
27544
27545  windows_path="$VIRTUAL_DIR"
27546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27547    unix_path=`$CYGPATH -u "$windows_path"`
27548    VIRTUAL_DIR="$unix_path"
27549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27551    VIRTUAL_DIR="$unix_path"
27552  fi
27553
27554
27555  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27556  BOOT_JDK_SUFFIX=""
27557  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27558  if test "x$ALL_JDKS_FOUND" != x; then
27559    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27560
27561  if test "x$BOOT_JDK_FOUND" = xno; then
27562    # Now execute the test
27563
27564        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27565        if test -d "$BOOT_JDK"; then
27566          BOOT_JDK_FOUND=maybe
27567          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27568$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27569        fi
27570
27571
27572    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27573    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27574      # Do we have a bin/java?
27575      if test ! -x "$BOOT_JDK/bin/java"; then
27576        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27577$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27578        BOOT_JDK_FOUND=no
27579      else
27580        # Do we have a bin/javac?
27581        if test ! -x "$BOOT_JDK/bin/javac"; then
27582          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27584          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27585$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27586          BOOT_JDK_FOUND=no
27587        else
27588          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27589          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27590
27591          # Extra M4 quote needed to protect [] in grep expression.
27592          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27593          if test "x$FOUND_CORRECT_VERSION" = x; then
27594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27596            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27597$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27598            BOOT_JDK_FOUND=no
27599          else
27600            # We're done! :-)
27601            BOOT_JDK_FOUND=yes
27602
27603  # Only process if variable expands to non-empty
27604
27605  if test "x$BOOT_JDK" != x; then
27606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27607
27608  # Input might be given as Windows format, start by converting to
27609  # unix format.
27610  path="$BOOT_JDK"
27611  new_path=`$CYGPATH -u "$path"`
27612
27613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27616  # "foo.exe" is OK but "foo" is an error.
27617  #
27618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27619  # It is also a way to make sure we got the proper file name for the real test later on.
27620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27621  if test "x$test_shortpath" = x; then
27622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27624    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27625  fi
27626
27627  # Call helper function which possibly converts this using DOS-style short mode.
27628  # If so, the updated path is stored in $new_path.
27629
27630  input_path="$new_path"
27631  # Check if we need to convert this using DOS-style short mode. If the path
27632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27633  # take no chances and rewrite it.
27634  # Note: m4 eats our [], so we need to use [ and ] instead.
27635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27636  if test "x$has_forbidden_chars" != x; then
27637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27641      # Going to short mode and back again did indeed matter. Since short mode is
27642      # case insensitive, let's make it lowercase to improve readability.
27643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27644      # Now convert it back to Unix-style (cygpath)
27645      input_path=`$CYGPATH -u "$shortmode_path"`
27646      new_path="$input_path"
27647    fi
27648  fi
27649
27650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27651  if test "x$test_cygdrive_prefix" = x; then
27652    # As a simple fix, exclude /usr/bin since it's not a real path.
27653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27655      # a path prefixed by /cygdrive for fixpath to work.
27656      new_path="$CYGWIN_ROOT_PATH$input_path"
27657    fi
27658  fi
27659
27660
27661  if test "x$path" != "x$new_path"; then
27662    BOOT_JDK="$new_path"
27663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27665  fi
27666
27667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27668
27669  path="$BOOT_JDK"
27670  has_colon=`$ECHO $path | $GREP ^.:`
27671  new_path="$path"
27672  if test "x$has_colon" = x; then
27673    # Not in mixed or Windows style, start by that.
27674    new_path=`cmd //c echo $path`
27675  fi
27676
27677
27678  input_path="$new_path"
27679  # Check if we need to convert this using DOS-style short mode. If the path
27680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27681  # take no chances and rewrite it.
27682  # Note: m4 eats our [], so we need to use [ and ] instead.
27683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27684  if test "x$has_forbidden_chars" != x; then
27685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27687  fi
27688
27689
27690  windows_path="$new_path"
27691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27692    unix_path=`$CYGPATH -u "$windows_path"`
27693    new_path="$unix_path"
27694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27696    new_path="$unix_path"
27697  fi
27698
27699  if test "x$path" != "x$new_path"; then
27700    BOOT_JDK="$new_path"
27701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27702$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27703  fi
27704
27705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27707
27708    else
27709      # We're on a unix platform. Hooray! :)
27710      path="$BOOT_JDK"
27711      has_space=`$ECHO "$path" | $GREP " "`
27712      if test "x$has_space" != x; then
27713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27714$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27716      fi
27717
27718      # Use eval to expand a potential ~
27719      eval path="$path"
27720      if test ! -f "$path" && test ! -d "$path"; then
27721        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27722      fi
27723
27724      if test -d "$path"; then
27725        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27726      else
27727        dir="`$DIRNAME "$path"`"
27728        base="`$BASENAME "$path"`"
27729        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27730      fi
27731    fi
27732  fi
27733
27734            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27735$as_echo_n "checking for Boot JDK... " >&6; }
27736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27737$as_echo "$BOOT_JDK" >&6; }
27738            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27739$as_echo_n "checking Boot JDK version... " >&6; }
27740            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27742$as_echo "$BOOT_JDK_VERSION" >&6; }
27743          fi # end check jdk version
27744        fi # end check javac
27745      fi # end check java
27746    fi # end check boot jdk found
27747  fi
27748
27749    done
27750  fi
27751
27752  fi
27753
27754
27755    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27756    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27757      # Do we have a bin/java?
27758      if test ! -x "$BOOT_JDK/bin/java"; then
27759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27761        BOOT_JDK_FOUND=no
27762      else
27763        # Do we have a bin/javac?
27764        if test ! -x "$BOOT_JDK/bin/javac"; then
27765          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27767          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27768$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27769          BOOT_JDK_FOUND=no
27770        else
27771          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27772          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27773
27774          # Extra M4 quote needed to protect [] in grep expression.
27775          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27776          if test "x$FOUND_CORRECT_VERSION" = x; then
27777            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27779            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27780$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27781            BOOT_JDK_FOUND=no
27782          else
27783            # We're done! :-)
27784            BOOT_JDK_FOUND=yes
27785
27786  # Only process if variable expands to non-empty
27787
27788  if test "x$BOOT_JDK" != x; then
27789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27790
27791  # Input might be given as Windows format, start by converting to
27792  # unix format.
27793  path="$BOOT_JDK"
27794  new_path=`$CYGPATH -u "$path"`
27795
27796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27799  # "foo.exe" is OK but "foo" is an error.
27800  #
27801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27802  # It is also a way to make sure we got the proper file name for the real test later on.
27803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27804  if test "x$test_shortpath" = x; then
27805    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27806$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27807    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27808  fi
27809
27810  # Call helper function which possibly converts this using DOS-style short mode.
27811  # If so, the updated path is stored in $new_path.
27812
27813  input_path="$new_path"
27814  # Check if we need to convert this using DOS-style short mode. If the path
27815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27816  # take no chances and rewrite it.
27817  # Note: m4 eats our [], so we need to use [ and ] instead.
27818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27819  if test "x$has_forbidden_chars" != x; then
27820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27821    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27822    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27823    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27824      # Going to short mode and back again did indeed matter. Since short mode is
27825      # case insensitive, let's make it lowercase to improve readability.
27826      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27827      # Now convert it back to Unix-style (cygpath)
27828      input_path=`$CYGPATH -u "$shortmode_path"`
27829      new_path="$input_path"
27830    fi
27831  fi
27832
27833  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27834  if test "x$test_cygdrive_prefix" = x; then
27835    # As a simple fix, exclude /usr/bin since it's not a real path.
27836    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27837      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27838      # a path prefixed by /cygdrive for fixpath to work.
27839      new_path="$CYGWIN_ROOT_PATH$input_path"
27840    fi
27841  fi
27842
27843
27844  if test "x$path" != "x$new_path"; then
27845    BOOT_JDK="$new_path"
27846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27848  fi
27849
27850    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27851
27852  path="$BOOT_JDK"
27853  has_colon=`$ECHO $path | $GREP ^.:`
27854  new_path="$path"
27855  if test "x$has_colon" = x; then
27856    # Not in mixed or Windows style, start by that.
27857    new_path=`cmd //c echo $path`
27858  fi
27859
27860
27861  input_path="$new_path"
27862  # Check if we need to convert this using DOS-style short mode. If the path
27863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27864  # take no chances and rewrite it.
27865  # Note: m4 eats our [], so we need to use [ and ] instead.
27866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27867  if test "x$has_forbidden_chars" != x; then
27868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27870  fi
27871
27872
27873  windows_path="$new_path"
27874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27875    unix_path=`$CYGPATH -u "$windows_path"`
27876    new_path="$unix_path"
27877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27879    new_path="$unix_path"
27880  fi
27881
27882  if test "x$path" != "x$new_path"; then
27883    BOOT_JDK="$new_path"
27884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27886  fi
27887
27888  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27889  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27890
27891    else
27892      # We're on a unix platform. Hooray! :)
27893      path="$BOOT_JDK"
27894      has_space=`$ECHO "$path" | $GREP " "`
27895      if test "x$has_space" != x; then
27896        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27898        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27899      fi
27900
27901      # Use eval to expand a potential ~
27902      eval path="$path"
27903      if test ! -f "$path" && test ! -d "$path"; then
27904        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27905      fi
27906
27907      if test -d "$path"; then
27908        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27909      else
27910        dir="`$DIRNAME "$path"`"
27911        base="`$BASENAME "$path"`"
27912        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27913      fi
27914    fi
27915  fi
27916
27917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27918$as_echo_n "checking for Boot JDK... " >&6; }
27919            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27920$as_echo "$BOOT_JDK" >&6; }
27921            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27922$as_echo_n "checking Boot JDK version... " >&6; }
27923            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27925$as_echo "$BOOT_JDK_VERSION" >&6; }
27926          fi # end check jdk version
27927        fi # end check javac
27928      fi # end check java
27929    fi # end check boot jdk found
27930  fi
27931
27932
27933  if test "x$BOOT_JDK_FOUND" = xno; then
27934    # Now execute the test
27935
27936  if test "x$PROGRAMFILES" != x; then
27937    VIRTUAL_DIR="$PROGRAMFILES/Java"
27938
27939  windows_path="$VIRTUAL_DIR"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    VIRTUAL_DIR="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    VIRTUAL_DIR="$unix_path"
27946  fi
27947
27948
27949  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27950  BOOT_JDK_SUFFIX=""
27951  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27952  if test "x$ALL_JDKS_FOUND" != x; then
27953    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27954
27955  if test "x$BOOT_JDK_FOUND" = xno; then
27956    # Now execute the test
27957
27958        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27959        if test -d "$BOOT_JDK"; then
27960          BOOT_JDK_FOUND=maybe
27961          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27962$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27963        fi
27964
27965
27966    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27967    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27968      # Do we have a bin/java?
27969      if test ! -x "$BOOT_JDK/bin/java"; then
27970        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27972        BOOT_JDK_FOUND=no
27973      else
27974        # Do we have a bin/javac?
27975        if test ! -x "$BOOT_JDK/bin/javac"; then
27976          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27978          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27979$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27980          BOOT_JDK_FOUND=no
27981        else
27982          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27983          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27984
27985          # Extra M4 quote needed to protect [] in grep expression.
27986          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27987          if test "x$FOUND_CORRECT_VERSION" = x; then
27988            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27990            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27991$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27992            BOOT_JDK_FOUND=no
27993          else
27994            # We're done! :-)
27995            BOOT_JDK_FOUND=yes
27996
27997  # Only process if variable expands to non-empty
27998
27999  if test "x$BOOT_JDK" != x; then
28000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28001
28002  # Input might be given as Windows format, start by converting to
28003  # unix format.
28004  path="$BOOT_JDK"
28005  new_path=`$CYGPATH -u "$path"`
28006
28007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28010  # "foo.exe" is OK but "foo" is an error.
28011  #
28012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28013  # It is also a way to make sure we got the proper file name for the real test later on.
28014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28015  if test "x$test_shortpath" = x; then
28016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28018    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28019  fi
28020
28021  # Call helper function which possibly converts this using DOS-style short mode.
28022  # If so, the updated path is stored in $new_path.
28023
28024  input_path="$new_path"
28025  # Check if we need to convert this using DOS-style short mode. If the path
28026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28027  # take no chances and rewrite it.
28028  # Note: m4 eats our [], so we need to use [ and ] instead.
28029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28030  if test "x$has_forbidden_chars" != x; then
28031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28035      # Going to short mode and back again did indeed matter. Since short mode is
28036      # case insensitive, let's make it lowercase to improve readability.
28037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28038      # Now convert it back to Unix-style (cygpath)
28039      input_path=`$CYGPATH -u "$shortmode_path"`
28040      new_path="$input_path"
28041    fi
28042  fi
28043
28044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28045  if test "x$test_cygdrive_prefix" = x; then
28046    # As a simple fix, exclude /usr/bin since it's not a real path.
28047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28049      # a path prefixed by /cygdrive for fixpath to work.
28050      new_path="$CYGWIN_ROOT_PATH$input_path"
28051    fi
28052  fi
28053
28054
28055  if test "x$path" != "x$new_path"; then
28056    BOOT_JDK="$new_path"
28057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28058$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28059  fi
28060
28061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28062
28063  path="$BOOT_JDK"
28064  has_colon=`$ECHO $path | $GREP ^.:`
28065  new_path="$path"
28066  if test "x$has_colon" = x; then
28067    # Not in mixed or Windows style, start by that.
28068    new_path=`cmd //c echo $path`
28069  fi
28070
28071
28072  input_path="$new_path"
28073  # Check if we need to convert this using DOS-style short mode. If the path
28074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28075  # take no chances and rewrite it.
28076  # Note: m4 eats our [], so we need to use [ and ] instead.
28077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28078  if test "x$has_forbidden_chars" != x; then
28079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28081  fi
28082
28083
28084  windows_path="$new_path"
28085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28086    unix_path=`$CYGPATH -u "$windows_path"`
28087    new_path="$unix_path"
28088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28090    new_path="$unix_path"
28091  fi
28092
28093  if test "x$path" != "x$new_path"; then
28094    BOOT_JDK="$new_path"
28095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28096$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28097  fi
28098
28099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28101
28102    else
28103      # We're on a unix platform. Hooray! :)
28104      path="$BOOT_JDK"
28105      has_space=`$ECHO "$path" | $GREP " "`
28106      if test "x$has_space" != x; then
28107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28108$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28110      fi
28111
28112      # Use eval to expand a potential ~
28113      eval path="$path"
28114      if test ! -f "$path" && test ! -d "$path"; then
28115        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28116      fi
28117
28118      if test -d "$path"; then
28119        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28120      else
28121        dir="`$DIRNAME "$path"`"
28122        base="`$BASENAME "$path"`"
28123        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28124      fi
28125    fi
28126  fi
28127
28128            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28129$as_echo_n "checking for Boot JDK... " >&6; }
28130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28131$as_echo "$BOOT_JDK" >&6; }
28132            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28133$as_echo_n "checking Boot JDK version... " >&6; }
28134            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28136$as_echo "$BOOT_JDK_VERSION" >&6; }
28137          fi # end check jdk version
28138        fi # end check javac
28139      fi # end check java
28140    fi # end check boot jdk found
28141  fi
28142
28143    done
28144  fi
28145
28146  fi
28147
28148
28149    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28150    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28151      # Do we have a bin/java?
28152      if test ! -x "$BOOT_JDK/bin/java"; then
28153        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28154$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28155        BOOT_JDK_FOUND=no
28156      else
28157        # Do we have a bin/javac?
28158        if test ! -x "$BOOT_JDK/bin/javac"; then
28159          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28161          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28162$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28163          BOOT_JDK_FOUND=no
28164        else
28165          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28166          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28167
28168          # Extra M4 quote needed to protect [] in grep expression.
28169          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28170          if test "x$FOUND_CORRECT_VERSION" = x; then
28171            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28172$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28173            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28174$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28175            BOOT_JDK_FOUND=no
28176          else
28177            # We're done! :-)
28178            BOOT_JDK_FOUND=yes
28179
28180  # Only process if variable expands to non-empty
28181
28182  if test "x$BOOT_JDK" != x; then
28183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28184
28185  # Input might be given as Windows format, start by converting to
28186  # unix format.
28187  path="$BOOT_JDK"
28188  new_path=`$CYGPATH -u "$path"`
28189
28190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28193  # "foo.exe" is OK but "foo" is an error.
28194  #
28195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28196  # It is also a way to make sure we got the proper file name for the real test later on.
28197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28198  if test "x$test_shortpath" = x; then
28199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28201    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28202  fi
28203
28204  # Call helper function which possibly converts this using DOS-style short mode.
28205  # If so, the updated path is stored in $new_path.
28206
28207  input_path="$new_path"
28208  # Check if we need to convert this using DOS-style short mode. If the path
28209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28210  # take no chances and rewrite it.
28211  # Note: m4 eats our [], so we need to use [ and ] instead.
28212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28213  if test "x$has_forbidden_chars" != x; then
28214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28218      # Going to short mode and back again did indeed matter. Since short mode is
28219      # case insensitive, let's make it lowercase to improve readability.
28220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28221      # Now convert it back to Unix-style (cygpath)
28222      input_path=`$CYGPATH -u "$shortmode_path"`
28223      new_path="$input_path"
28224    fi
28225  fi
28226
28227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28228  if test "x$test_cygdrive_prefix" = x; then
28229    # As a simple fix, exclude /usr/bin since it's not a real path.
28230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28232      # a path prefixed by /cygdrive for fixpath to work.
28233      new_path="$CYGWIN_ROOT_PATH$input_path"
28234    fi
28235  fi
28236
28237
28238  if test "x$path" != "x$new_path"; then
28239    BOOT_JDK="$new_path"
28240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28241$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28242  fi
28243
28244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28245
28246  path="$BOOT_JDK"
28247  has_colon=`$ECHO $path | $GREP ^.:`
28248  new_path="$path"
28249  if test "x$has_colon" = x; then
28250    # Not in mixed or Windows style, start by that.
28251    new_path=`cmd //c echo $path`
28252  fi
28253
28254
28255  input_path="$new_path"
28256  # Check if we need to convert this using DOS-style short mode. If the path
28257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28258  # take no chances and rewrite it.
28259  # Note: m4 eats our [], so we need to use [ and ] instead.
28260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28261  if test "x$has_forbidden_chars" != x; then
28262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28264  fi
28265
28266
28267  windows_path="$new_path"
28268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28269    unix_path=`$CYGPATH -u "$windows_path"`
28270    new_path="$unix_path"
28271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28273    new_path="$unix_path"
28274  fi
28275
28276  if test "x$path" != "x$new_path"; then
28277    BOOT_JDK="$new_path"
28278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28280  fi
28281
28282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28284
28285    else
28286      # We're on a unix platform. Hooray! :)
28287      path="$BOOT_JDK"
28288      has_space=`$ECHO "$path" | $GREP " "`
28289      if test "x$has_space" != x; then
28290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28293      fi
28294
28295      # Use eval to expand a potential ~
28296      eval path="$path"
28297      if test ! -f "$path" && test ! -d "$path"; then
28298        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28299      fi
28300
28301      if test -d "$path"; then
28302        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28303      else
28304        dir="`$DIRNAME "$path"`"
28305        base="`$BASENAME "$path"`"
28306        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28307      fi
28308    fi
28309  fi
28310
28311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28312$as_echo_n "checking for Boot JDK... " >&6; }
28313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28314$as_echo "$BOOT_JDK" >&6; }
28315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28316$as_echo_n "checking Boot JDK version... " >&6; }
28317            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28319$as_echo "$BOOT_JDK_VERSION" >&6; }
28320          fi # end check jdk version
28321        fi # end check javac
28322      fi # end check java
28323    fi # end check boot jdk found
28324  fi
28325
28326
28327  if test "x$BOOT_JDK_FOUND" = xno; then
28328    # Now execute the test
28329
28330  if test "x$ProgramFiles" != x; then
28331    VIRTUAL_DIR="$ProgramFiles/Java"
28332
28333  windows_path="$VIRTUAL_DIR"
28334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28335    unix_path=`$CYGPATH -u "$windows_path"`
28336    VIRTUAL_DIR="$unix_path"
28337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28339    VIRTUAL_DIR="$unix_path"
28340  fi
28341
28342
28343  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28344  BOOT_JDK_SUFFIX=""
28345  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28346  if test "x$ALL_JDKS_FOUND" != x; then
28347    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28348
28349  if test "x$BOOT_JDK_FOUND" = xno; then
28350    # Now execute the test
28351
28352        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28353        if test -d "$BOOT_JDK"; then
28354          BOOT_JDK_FOUND=maybe
28355          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28356$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28357        fi
28358
28359
28360    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28361    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28362      # Do we have a bin/java?
28363      if test ! -x "$BOOT_JDK/bin/java"; then
28364        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28366        BOOT_JDK_FOUND=no
28367      else
28368        # Do we have a bin/javac?
28369        if test ! -x "$BOOT_JDK/bin/javac"; then
28370          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28372          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28373$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28374          BOOT_JDK_FOUND=no
28375        else
28376          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28377          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28378
28379          # Extra M4 quote needed to protect [] in grep expression.
28380          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28381          if test "x$FOUND_CORRECT_VERSION" = x; then
28382            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28384            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28385$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28386            BOOT_JDK_FOUND=no
28387          else
28388            # We're done! :-)
28389            BOOT_JDK_FOUND=yes
28390
28391  # Only process if variable expands to non-empty
28392
28393  if test "x$BOOT_JDK" != x; then
28394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28395
28396  # Input might be given as Windows format, start by converting to
28397  # unix format.
28398  path="$BOOT_JDK"
28399  new_path=`$CYGPATH -u "$path"`
28400
28401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28404  # "foo.exe" is OK but "foo" is an error.
28405  #
28406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28407  # It is also a way to make sure we got the proper file name for the real test later on.
28408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28409  if test "x$test_shortpath" = x; then
28410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28412    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28413  fi
28414
28415  # Call helper function which possibly converts this using DOS-style short mode.
28416  # If so, the updated path is stored in $new_path.
28417
28418  input_path="$new_path"
28419  # Check if we need to convert this using DOS-style short mode. If the path
28420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28421  # take no chances and rewrite it.
28422  # Note: m4 eats our [], so we need to use [ and ] instead.
28423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28424  if test "x$has_forbidden_chars" != x; then
28425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28429      # Going to short mode and back again did indeed matter. Since short mode is
28430      # case insensitive, let's make it lowercase to improve readability.
28431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28432      # Now convert it back to Unix-style (cygpath)
28433      input_path=`$CYGPATH -u "$shortmode_path"`
28434      new_path="$input_path"
28435    fi
28436  fi
28437
28438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28439  if test "x$test_cygdrive_prefix" = x; then
28440    # As a simple fix, exclude /usr/bin since it's not a real path.
28441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28443      # a path prefixed by /cygdrive for fixpath to work.
28444      new_path="$CYGWIN_ROOT_PATH$input_path"
28445    fi
28446  fi
28447
28448
28449  if test "x$path" != "x$new_path"; then
28450    BOOT_JDK="$new_path"
28451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28452$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28453  fi
28454
28455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28456
28457  path="$BOOT_JDK"
28458  has_colon=`$ECHO $path | $GREP ^.:`
28459  new_path="$path"
28460  if test "x$has_colon" = x; then
28461    # Not in mixed or Windows style, start by that.
28462    new_path=`cmd //c echo $path`
28463  fi
28464
28465
28466  input_path="$new_path"
28467  # Check if we need to convert this using DOS-style short mode. If the path
28468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28469  # take no chances and rewrite it.
28470  # Note: m4 eats our [], so we need to use [ and ] instead.
28471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28472  if test "x$has_forbidden_chars" != x; then
28473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28475  fi
28476
28477
28478  windows_path="$new_path"
28479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28480    unix_path=`$CYGPATH -u "$windows_path"`
28481    new_path="$unix_path"
28482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28484    new_path="$unix_path"
28485  fi
28486
28487  if test "x$path" != "x$new_path"; then
28488    BOOT_JDK="$new_path"
28489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28491  fi
28492
28493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28495
28496    else
28497      # We're on a unix platform. Hooray! :)
28498      path="$BOOT_JDK"
28499      has_space=`$ECHO "$path" | $GREP " "`
28500      if test "x$has_space" != x; then
28501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28504      fi
28505
28506      # Use eval to expand a potential ~
28507      eval path="$path"
28508      if test ! -f "$path" && test ! -d "$path"; then
28509        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28510      fi
28511
28512      if test -d "$path"; then
28513        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28514      else
28515        dir="`$DIRNAME "$path"`"
28516        base="`$BASENAME "$path"`"
28517        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28518      fi
28519    fi
28520  fi
28521
28522            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28523$as_echo_n "checking for Boot JDK... " >&6; }
28524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28525$as_echo "$BOOT_JDK" >&6; }
28526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28527$as_echo_n "checking Boot JDK version... " >&6; }
28528            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28530$as_echo "$BOOT_JDK_VERSION" >&6; }
28531          fi # end check jdk version
28532        fi # end check javac
28533      fi # end check java
28534    fi # end check boot jdk found
28535  fi
28536
28537    done
28538  fi
28539
28540  fi
28541
28542
28543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28545      # Do we have a bin/java?
28546      if test ! -x "$BOOT_JDK/bin/java"; then
28547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28549        BOOT_JDK_FOUND=no
28550      else
28551        # Do we have a bin/javac?
28552        if test ! -x "$BOOT_JDK/bin/javac"; then
28553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28557          BOOT_JDK_FOUND=no
28558        else
28559          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28560          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28561
28562          # Extra M4 quote needed to protect [] in grep expression.
28563          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28564          if test "x$FOUND_CORRECT_VERSION" = x; then
28565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28567            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28568$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28569            BOOT_JDK_FOUND=no
28570          else
28571            # We're done! :-)
28572            BOOT_JDK_FOUND=yes
28573
28574  # Only process if variable expands to non-empty
28575
28576  if test "x$BOOT_JDK" != x; then
28577    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28578
28579  # Input might be given as Windows format, start by converting to
28580  # unix format.
28581  path="$BOOT_JDK"
28582  new_path=`$CYGPATH -u "$path"`
28583
28584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28587  # "foo.exe" is OK but "foo" is an error.
28588  #
28589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28590  # It is also a way to make sure we got the proper file name for the real test later on.
28591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28592  if test "x$test_shortpath" = x; then
28593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28596  fi
28597
28598  # Call helper function which possibly converts this using DOS-style short mode.
28599  # If so, the updated path is stored in $new_path.
28600
28601  input_path="$new_path"
28602  # Check if we need to convert this using DOS-style short mode. If the path
28603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28604  # take no chances and rewrite it.
28605  # Note: m4 eats our [], so we need to use [ and ] instead.
28606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28607  if test "x$has_forbidden_chars" != x; then
28608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28612      # Going to short mode and back again did indeed matter. Since short mode is
28613      # case insensitive, let's make it lowercase to improve readability.
28614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28615      # Now convert it back to Unix-style (cygpath)
28616      input_path=`$CYGPATH -u "$shortmode_path"`
28617      new_path="$input_path"
28618    fi
28619  fi
28620
28621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28622  if test "x$test_cygdrive_prefix" = x; then
28623    # As a simple fix, exclude /usr/bin since it's not a real path.
28624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28626      # a path prefixed by /cygdrive for fixpath to work.
28627      new_path="$CYGWIN_ROOT_PATH$input_path"
28628    fi
28629  fi
28630
28631
28632  if test "x$path" != "x$new_path"; then
28633    BOOT_JDK="$new_path"
28634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28636  fi
28637
28638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28639
28640  path="$BOOT_JDK"
28641  has_colon=`$ECHO $path | $GREP ^.:`
28642  new_path="$path"
28643  if test "x$has_colon" = x; then
28644    # Not in mixed or Windows style, start by that.
28645    new_path=`cmd //c echo $path`
28646  fi
28647
28648
28649  input_path="$new_path"
28650  # Check if we need to convert this using DOS-style short mode. If the path
28651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28652  # take no chances and rewrite it.
28653  # Note: m4 eats our [], so we need to use [ and ] instead.
28654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28655  if test "x$has_forbidden_chars" != x; then
28656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28658  fi
28659
28660
28661  windows_path="$new_path"
28662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28663    unix_path=`$CYGPATH -u "$windows_path"`
28664    new_path="$unix_path"
28665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28667    new_path="$unix_path"
28668  fi
28669
28670  if test "x$path" != "x$new_path"; then
28671    BOOT_JDK="$new_path"
28672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28674  fi
28675
28676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28678
28679    else
28680      # We're on a unix platform. Hooray! :)
28681      path="$BOOT_JDK"
28682      has_space=`$ECHO "$path" | $GREP " "`
28683      if test "x$has_space" != x; then
28684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28686        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28687      fi
28688
28689      # Use eval to expand a potential ~
28690      eval path="$path"
28691      if test ! -f "$path" && test ! -d "$path"; then
28692        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28693      fi
28694
28695      if test -d "$path"; then
28696        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28697      else
28698        dir="`$DIRNAME "$path"`"
28699        base="`$BASENAME "$path"`"
28700        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28701      fi
28702    fi
28703  fi
28704
28705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28706$as_echo_n "checking for Boot JDK... " >&6; }
28707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28708$as_echo "$BOOT_JDK" >&6; }
28709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28710$as_echo_n "checking Boot JDK version... " >&6; }
28711            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28713$as_echo "$BOOT_JDK_VERSION" >&6; }
28714          fi # end check jdk version
28715        fi # end check javac
28716      fi # end check java
28717    fi # end check boot jdk found
28718  fi
28719
28720
28721  if test "x$BOOT_JDK_FOUND" = xno; then
28722    # Now execute the test
28723
28724  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28725  BOOT_JDK_SUFFIX=""
28726  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28727  if test "x$ALL_JDKS_FOUND" != x; then
28728    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28729
28730  if test "x$BOOT_JDK_FOUND" = xno; then
28731    # Now execute the test
28732
28733        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28734        if test -d "$BOOT_JDK"; then
28735          BOOT_JDK_FOUND=maybe
28736          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28737$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28738        fi
28739
28740
28741    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28742    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28743      # Do we have a bin/java?
28744      if test ! -x "$BOOT_JDK/bin/java"; then
28745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28747        BOOT_JDK_FOUND=no
28748      else
28749        # Do we have a bin/javac?
28750        if test ! -x "$BOOT_JDK/bin/javac"; then
28751          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28753          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28754$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28755          BOOT_JDK_FOUND=no
28756        else
28757          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28758          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28759
28760          # Extra M4 quote needed to protect [] in grep expression.
28761          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28762          if test "x$FOUND_CORRECT_VERSION" = x; then
28763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28765            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28766$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28767            BOOT_JDK_FOUND=no
28768          else
28769            # We're done! :-)
28770            BOOT_JDK_FOUND=yes
28771
28772  # Only process if variable expands to non-empty
28773
28774  if test "x$BOOT_JDK" != x; then
28775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28776
28777  # Input might be given as Windows format, start by converting to
28778  # unix format.
28779  path="$BOOT_JDK"
28780  new_path=`$CYGPATH -u "$path"`
28781
28782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28785  # "foo.exe" is OK but "foo" is an error.
28786  #
28787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28788  # It is also a way to make sure we got the proper file name for the real test later on.
28789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28790  if test "x$test_shortpath" = x; then
28791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28793    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28794  fi
28795
28796  # Call helper function which possibly converts this using DOS-style short mode.
28797  # If so, the updated path is stored in $new_path.
28798
28799  input_path="$new_path"
28800  # Check if we need to convert this using DOS-style short mode. If the path
28801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28802  # take no chances and rewrite it.
28803  # Note: m4 eats our [], so we need to use [ and ] instead.
28804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28805  if test "x$has_forbidden_chars" != x; then
28806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28810      # Going to short mode and back again did indeed matter. Since short mode is
28811      # case insensitive, let's make it lowercase to improve readability.
28812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28813      # Now convert it back to Unix-style (cygpath)
28814      input_path=`$CYGPATH -u "$shortmode_path"`
28815      new_path="$input_path"
28816    fi
28817  fi
28818
28819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28820  if test "x$test_cygdrive_prefix" = x; then
28821    # As a simple fix, exclude /usr/bin since it's not a real path.
28822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28824      # a path prefixed by /cygdrive for fixpath to work.
28825      new_path="$CYGWIN_ROOT_PATH$input_path"
28826    fi
28827  fi
28828
28829
28830  if test "x$path" != "x$new_path"; then
28831    BOOT_JDK="$new_path"
28832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28834  fi
28835
28836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28837
28838  path="$BOOT_JDK"
28839  has_colon=`$ECHO $path | $GREP ^.:`
28840  new_path="$path"
28841  if test "x$has_colon" = x; then
28842    # Not in mixed or Windows style, start by that.
28843    new_path=`cmd //c echo $path`
28844  fi
28845
28846
28847  input_path="$new_path"
28848  # Check if we need to convert this using DOS-style short mode. If the path
28849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28850  # take no chances and rewrite it.
28851  # Note: m4 eats our [], so we need to use [ and ] instead.
28852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28853  if test "x$has_forbidden_chars" != x; then
28854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28856  fi
28857
28858
28859  windows_path="$new_path"
28860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28861    unix_path=`$CYGPATH -u "$windows_path"`
28862    new_path="$unix_path"
28863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28865    new_path="$unix_path"
28866  fi
28867
28868  if test "x$path" != "x$new_path"; then
28869    BOOT_JDK="$new_path"
28870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28872  fi
28873
28874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28876
28877    else
28878      # We're on a unix platform. Hooray! :)
28879      path="$BOOT_JDK"
28880      has_space=`$ECHO "$path" | $GREP " "`
28881      if test "x$has_space" != x; then
28882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28885      fi
28886
28887      # Use eval to expand a potential ~
28888      eval path="$path"
28889      if test ! -f "$path" && test ! -d "$path"; then
28890        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28891      fi
28892
28893      if test -d "$path"; then
28894        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28895      else
28896        dir="`$DIRNAME "$path"`"
28897        base="`$BASENAME "$path"`"
28898        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28899      fi
28900    fi
28901  fi
28902
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28904$as_echo_n "checking for Boot JDK... " >&6; }
28905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28906$as_echo "$BOOT_JDK" >&6; }
28907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28908$as_echo_n "checking Boot JDK version... " >&6; }
28909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28911$as_echo "$BOOT_JDK_VERSION" >&6; }
28912          fi # end check jdk version
28913        fi # end check javac
28914      fi # end check java
28915    fi # end check boot jdk found
28916  fi
28917
28918    done
28919  fi
28920
28921
28922    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28923    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28924      # Do we have a bin/java?
28925      if test ! -x "$BOOT_JDK/bin/java"; then
28926        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28928        BOOT_JDK_FOUND=no
28929      else
28930        # Do we have a bin/javac?
28931        if test ! -x "$BOOT_JDK/bin/javac"; then
28932          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28934          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28935$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28936          BOOT_JDK_FOUND=no
28937        else
28938          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28939          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28940
28941          # Extra M4 quote needed to protect [] in grep expression.
28942          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28943          if test "x$FOUND_CORRECT_VERSION" = x; then
28944            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28946            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28947$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28948            BOOT_JDK_FOUND=no
28949          else
28950            # We're done! :-)
28951            BOOT_JDK_FOUND=yes
28952
28953  # Only process if variable expands to non-empty
28954
28955  if test "x$BOOT_JDK" != x; then
28956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28957
28958  # Input might be given as Windows format, start by converting to
28959  # unix format.
28960  path="$BOOT_JDK"
28961  new_path=`$CYGPATH -u "$path"`
28962
28963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28966  # "foo.exe" is OK but "foo" is an error.
28967  #
28968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28969  # It is also a way to make sure we got the proper file name for the real test later on.
28970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28971  if test "x$test_shortpath" = x; then
28972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28974    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28975  fi
28976
28977  # Call helper function which possibly converts this using DOS-style short mode.
28978  # If so, the updated path is stored in $new_path.
28979
28980  input_path="$new_path"
28981  # Check if we need to convert this using DOS-style short mode. If the path
28982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28983  # take no chances and rewrite it.
28984  # Note: m4 eats our [], so we need to use [ and ] instead.
28985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28986  if test "x$has_forbidden_chars" != x; then
28987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28991      # Going to short mode and back again did indeed matter. Since short mode is
28992      # case insensitive, let's make it lowercase to improve readability.
28993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28994      # Now convert it back to Unix-style (cygpath)
28995      input_path=`$CYGPATH -u "$shortmode_path"`
28996      new_path="$input_path"
28997    fi
28998  fi
28999
29000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29001  if test "x$test_cygdrive_prefix" = x; then
29002    # As a simple fix, exclude /usr/bin since it's not a real path.
29003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29005      # a path prefixed by /cygdrive for fixpath to work.
29006      new_path="$CYGWIN_ROOT_PATH$input_path"
29007    fi
29008  fi
29009
29010
29011  if test "x$path" != "x$new_path"; then
29012    BOOT_JDK="$new_path"
29013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29015  fi
29016
29017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29018
29019  path="$BOOT_JDK"
29020  has_colon=`$ECHO $path | $GREP ^.:`
29021  new_path="$path"
29022  if test "x$has_colon" = x; then
29023    # Not in mixed or Windows style, start by that.
29024    new_path=`cmd //c echo $path`
29025  fi
29026
29027
29028  input_path="$new_path"
29029  # Check if we need to convert this using DOS-style short mode. If the path
29030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29031  # take no chances and rewrite it.
29032  # Note: m4 eats our [], so we need to use [ and ] instead.
29033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29034  if test "x$has_forbidden_chars" != x; then
29035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29037  fi
29038
29039
29040  windows_path="$new_path"
29041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29042    unix_path=`$CYGPATH -u "$windows_path"`
29043    new_path="$unix_path"
29044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29046    new_path="$unix_path"
29047  fi
29048
29049  if test "x$path" != "x$new_path"; then
29050    BOOT_JDK="$new_path"
29051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29053  fi
29054
29055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29057
29058    else
29059      # We're on a unix platform. Hooray! :)
29060      path="$BOOT_JDK"
29061      has_space=`$ECHO "$path" | $GREP " "`
29062      if test "x$has_space" != x; then
29063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29066      fi
29067
29068      # Use eval to expand a potential ~
29069      eval path="$path"
29070      if test ! -f "$path" && test ! -d "$path"; then
29071        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29072      fi
29073
29074      if test -d "$path"; then
29075        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29076      else
29077        dir="`$DIRNAME "$path"`"
29078        base="`$BASENAME "$path"`"
29079        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29080      fi
29081    fi
29082  fi
29083
29084            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29085$as_echo_n "checking for Boot JDK... " >&6; }
29086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29087$as_echo "$BOOT_JDK" >&6; }
29088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29089$as_echo_n "checking Boot JDK version... " >&6; }
29090            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29092$as_echo "$BOOT_JDK_VERSION" >&6; }
29093          fi # end check jdk version
29094        fi # end check javac
29095      fi # end check java
29096    fi # end check boot jdk found
29097  fi
29098
29099  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29100
29101  if test "x$BOOT_JDK_FOUND" = xno; then
29102    # Now execute the test
29103
29104  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29105  BOOT_JDK_SUFFIX="/Contents/Home"
29106  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29107  if test "x$ALL_JDKS_FOUND" != x; then
29108    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29109
29110  if test "x$BOOT_JDK_FOUND" = xno; then
29111    # Now execute the test
29112
29113        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29114        if test -d "$BOOT_JDK"; then
29115          BOOT_JDK_FOUND=maybe
29116          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29117$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29118        fi
29119
29120
29121    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29122    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29123      # Do we have a bin/java?
29124      if test ! -x "$BOOT_JDK/bin/java"; then
29125        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29127        BOOT_JDK_FOUND=no
29128      else
29129        # Do we have a bin/javac?
29130        if test ! -x "$BOOT_JDK/bin/javac"; then
29131          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29133          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29134$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29135          BOOT_JDK_FOUND=no
29136        else
29137          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29138          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29139
29140          # Extra M4 quote needed to protect [] in grep expression.
29141          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29142          if test "x$FOUND_CORRECT_VERSION" = x; then
29143            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29145            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29146$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29147            BOOT_JDK_FOUND=no
29148          else
29149            # We're done! :-)
29150            BOOT_JDK_FOUND=yes
29151
29152  # Only process if variable expands to non-empty
29153
29154  if test "x$BOOT_JDK" != x; then
29155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29156
29157  # Input might be given as Windows format, start by converting to
29158  # unix format.
29159  path="$BOOT_JDK"
29160  new_path=`$CYGPATH -u "$path"`
29161
29162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29165  # "foo.exe" is OK but "foo" is an error.
29166  #
29167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29168  # It is also a way to make sure we got the proper file name for the real test later on.
29169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29170  if test "x$test_shortpath" = x; then
29171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29174  fi
29175
29176  # Call helper function which possibly converts this using DOS-style short mode.
29177  # If so, the updated path is stored in $new_path.
29178
29179  input_path="$new_path"
29180  # Check if we need to convert this using DOS-style short mode. If the path
29181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29182  # take no chances and rewrite it.
29183  # Note: m4 eats our [], so we need to use [ and ] instead.
29184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29185  if test "x$has_forbidden_chars" != x; then
29186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29190      # Going to short mode and back again did indeed matter. Since short mode is
29191      # case insensitive, let's make it lowercase to improve readability.
29192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29193      # Now convert it back to Unix-style (cygpath)
29194      input_path=`$CYGPATH -u "$shortmode_path"`
29195      new_path="$input_path"
29196    fi
29197  fi
29198
29199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29200  if test "x$test_cygdrive_prefix" = x; then
29201    # As a simple fix, exclude /usr/bin since it's not a real path.
29202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29204      # a path prefixed by /cygdrive for fixpath to work.
29205      new_path="$CYGWIN_ROOT_PATH$input_path"
29206    fi
29207  fi
29208
29209
29210  if test "x$path" != "x$new_path"; then
29211    BOOT_JDK="$new_path"
29212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29214  fi
29215
29216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29217
29218  path="$BOOT_JDK"
29219  has_colon=`$ECHO $path | $GREP ^.:`
29220  new_path="$path"
29221  if test "x$has_colon" = x; then
29222    # Not in mixed or Windows style, start by that.
29223    new_path=`cmd //c echo $path`
29224  fi
29225
29226
29227  input_path="$new_path"
29228  # Check if we need to convert this using DOS-style short mode. If the path
29229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29230  # take no chances and rewrite it.
29231  # Note: m4 eats our [], so we need to use [ and ] instead.
29232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29233  if test "x$has_forbidden_chars" != x; then
29234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29236  fi
29237
29238
29239  windows_path="$new_path"
29240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29241    unix_path=`$CYGPATH -u "$windows_path"`
29242    new_path="$unix_path"
29243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29245    new_path="$unix_path"
29246  fi
29247
29248  if test "x$path" != "x$new_path"; then
29249    BOOT_JDK="$new_path"
29250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29252  fi
29253
29254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29256
29257    else
29258      # We're on a unix platform. Hooray! :)
29259      path="$BOOT_JDK"
29260      has_space=`$ECHO "$path" | $GREP " "`
29261      if test "x$has_space" != x; then
29262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29265      fi
29266
29267      # Use eval to expand a potential ~
29268      eval path="$path"
29269      if test ! -f "$path" && test ! -d "$path"; then
29270        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29271      fi
29272
29273      if test -d "$path"; then
29274        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29275      else
29276        dir="`$DIRNAME "$path"`"
29277        base="`$BASENAME "$path"`"
29278        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29279      fi
29280    fi
29281  fi
29282
29283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29284$as_echo_n "checking for Boot JDK... " >&6; }
29285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29286$as_echo "$BOOT_JDK" >&6; }
29287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29288$as_echo_n "checking Boot JDK version... " >&6; }
29289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29291$as_echo "$BOOT_JDK_VERSION" >&6; }
29292          fi # end check jdk version
29293        fi # end check javac
29294      fi # end check java
29295    fi # end check boot jdk found
29296  fi
29297
29298    done
29299  fi
29300
29301
29302    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29303    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29304      # Do we have a bin/java?
29305      if test ! -x "$BOOT_JDK/bin/java"; then
29306        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29308        BOOT_JDK_FOUND=no
29309      else
29310        # Do we have a bin/javac?
29311        if test ! -x "$BOOT_JDK/bin/javac"; then
29312          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29314          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29315$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29316          BOOT_JDK_FOUND=no
29317        else
29318          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29319          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29320
29321          # Extra M4 quote needed to protect [] in grep expression.
29322          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29323          if test "x$FOUND_CORRECT_VERSION" = x; then
29324            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29326            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29327$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29328            BOOT_JDK_FOUND=no
29329          else
29330            # We're done! :-)
29331            BOOT_JDK_FOUND=yes
29332
29333  # Only process if variable expands to non-empty
29334
29335  if test "x$BOOT_JDK" != x; then
29336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29337
29338  # Input might be given as Windows format, start by converting to
29339  # unix format.
29340  path="$BOOT_JDK"
29341  new_path=`$CYGPATH -u "$path"`
29342
29343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29346  # "foo.exe" is OK but "foo" is an error.
29347  #
29348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29349  # It is also a way to make sure we got the proper file name for the real test later on.
29350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29351  if test "x$test_shortpath" = x; then
29352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29353$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29354    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29355  fi
29356
29357  # Call helper function which possibly converts this using DOS-style short mode.
29358  # If so, the updated path is stored in $new_path.
29359
29360  input_path="$new_path"
29361  # Check if we need to convert this using DOS-style short mode. If the path
29362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29363  # take no chances and rewrite it.
29364  # Note: m4 eats our [], so we need to use [ and ] instead.
29365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29366  if test "x$has_forbidden_chars" != x; then
29367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29371      # Going to short mode and back again did indeed matter. Since short mode is
29372      # case insensitive, let's make it lowercase to improve readability.
29373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29374      # Now convert it back to Unix-style (cygpath)
29375      input_path=`$CYGPATH -u "$shortmode_path"`
29376      new_path="$input_path"
29377    fi
29378  fi
29379
29380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29381  if test "x$test_cygdrive_prefix" = x; then
29382    # As a simple fix, exclude /usr/bin since it's not a real path.
29383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29385      # a path prefixed by /cygdrive for fixpath to work.
29386      new_path="$CYGWIN_ROOT_PATH$input_path"
29387    fi
29388  fi
29389
29390
29391  if test "x$path" != "x$new_path"; then
29392    BOOT_JDK="$new_path"
29393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29395  fi
29396
29397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29398
29399  path="$BOOT_JDK"
29400  has_colon=`$ECHO $path | $GREP ^.:`
29401  new_path="$path"
29402  if test "x$has_colon" = x; then
29403    # Not in mixed or Windows style, start by that.
29404    new_path=`cmd //c echo $path`
29405  fi
29406
29407
29408  input_path="$new_path"
29409  # Check if we need to convert this using DOS-style short mode. If the path
29410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29411  # take no chances and rewrite it.
29412  # Note: m4 eats our [], so we need to use [ and ] instead.
29413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29414  if test "x$has_forbidden_chars" != x; then
29415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29417  fi
29418
29419
29420  windows_path="$new_path"
29421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29422    unix_path=`$CYGPATH -u "$windows_path"`
29423    new_path="$unix_path"
29424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29426    new_path="$unix_path"
29427  fi
29428
29429  if test "x$path" != "x$new_path"; then
29430    BOOT_JDK="$new_path"
29431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29432$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29433  fi
29434
29435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29437
29438    else
29439      # We're on a unix platform. Hooray! :)
29440      path="$BOOT_JDK"
29441      has_space=`$ECHO "$path" | $GREP " "`
29442      if test "x$has_space" != x; then
29443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29444$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29445        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29446      fi
29447
29448      # Use eval to expand a potential ~
29449      eval path="$path"
29450      if test ! -f "$path" && test ! -d "$path"; then
29451        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29452      fi
29453
29454      if test -d "$path"; then
29455        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29456      else
29457        dir="`$DIRNAME "$path"`"
29458        base="`$BASENAME "$path"`"
29459        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29460      fi
29461    fi
29462  fi
29463
29464            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29465$as_echo_n "checking for Boot JDK... " >&6; }
29466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29467$as_echo "$BOOT_JDK" >&6; }
29468            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29469$as_echo_n "checking Boot JDK version... " >&6; }
29470            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29471            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29472$as_echo "$BOOT_JDK_VERSION" >&6; }
29473          fi # end check jdk version
29474        fi # end check javac
29475      fi # end check java
29476    fi # end check boot jdk found
29477  fi
29478
29479
29480  if test "x$BOOT_JDK_FOUND" = xno; then
29481    # Now execute the test
29482
29483  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29484  BOOT_JDK_SUFFIX="/Contents/Home"
29485  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29486  if test "x$ALL_JDKS_FOUND" != x; then
29487    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29488
29489  if test "x$BOOT_JDK_FOUND" = xno; then
29490    # Now execute the test
29491
29492        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29493        if test -d "$BOOT_JDK"; then
29494          BOOT_JDK_FOUND=maybe
29495          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29496$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29497        fi
29498
29499
29500    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29501    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29502      # Do we have a bin/java?
29503      if test ! -x "$BOOT_JDK/bin/java"; then
29504        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29506        BOOT_JDK_FOUND=no
29507      else
29508        # Do we have a bin/javac?
29509        if test ! -x "$BOOT_JDK/bin/javac"; then
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29512          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29513$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29514          BOOT_JDK_FOUND=no
29515        else
29516          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29517          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29518
29519          # Extra M4 quote needed to protect [] in grep expression.
29520          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29521          if test "x$FOUND_CORRECT_VERSION" = x; then
29522            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29524            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29525$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29526            BOOT_JDK_FOUND=no
29527          else
29528            # We're done! :-)
29529            BOOT_JDK_FOUND=yes
29530
29531  # Only process if variable expands to non-empty
29532
29533  if test "x$BOOT_JDK" != x; then
29534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29535
29536  # Input might be given as Windows format, start by converting to
29537  # unix format.
29538  path="$BOOT_JDK"
29539  new_path=`$CYGPATH -u "$path"`
29540
29541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29544  # "foo.exe" is OK but "foo" is an error.
29545  #
29546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29547  # It is also a way to make sure we got the proper file name for the real test later on.
29548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29549  if test "x$test_shortpath" = x; then
29550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29553  fi
29554
29555  # Call helper function which possibly converts this using DOS-style short mode.
29556  # If so, the updated path is stored in $new_path.
29557
29558  input_path="$new_path"
29559  # Check if we need to convert this using DOS-style short mode. If the path
29560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29561  # take no chances and rewrite it.
29562  # Note: m4 eats our [], so we need to use [ and ] instead.
29563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29564  if test "x$has_forbidden_chars" != x; then
29565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29569      # Going to short mode and back again did indeed matter. Since short mode is
29570      # case insensitive, let's make it lowercase to improve readability.
29571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29572      # Now convert it back to Unix-style (cygpath)
29573      input_path=`$CYGPATH -u "$shortmode_path"`
29574      new_path="$input_path"
29575    fi
29576  fi
29577
29578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29579  if test "x$test_cygdrive_prefix" = x; then
29580    # As a simple fix, exclude /usr/bin since it's not a real path.
29581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29583      # a path prefixed by /cygdrive for fixpath to work.
29584      new_path="$CYGWIN_ROOT_PATH$input_path"
29585    fi
29586  fi
29587
29588
29589  if test "x$path" != "x$new_path"; then
29590    BOOT_JDK="$new_path"
29591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29593  fi
29594
29595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29596
29597  path="$BOOT_JDK"
29598  has_colon=`$ECHO $path | $GREP ^.:`
29599  new_path="$path"
29600  if test "x$has_colon" = x; then
29601    # Not in mixed or Windows style, start by that.
29602    new_path=`cmd //c echo $path`
29603  fi
29604
29605
29606  input_path="$new_path"
29607  # Check if we need to convert this using DOS-style short mode. If the path
29608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29609  # take no chances and rewrite it.
29610  # Note: m4 eats our [], so we need to use [ and ] instead.
29611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29612  if test "x$has_forbidden_chars" != x; then
29613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29615  fi
29616
29617
29618  windows_path="$new_path"
29619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29620    unix_path=`$CYGPATH -u "$windows_path"`
29621    new_path="$unix_path"
29622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29624    new_path="$unix_path"
29625  fi
29626
29627  if test "x$path" != "x$new_path"; then
29628    BOOT_JDK="$new_path"
29629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29631  fi
29632
29633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29635
29636    else
29637      # We're on a unix platform. Hooray! :)
29638      path="$BOOT_JDK"
29639      has_space=`$ECHO "$path" | $GREP " "`
29640      if test "x$has_space" != x; then
29641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29644      fi
29645
29646      # Use eval to expand a potential ~
29647      eval path="$path"
29648      if test ! -f "$path" && test ! -d "$path"; then
29649        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29650      fi
29651
29652      if test -d "$path"; then
29653        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29654      else
29655        dir="`$DIRNAME "$path"`"
29656        base="`$BASENAME "$path"`"
29657        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29658      fi
29659    fi
29660  fi
29661
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29663$as_echo_n "checking for Boot JDK... " >&6; }
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29665$as_echo "$BOOT_JDK" >&6; }
29666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29667$as_echo_n "checking Boot JDK version... " >&6; }
29668            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29670$as_echo "$BOOT_JDK_VERSION" >&6; }
29671          fi # end check jdk version
29672        fi # end check javac
29673      fi # end check java
29674    fi # end check boot jdk found
29675  fi
29676
29677    done
29678  fi
29679
29680
29681    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29682    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29683      # Do we have a bin/java?
29684      if test ! -x "$BOOT_JDK/bin/java"; then
29685        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29687        BOOT_JDK_FOUND=no
29688      else
29689        # Do we have a bin/javac?
29690        if test ! -x "$BOOT_JDK/bin/javac"; then
29691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29693          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29694$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29695          BOOT_JDK_FOUND=no
29696        else
29697          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29698          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29699
29700          # Extra M4 quote needed to protect [] in grep expression.
29701          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29702          if test "x$FOUND_CORRECT_VERSION" = x; then
29703            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29705            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29706$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29707            BOOT_JDK_FOUND=no
29708          else
29709            # We're done! :-)
29710            BOOT_JDK_FOUND=yes
29711
29712  # Only process if variable expands to non-empty
29713
29714  if test "x$BOOT_JDK" != x; then
29715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29716
29717  # Input might be given as Windows format, start by converting to
29718  # unix format.
29719  path="$BOOT_JDK"
29720  new_path=`$CYGPATH -u "$path"`
29721
29722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29725  # "foo.exe" is OK but "foo" is an error.
29726  #
29727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29728  # It is also a way to make sure we got the proper file name for the real test later on.
29729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29730  if test "x$test_shortpath" = x; then
29731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29734  fi
29735
29736  # Call helper function which possibly converts this using DOS-style short mode.
29737  # If so, the updated path is stored in $new_path.
29738
29739  input_path="$new_path"
29740  # Check if we need to convert this using DOS-style short mode. If the path
29741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29742  # take no chances and rewrite it.
29743  # Note: m4 eats our [], so we need to use [ and ] instead.
29744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29745  if test "x$has_forbidden_chars" != x; then
29746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29750      # Going to short mode and back again did indeed matter. Since short mode is
29751      # case insensitive, let's make it lowercase to improve readability.
29752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29753      # Now convert it back to Unix-style (cygpath)
29754      input_path=`$CYGPATH -u "$shortmode_path"`
29755      new_path="$input_path"
29756    fi
29757  fi
29758
29759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29760  if test "x$test_cygdrive_prefix" = x; then
29761    # As a simple fix, exclude /usr/bin since it's not a real path.
29762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29764      # a path prefixed by /cygdrive for fixpath to work.
29765      new_path="$CYGWIN_ROOT_PATH$input_path"
29766    fi
29767  fi
29768
29769
29770  if test "x$path" != "x$new_path"; then
29771    BOOT_JDK="$new_path"
29772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29774  fi
29775
29776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29777
29778  path="$BOOT_JDK"
29779  has_colon=`$ECHO $path | $GREP ^.:`
29780  new_path="$path"
29781  if test "x$has_colon" = x; then
29782    # Not in mixed or Windows style, start by that.
29783    new_path=`cmd //c echo $path`
29784  fi
29785
29786
29787  input_path="$new_path"
29788  # Check if we need to convert this using DOS-style short mode. If the path
29789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29790  # take no chances and rewrite it.
29791  # Note: m4 eats our [], so we need to use [ and ] instead.
29792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29793  if test "x$has_forbidden_chars" != x; then
29794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29796  fi
29797
29798
29799  windows_path="$new_path"
29800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29801    unix_path=`$CYGPATH -u "$windows_path"`
29802    new_path="$unix_path"
29803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29805    new_path="$unix_path"
29806  fi
29807
29808  if test "x$path" != "x$new_path"; then
29809    BOOT_JDK="$new_path"
29810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29812  fi
29813
29814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29816
29817    else
29818      # We're on a unix platform. Hooray! :)
29819      path="$BOOT_JDK"
29820      has_space=`$ECHO "$path" | $GREP " "`
29821      if test "x$has_space" != x; then
29822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29824        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29825      fi
29826
29827      # Use eval to expand a potential ~
29828      eval path="$path"
29829      if test ! -f "$path" && test ! -d "$path"; then
29830        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29831      fi
29832
29833      if test -d "$path"; then
29834        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29835      else
29836        dir="`$DIRNAME "$path"`"
29837        base="`$BASENAME "$path"`"
29838        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29839      fi
29840    fi
29841  fi
29842
29843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29844$as_echo_n "checking for Boot JDK... " >&6; }
29845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29846$as_echo "$BOOT_JDK" >&6; }
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29848$as_echo_n "checking Boot JDK version... " >&6; }
29849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29851$as_echo "$BOOT_JDK_VERSION" >&6; }
29852          fi # end check jdk version
29853        fi # end check javac
29854      fi # end check java
29855    fi # end check boot jdk found
29856  fi
29857
29858  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29859
29860  if test "x$BOOT_JDK_FOUND" = xno; then
29861    # Now execute the test
29862
29863  BOOT_JDK_PREFIX="/usr/lib/jvm"
29864  BOOT_JDK_SUFFIX=""
29865  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29866  if test "x$ALL_JDKS_FOUND" != x; then
29867    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29868
29869  if test "x$BOOT_JDK_FOUND" = xno; then
29870    # Now execute the test
29871
29872        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29873        if test -d "$BOOT_JDK"; then
29874          BOOT_JDK_FOUND=maybe
29875          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29876$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29877        fi
29878
29879
29880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29882      # Do we have a bin/java?
29883      if test ! -x "$BOOT_JDK/bin/java"; then
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29886        BOOT_JDK_FOUND=no
29887      else
29888        # Do we have a bin/javac?
29889        if test ! -x "$BOOT_JDK/bin/javac"; then
29890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29894          BOOT_JDK_FOUND=no
29895        else
29896          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29897          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29898
29899          # Extra M4 quote needed to protect [] in grep expression.
29900          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29901          if test "x$FOUND_CORRECT_VERSION" = x; then
29902            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29904            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29905$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29906            BOOT_JDK_FOUND=no
29907          else
29908            # We're done! :-)
29909            BOOT_JDK_FOUND=yes
29910
29911  # Only process if variable expands to non-empty
29912
29913  if test "x$BOOT_JDK" != x; then
29914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29915
29916  # Input might be given as Windows format, start by converting to
29917  # unix format.
29918  path="$BOOT_JDK"
29919  new_path=`$CYGPATH -u "$path"`
29920
29921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29924  # "foo.exe" is OK but "foo" is an error.
29925  #
29926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29927  # It is also a way to make sure we got the proper file name for the real test later on.
29928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29929  if test "x$test_shortpath" = x; then
29930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29932    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29933  fi
29934
29935  # Call helper function which possibly converts this using DOS-style short mode.
29936  # If so, the updated path is stored in $new_path.
29937
29938  input_path="$new_path"
29939  # Check if we need to convert this using DOS-style short mode. If the path
29940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29941  # take no chances and rewrite it.
29942  # Note: m4 eats our [], so we need to use [ and ] instead.
29943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29944  if test "x$has_forbidden_chars" != x; then
29945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29949      # Going to short mode and back again did indeed matter. Since short mode is
29950      # case insensitive, let's make it lowercase to improve readability.
29951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29952      # Now convert it back to Unix-style (cygpath)
29953      input_path=`$CYGPATH -u "$shortmode_path"`
29954      new_path="$input_path"
29955    fi
29956  fi
29957
29958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29959  if test "x$test_cygdrive_prefix" = x; then
29960    # As a simple fix, exclude /usr/bin since it's not a real path.
29961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29963      # a path prefixed by /cygdrive for fixpath to work.
29964      new_path="$CYGWIN_ROOT_PATH$input_path"
29965    fi
29966  fi
29967
29968
29969  if test "x$path" != "x$new_path"; then
29970    BOOT_JDK="$new_path"
29971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29973  fi
29974
29975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29976
29977  path="$BOOT_JDK"
29978  has_colon=`$ECHO $path | $GREP ^.:`
29979  new_path="$path"
29980  if test "x$has_colon" = x; then
29981    # Not in mixed or Windows style, start by that.
29982    new_path=`cmd //c echo $path`
29983  fi
29984
29985
29986  input_path="$new_path"
29987  # Check if we need to convert this using DOS-style short mode. If the path
29988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29989  # take no chances and rewrite it.
29990  # Note: m4 eats our [], so we need to use [ and ] instead.
29991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29992  if test "x$has_forbidden_chars" != x; then
29993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29995  fi
29996
29997
29998  windows_path="$new_path"
29999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30000    unix_path=`$CYGPATH -u "$windows_path"`
30001    new_path="$unix_path"
30002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30004    new_path="$unix_path"
30005  fi
30006
30007  if test "x$path" != "x$new_path"; then
30008    BOOT_JDK="$new_path"
30009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30011  fi
30012
30013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30015
30016    else
30017      # We're on a unix platform. Hooray! :)
30018      path="$BOOT_JDK"
30019      has_space=`$ECHO "$path" | $GREP " "`
30020      if test "x$has_space" != x; then
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30024      fi
30025
30026      # Use eval to expand a potential ~
30027      eval path="$path"
30028      if test ! -f "$path" && test ! -d "$path"; then
30029        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30030      fi
30031
30032      if test -d "$path"; then
30033        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30034      else
30035        dir="`$DIRNAME "$path"`"
30036        base="`$BASENAME "$path"`"
30037        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30038      fi
30039    fi
30040  fi
30041
30042            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30043$as_echo_n "checking for Boot JDK... " >&6; }
30044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30045$as_echo "$BOOT_JDK" >&6; }
30046            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30047$as_echo_n "checking Boot JDK version... " >&6; }
30048            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30050$as_echo "$BOOT_JDK_VERSION" >&6; }
30051          fi # end check jdk version
30052        fi # end check javac
30053      fi # end check java
30054    fi # end check boot jdk found
30055  fi
30056
30057    done
30058  fi
30059
30060
30061    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30062    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30063      # Do we have a bin/java?
30064      if test ! -x "$BOOT_JDK/bin/java"; then
30065        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30067        BOOT_JDK_FOUND=no
30068      else
30069        # Do we have a bin/javac?
30070        if test ! -x "$BOOT_JDK/bin/javac"; then
30071          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30073          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30074$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30075          BOOT_JDK_FOUND=no
30076        else
30077          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30078          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30079
30080          # Extra M4 quote needed to protect [] in grep expression.
30081          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30082          if test "x$FOUND_CORRECT_VERSION" = x; then
30083            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30085            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30086$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30087            BOOT_JDK_FOUND=no
30088          else
30089            # We're done! :-)
30090            BOOT_JDK_FOUND=yes
30091
30092  # Only process if variable expands to non-empty
30093
30094  if test "x$BOOT_JDK" != x; then
30095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30096
30097  # Input might be given as Windows format, start by converting to
30098  # unix format.
30099  path="$BOOT_JDK"
30100  new_path=`$CYGPATH -u "$path"`
30101
30102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30105  # "foo.exe" is OK but "foo" is an error.
30106  #
30107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30108  # It is also a way to make sure we got the proper file name for the real test later on.
30109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30110  if test "x$test_shortpath" = x; then
30111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30113    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30114  fi
30115
30116  # Call helper function which possibly converts this using DOS-style short mode.
30117  # If so, the updated path is stored in $new_path.
30118
30119  input_path="$new_path"
30120  # Check if we need to convert this using DOS-style short mode. If the path
30121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30122  # take no chances and rewrite it.
30123  # Note: m4 eats our [], so we need to use [ and ] instead.
30124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30125  if test "x$has_forbidden_chars" != x; then
30126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30130      # Going to short mode and back again did indeed matter. Since short mode is
30131      # case insensitive, let's make it lowercase to improve readability.
30132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30133      # Now convert it back to Unix-style (cygpath)
30134      input_path=`$CYGPATH -u "$shortmode_path"`
30135      new_path="$input_path"
30136    fi
30137  fi
30138
30139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30140  if test "x$test_cygdrive_prefix" = x; then
30141    # As a simple fix, exclude /usr/bin since it's not a real path.
30142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30144      # a path prefixed by /cygdrive for fixpath to work.
30145      new_path="$CYGWIN_ROOT_PATH$input_path"
30146    fi
30147  fi
30148
30149
30150  if test "x$path" != "x$new_path"; then
30151    BOOT_JDK="$new_path"
30152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30154  fi
30155
30156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30157
30158  path="$BOOT_JDK"
30159  has_colon=`$ECHO $path | $GREP ^.:`
30160  new_path="$path"
30161  if test "x$has_colon" = x; then
30162    # Not in mixed or Windows style, start by that.
30163    new_path=`cmd //c echo $path`
30164  fi
30165
30166
30167  input_path="$new_path"
30168  # Check if we need to convert this using DOS-style short mode. If the path
30169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30170  # take no chances and rewrite it.
30171  # Note: m4 eats our [], so we need to use [ and ] instead.
30172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30173  if test "x$has_forbidden_chars" != x; then
30174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30176  fi
30177
30178
30179  windows_path="$new_path"
30180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30181    unix_path=`$CYGPATH -u "$windows_path"`
30182    new_path="$unix_path"
30183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30185    new_path="$unix_path"
30186  fi
30187
30188  if test "x$path" != "x$new_path"; then
30189    BOOT_JDK="$new_path"
30190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30192  fi
30193
30194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30196
30197    else
30198      # We're on a unix platform. Hooray! :)
30199      path="$BOOT_JDK"
30200      has_space=`$ECHO "$path" | $GREP " "`
30201      if test "x$has_space" != x; then
30202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30205      fi
30206
30207      # Use eval to expand a potential ~
30208      eval path="$path"
30209      if test ! -f "$path" && test ! -d "$path"; then
30210        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30211      fi
30212
30213      if test -d "$path"; then
30214        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30215      else
30216        dir="`$DIRNAME "$path"`"
30217        base="`$BASENAME "$path"`"
30218        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30219      fi
30220    fi
30221  fi
30222
30223            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30224$as_echo_n "checking for Boot JDK... " >&6; }
30225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30226$as_echo "$BOOT_JDK" >&6; }
30227            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30228$as_echo_n "checking Boot JDK version... " >&6; }
30229            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30231$as_echo "$BOOT_JDK_VERSION" >&6; }
30232          fi # end check jdk version
30233        fi # end check javac
30234      fi # end check java
30235    fi # end check boot jdk found
30236  fi
30237
30238  fi
30239
30240
30241    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30242    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30243      # Do we have a bin/java?
30244      if test ! -x "$BOOT_JDK/bin/java"; then
30245        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30247        BOOT_JDK_FOUND=no
30248      else
30249        # Do we have a bin/javac?
30250        if test ! -x "$BOOT_JDK/bin/javac"; then
30251          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30253          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30254$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30255          BOOT_JDK_FOUND=no
30256        else
30257          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30258          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30259
30260          # Extra M4 quote needed to protect [] in grep expression.
30261          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30262          if test "x$FOUND_CORRECT_VERSION" = x; then
30263            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30265            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30266$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30267            BOOT_JDK_FOUND=no
30268          else
30269            # We're done! :-)
30270            BOOT_JDK_FOUND=yes
30271
30272  # Only process if variable expands to non-empty
30273
30274  if test "x$BOOT_JDK" != x; then
30275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30276
30277  # Input might be given as Windows format, start by converting to
30278  # unix format.
30279  path="$BOOT_JDK"
30280  new_path=`$CYGPATH -u "$path"`
30281
30282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30285  # "foo.exe" is OK but "foo" is an error.
30286  #
30287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30288  # It is also a way to make sure we got the proper file name for the real test later on.
30289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30290  if test "x$test_shortpath" = x; then
30291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30293    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30294  fi
30295
30296  # Call helper function which possibly converts this using DOS-style short mode.
30297  # If so, the updated path is stored in $new_path.
30298
30299  input_path="$new_path"
30300  # Check if we need to convert this using DOS-style short mode. If the path
30301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30302  # take no chances and rewrite it.
30303  # Note: m4 eats our [], so we need to use [ and ] instead.
30304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30305  if test "x$has_forbidden_chars" != x; then
30306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30310      # Going to short mode and back again did indeed matter. Since short mode is
30311      # case insensitive, let's make it lowercase to improve readability.
30312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30313      # Now convert it back to Unix-style (cygpath)
30314      input_path=`$CYGPATH -u "$shortmode_path"`
30315      new_path="$input_path"
30316    fi
30317  fi
30318
30319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30320  if test "x$test_cygdrive_prefix" = x; then
30321    # As a simple fix, exclude /usr/bin since it's not a real path.
30322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30324      # a path prefixed by /cygdrive for fixpath to work.
30325      new_path="$CYGWIN_ROOT_PATH$input_path"
30326    fi
30327  fi
30328
30329
30330  if test "x$path" != "x$new_path"; then
30331    BOOT_JDK="$new_path"
30332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30334  fi
30335
30336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30337
30338  path="$BOOT_JDK"
30339  has_colon=`$ECHO $path | $GREP ^.:`
30340  new_path="$path"
30341  if test "x$has_colon" = x; then
30342    # Not in mixed or Windows style, start by that.
30343    new_path=`cmd //c echo $path`
30344  fi
30345
30346
30347  input_path="$new_path"
30348  # Check if we need to convert this using DOS-style short mode. If the path
30349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30350  # take no chances and rewrite it.
30351  # Note: m4 eats our [], so we need to use [ and ] instead.
30352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30353  if test "x$has_forbidden_chars" != x; then
30354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30356  fi
30357
30358
30359  windows_path="$new_path"
30360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30361    unix_path=`$CYGPATH -u "$windows_path"`
30362    new_path="$unix_path"
30363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30365    new_path="$unix_path"
30366  fi
30367
30368  if test "x$path" != "x$new_path"; then
30369    BOOT_JDK="$new_path"
30370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30372  fi
30373
30374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30376
30377    else
30378      # We're on a unix platform. Hooray! :)
30379      path="$BOOT_JDK"
30380      has_space=`$ECHO "$path" | $GREP " "`
30381      if test "x$has_space" != x; then
30382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30385      fi
30386
30387      # Use eval to expand a potential ~
30388      eval path="$path"
30389      if test ! -f "$path" && test ! -d "$path"; then
30390        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30391      fi
30392
30393      if test -d "$path"; then
30394        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30395      else
30396        dir="`$DIRNAME "$path"`"
30397        base="`$BASENAME "$path"`"
30398        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30399      fi
30400    fi
30401  fi
30402
30403            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30404$as_echo_n "checking for Boot JDK... " >&6; }
30405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30406$as_echo "$BOOT_JDK" >&6; }
30407            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30408$as_echo_n "checking Boot JDK version... " >&6; }
30409            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30411$as_echo "$BOOT_JDK_VERSION" >&6; }
30412          fi # end check jdk version
30413        fi # end check javac
30414      fi # end check java
30415    fi # end check boot jdk found
30416  fi
30417
30418
30419  # If we haven't found anything yet, we've truly lost. Give up.
30420  if test "x$BOOT_JDK_FOUND" = xno; then
30421
30422  # Print a helpful message on how to acquire the necessary build dependency.
30423  # openjdk is the help tag: freetype, cups, alsa etc
30424  MISSING_DEPENDENCY=openjdk
30425
30426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30427    cygwin_help $MISSING_DEPENDENCY
30428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30429    msys_help $MISSING_DEPENDENCY
30430  else
30431    PKGHANDLER_COMMAND=
30432
30433    case $PKGHANDLER in
30434      apt-get)
30435        apt_help     $MISSING_DEPENDENCY ;;
30436      yum)
30437        yum_help     $MISSING_DEPENDENCY ;;
30438      brew)
30439        brew_help    $MISSING_DEPENDENCY ;;
30440      port)
30441        port_help    $MISSING_DEPENDENCY ;;
30442      pkgutil)
30443        pkgutil_help $MISSING_DEPENDENCY ;;
30444      pkgadd)
30445        pkgadd_help  $MISSING_DEPENDENCY ;;
30446    esac
30447
30448    if test "x$PKGHANDLER_COMMAND" != x; then
30449      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30450    fi
30451  fi
30452
30453    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30454$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30455    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30456$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30457    as_fn_error $? "Cannot continue" "$LINENO" 5
30458  fi
30459
30460
30461
30462  # Setup tools from the Boot JDK.
30463
30464  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30465
30466  # Publish this variable in the help.
30467
30468
30469  if [ -z "${JAVA+x}" ]; then
30470    # The variable is not set by user, try to locate tool using the code snippet
30471
30472      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30473$as_echo_n "checking for java in Boot JDK... " >&6; }
30474      JAVA=$BOOT_JDK/bin/java
30475      if test ! -x $JAVA; then
30476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30477$as_echo "not found" >&6; }
30478        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30479$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30480        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30481      fi
30482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30483$as_echo "ok" >&6; }
30484
30485
30486  else
30487    # The variable is set, but is it from the command line or the environment?
30488
30489    # Try to remove the string !JAVA! from our list.
30490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30492      # If it failed, the variable was not from the command line. Ignore it,
30493      # but warn the user (except for BASH, which is always set by the calling BASH).
30494      if test "xJAVA" != xBASH; then
30495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30496$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30497      fi
30498      # Try to locate tool using the code snippet
30499
30500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30501$as_echo_n "checking for java in Boot JDK... " >&6; }
30502      JAVA=$BOOT_JDK/bin/java
30503      if test ! -x $JAVA; then
30504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30505$as_echo "not found" >&6; }
30506        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30507$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30508        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30509      fi
30510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30511$as_echo "ok" >&6; }
30512
30513
30514    else
30515      # If it succeeded, then it was overridden by the user. We will use it
30516      # for the tool.
30517
30518      # First remove it from the list of overridden variables, so we can test
30519      # for unknown variables in the end.
30520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30521
30522      # Check if we try to supply an empty value
30523      if test "x$JAVA" = x; then
30524        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30525$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30527$as_echo_n "checking for JAVA... " >&6; }
30528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30529$as_echo "disabled" >&6; }
30530      else
30531        # Check if the provided tool contains a complete path.
30532        tool_specified="$JAVA"
30533        tool_basename="${tool_specified##*/}"
30534        if test "x$tool_basename" = "x$tool_specified"; then
30535          # A command without a complete path is provided, search $PATH.
30536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30537$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30538          # Extract the first word of "$tool_basename", so it can be a program name with args.
30539set dummy $tool_basename; ac_word=$2
30540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30541$as_echo_n "checking for $ac_word... " >&6; }
30542if ${ac_cv_path_JAVA+:} false; then :
30543  $as_echo_n "(cached) " >&6
30544else
30545  case $JAVA in
30546  [\\/]* | ?:[\\/]*)
30547  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30548  ;;
30549  *)
30550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30551for as_dir in $PATH
30552do
30553  IFS=$as_save_IFS
30554  test -z "$as_dir" && as_dir=.
30555    for ac_exec_ext in '' $ac_executable_extensions; do
30556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30557    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30559    break 2
30560  fi
30561done
30562  done
30563IFS=$as_save_IFS
30564
30565  ;;
30566esac
30567fi
30568JAVA=$ac_cv_path_JAVA
30569if test -n "$JAVA"; then
30570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30571$as_echo "$JAVA" >&6; }
30572else
30573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30574$as_echo "no" >&6; }
30575fi
30576
30577
30578          if test "x$JAVA" = x; then
30579            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30580          fi
30581        else
30582          # Otherwise we believe it is a complete path. Use it as it is.
30583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30584$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30585          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30586$as_echo_n "checking for JAVA... " >&6; }
30587          if test ! -x "$tool_specified"; then
30588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30589$as_echo "not found" >&6; }
30590            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30591          fi
30592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30593$as_echo "$tool_specified" >&6; }
30594        fi
30595      fi
30596    fi
30597
30598  fi
30599
30600
30601
30602  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30603
30604  # Publish this variable in the help.
30605
30606
30607  if [ -z "${JAVAC+x}" ]; then
30608    # The variable is not set by user, try to locate tool using the code snippet
30609
30610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30611$as_echo_n "checking for javac in Boot JDK... " >&6; }
30612      JAVAC=$BOOT_JDK/bin/javac
30613      if test ! -x $JAVAC; then
30614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30615$as_echo "not found" >&6; }
30616        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30617$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30618        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30619      fi
30620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30621$as_echo "ok" >&6; }
30622
30623
30624  else
30625    # The variable is set, but is it from the command line or the environment?
30626
30627    # Try to remove the string !JAVAC! from our list.
30628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30630      # If it failed, the variable was not from the command line. Ignore it,
30631      # but warn the user (except for BASH, which is always set by the calling BASH).
30632      if test "xJAVAC" != xBASH; then
30633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30634$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30635      fi
30636      # Try to locate tool using the code snippet
30637
30638      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30639$as_echo_n "checking for javac in Boot JDK... " >&6; }
30640      JAVAC=$BOOT_JDK/bin/javac
30641      if test ! -x $JAVAC; then
30642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30643$as_echo "not found" >&6; }
30644        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30645$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30646        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30647      fi
30648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30649$as_echo "ok" >&6; }
30650
30651
30652    else
30653      # If it succeeded, then it was overridden by the user. We will use it
30654      # for the tool.
30655
30656      # First remove it from the list of overridden variables, so we can test
30657      # for unknown variables in the end.
30658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30659
30660      # Check if we try to supply an empty value
30661      if test "x$JAVAC" = x; then
30662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30663$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30665$as_echo_n "checking for JAVAC... " >&6; }
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30667$as_echo "disabled" >&6; }
30668      else
30669        # Check if the provided tool contains a complete path.
30670        tool_specified="$JAVAC"
30671        tool_basename="${tool_specified##*/}"
30672        if test "x$tool_basename" = "x$tool_specified"; then
30673          # A command without a complete path is provided, search $PATH.
30674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30675$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30676          # Extract the first word of "$tool_basename", so it can be a program name with args.
30677set dummy $tool_basename; ac_word=$2
30678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30679$as_echo_n "checking for $ac_word... " >&6; }
30680if ${ac_cv_path_JAVAC+:} false; then :
30681  $as_echo_n "(cached) " >&6
30682else
30683  case $JAVAC in
30684  [\\/]* | ?:[\\/]*)
30685  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30686  ;;
30687  *)
30688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30689for as_dir in $PATH
30690do
30691  IFS=$as_save_IFS
30692  test -z "$as_dir" && as_dir=.
30693    for ac_exec_ext in '' $ac_executable_extensions; do
30694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30695    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30697    break 2
30698  fi
30699done
30700  done
30701IFS=$as_save_IFS
30702
30703  ;;
30704esac
30705fi
30706JAVAC=$ac_cv_path_JAVAC
30707if test -n "$JAVAC"; then
30708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30709$as_echo "$JAVAC" >&6; }
30710else
30711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30712$as_echo "no" >&6; }
30713fi
30714
30715
30716          if test "x$JAVAC" = x; then
30717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30718          fi
30719        else
30720          # Otherwise we believe it is a complete path. Use it as it is.
30721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30722$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30724$as_echo_n "checking for JAVAC... " >&6; }
30725          if test ! -x "$tool_specified"; then
30726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30727$as_echo "not found" >&6; }
30728            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30729          fi
30730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30731$as_echo "$tool_specified" >&6; }
30732        fi
30733      fi
30734    fi
30735
30736  fi
30737
30738
30739
30740  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30741
30742  # Publish this variable in the help.
30743
30744
30745  if [ -z "${JAVAH+x}" ]; then
30746    # The variable is not set by user, try to locate tool using the code snippet
30747
30748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30749$as_echo_n "checking for javah in Boot JDK... " >&6; }
30750      JAVAH=$BOOT_JDK/bin/javah
30751      if test ! -x $JAVAH; then
30752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30753$as_echo "not found" >&6; }
30754        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30755$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30756        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30757      fi
30758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30759$as_echo "ok" >&6; }
30760
30761
30762  else
30763    # The variable is set, but is it from the command line or the environment?
30764
30765    # Try to remove the string !JAVAH! from our list.
30766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30768      # If it failed, the variable was not from the command line. Ignore it,
30769      # but warn the user (except for BASH, which is always set by the calling BASH).
30770      if test "xJAVAH" != xBASH; then
30771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30772$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30773      fi
30774      # Try to locate tool using the code snippet
30775
30776      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30777$as_echo_n "checking for javah in Boot JDK... " >&6; }
30778      JAVAH=$BOOT_JDK/bin/javah
30779      if test ! -x $JAVAH; then
30780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30781$as_echo "not found" >&6; }
30782        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30783$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30784        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30785      fi
30786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30787$as_echo "ok" >&6; }
30788
30789
30790    else
30791      # If it succeeded, then it was overridden by the user. We will use it
30792      # for the tool.
30793
30794      # First remove it from the list of overridden variables, so we can test
30795      # for unknown variables in the end.
30796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30797
30798      # Check if we try to supply an empty value
30799      if test "x$JAVAH" = x; then
30800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30801$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30803$as_echo_n "checking for JAVAH... " >&6; }
30804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30805$as_echo "disabled" >&6; }
30806      else
30807        # Check if the provided tool contains a complete path.
30808        tool_specified="$JAVAH"
30809        tool_basename="${tool_specified##*/}"
30810        if test "x$tool_basename" = "x$tool_specified"; then
30811          # A command without a complete path is provided, search $PATH.
30812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30813$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30814          # Extract the first word of "$tool_basename", so it can be a program name with args.
30815set dummy $tool_basename; ac_word=$2
30816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30817$as_echo_n "checking for $ac_word... " >&6; }
30818if ${ac_cv_path_JAVAH+:} false; then :
30819  $as_echo_n "(cached) " >&6
30820else
30821  case $JAVAH in
30822  [\\/]* | ?:[\\/]*)
30823  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30824  ;;
30825  *)
30826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30827for as_dir in $PATH
30828do
30829  IFS=$as_save_IFS
30830  test -z "$as_dir" && as_dir=.
30831    for ac_exec_ext in '' $ac_executable_extensions; do
30832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30833    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30835    break 2
30836  fi
30837done
30838  done
30839IFS=$as_save_IFS
30840
30841  ;;
30842esac
30843fi
30844JAVAH=$ac_cv_path_JAVAH
30845if test -n "$JAVAH"; then
30846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30847$as_echo "$JAVAH" >&6; }
30848else
30849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30850$as_echo "no" >&6; }
30851fi
30852
30853
30854          if test "x$JAVAH" = x; then
30855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30856          fi
30857        else
30858          # Otherwise we believe it is a complete path. Use it as it is.
30859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30860$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30862$as_echo_n "checking for JAVAH... " >&6; }
30863          if test ! -x "$tool_specified"; then
30864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30865$as_echo "not found" >&6; }
30866            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30867          fi
30868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30869$as_echo "$tool_specified" >&6; }
30870        fi
30871      fi
30872    fi
30873
30874  fi
30875
30876
30877
30878  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30879
30880  # Publish this variable in the help.
30881
30882
30883  if [ -z "${JAR+x}" ]; then
30884    # The variable is not set by user, try to locate tool using the code snippet
30885
30886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30887$as_echo_n "checking for jar in Boot JDK... " >&6; }
30888      JAR=$BOOT_JDK/bin/jar
30889      if test ! -x $JAR; then
30890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30891$as_echo "not found" >&6; }
30892        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30893$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30894        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30895      fi
30896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30897$as_echo "ok" >&6; }
30898
30899
30900  else
30901    # The variable is set, but is it from the command line or the environment?
30902
30903    # Try to remove the string !JAR! from our list.
30904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30906      # If it failed, the variable was not from the command line. Ignore it,
30907      # but warn the user (except for BASH, which is always set by the calling BASH).
30908      if test "xJAR" != xBASH; then
30909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30910$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30911      fi
30912      # Try to locate tool using the code snippet
30913
30914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30915$as_echo_n "checking for jar in Boot JDK... " >&6; }
30916      JAR=$BOOT_JDK/bin/jar
30917      if test ! -x $JAR; then
30918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30919$as_echo "not found" >&6; }
30920        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30921$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30922        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30923      fi
30924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30925$as_echo "ok" >&6; }
30926
30927
30928    else
30929      # If it succeeded, then it was overridden by the user. We will use it
30930      # for the tool.
30931
30932      # First remove it from the list of overridden variables, so we can test
30933      # for unknown variables in the end.
30934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30935
30936      # Check if we try to supply an empty value
30937      if test "x$JAR" = x; then
30938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30939$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30941$as_echo_n "checking for JAR... " >&6; }
30942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30943$as_echo "disabled" >&6; }
30944      else
30945        # Check if the provided tool contains a complete path.
30946        tool_specified="$JAR"
30947        tool_basename="${tool_specified##*/}"
30948        if test "x$tool_basename" = "x$tool_specified"; then
30949          # A command without a complete path is provided, search $PATH.
30950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30951$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30952          # Extract the first word of "$tool_basename", so it can be a program name with args.
30953set dummy $tool_basename; ac_word=$2
30954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30955$as_echo_n "checking for $ac_word... " >&6; }
30956if ${ac_cv_path_JAR+:} false; then :
30957  $as_echo_n "(cached) " >&6
30958else
30959  case $JAR in
30960  [\\/]* | ?:[\\/]*)
30961  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30962  ;;
30963  *)
30964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30965for as_dir in $PATH
30966do
30967  IFS=$as_save_IFS
30968  test -z "$as_dir" && as_dir=.
30969    for ac_exec_ext in '' $ac_executable_extensions; do
30970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30971    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30973    break 2
30974  fi
30975done
30976  done
30977IFS=$as_save_IFS
30978
30979  ;;
30980esac
30981fi
30982JAR=$ac_cv_path_JAR
30983if test -n "$JAR"; then
30984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30985$as_echo "$JAR" >&6; }
30986else
30987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30988$as_echo "no" >&6; }
30989fi
30990
30991
30992          if test "x$JAR" = x; then
30993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30994          fi
30995        else
30996          # Otherwise we believe it is a complete path. Use it as it is.
30997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30998$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31000$as_echo_n "checking for JAR... " >&6; }
31001          if test ! -x "$tool_specified"; then
31002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31003$as_echo "not found" >&6; }
31004            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31005          fi
31006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31007$as_echo "$tool_specified" >&6; }
31008        fi
31009      fi
31010    fi
31011
31012  fi
31013
31014
31015
31016  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31017
31018  # Publish this variable in the help.
31019
31020
31021  if [ -z "${JARSIGNER+x}" ]; then
31022    # The variable is not set by user, try to locate tool using the code snippet
31023
31024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31025$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31026      JARSIGNER=$BOOT_JDK/bin/jarsigner
31027      if test ! -x $JARSIGNER; then
31028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31029$as_echo "not found" >&6; }
31030        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31031$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31032        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31033      fi
31034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31035$as_echo "ok" >&6; }
31036
31037
31038  else
31039    # The variable is set, but is it from the command line or the environment?
31040
31041    # Try to remove the string !JARSIGNER! from our list.
31042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31044      # If it failed, the variable was not from the command line. Ignore it,
31045      # but warn the user (except for BASH, which is always set by the calling BASH).
31046      if test "xJARSIGNER" != xBASH; then
31047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31048$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31049      fi
31050      # Try to locate tool using the code snippet
31051
31052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31053$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31054      JARSIGNER=$BOOT_JDK/bin/jarsigner
31055      if test ! -x $JARSIGNER; then
31056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31057$as_echo "not found" >&6; }
31058        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31060        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31061      fi
31062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31063$as_echo "ok" >&6; }
31064
31065
31066    else
31067      # If it succeeded, then it was overridden by the user. We will use it
31068      # for the tool.
31069
31070      # First remove it from the list of overridden variables, so we can test
31071      # for unknown variables in the end.
31072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31073
31074      # Check if we try to supply an empty value
31075      if test "x$JARSIGNER" = x; then
31076        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31077$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31079$as_echo_n "checking for JARSIGNER... " >&6; }
31080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31081$as_echo "disabled" >&6; }
31082      else
31083        # Check if the provided tool contains a complete path.
31084        tool_specified="$JARSIGNER"
31085        tool_basename="${tool_specified##*/}"
31086        if test "x$tool_basename" = "x$tool_specified"; then
31087          # A command without a complete path is provided, search $PATH.
31088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31089$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31090          # Extract the first word of "$tool_basename", so it can be a program name with args.
31091set dummy $tool_basename; ac_word=$2
31092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31093$as_echo_n "checking for $ac_word... " >&6; }
31094if ${ac_cv_path_JARSIGNER+:} false; then :
31095  $as_echo_n "(cached) " >&6
31096else
31097  case $JARSIGNER in
31098  [\\/]* | ?:[\\/]*)
31099  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31100  ;;
31101  *)
31102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31103for as_dir in $PATH
31104do
31105  IFS=$as_save_IFS
31106  test -z "$as_dir" && as_dir=.
31107    for ac_exec_ext in '' $ac_executable_extensions; do
31108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31109    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31111    break 2
31112  fi
31113done
31114  done
31115IFS=$as_save_IFS
31116
31117  ;;
31118esac
31119fi
31120JARSIGNER=$ac_cv_path_JARSIGNER
31121if test -n "$JARSIGNER"; then
31122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31123$as_echo "$JARSIGNER" >&6; }
31124else
31125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31126$as_echo "no" >&6; }
31127fi
31128
31129
31130          if test "x$JARSIGNER" = x; then
31131            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31132          fi
31133        else
31134          # Otherwise we believe it is a complete path. Use it as it is.
31135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31136$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31137          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31138$as_echo_n "checking for JARSIGNER... " >&6; }
31139          if test ! -x "$tool_specified"; then
31140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31141$as_echo "not found" >&6; }
31142            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31143          fi
31144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31145$as_echo "$tool_specified" >&6; }
31146        fi
31147      fi
31148    fi
31149
31150  fi
31151
31152
31153
31154  # Finally, set some other options...
31155
31156  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31157  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31158
31159
31160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31161$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31162  if "$JAVA" --list-modules > /dev/null 2>&1; then
31163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31164$as_echo "yes" >&6; }
31165    BOOT_JDK_MODULAR="true"
31166  else
31167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31168$as_echo "no" >&6; }
31169    BOOT_JDK_MODULAR="false"
31170  fi
31171
31172
31173
31174
31175  # Check if the boot jdk is 32 or 64 bit
31176  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31177    BOOT_JDK_BITS="64"
31178  else
31179    BOOT_JDK_BITS="32"
31180  fi
31181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31182$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31184$as_echo "$BOOT_JDK_BITS" >&6; }
31185
31186
31187
31188# Check whether --with-build-jdk was given.
31189if test "${with_build_jdk+set}" = set; then :
31190  withval=$with_build_jdk;
31191fi
31192
31193
31194  CREATE_BUILDJDK=false
31195  EXTERNAL_BUILDJDK=false
31196  BUILD_JDK_FOUND="no"
31197  if test "x$with_build_jdk" != "x"; then
31198
31199  if test "x$BUILD_JDK_FOUND" = xno; then
31200    # Execute the test
31201
31202       if test "x$with_build_jdk" != x; then
31203         BUILD_JDK=$with_build_jdk
31204         BUILD_JDK_FOUND=maybe
31205         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31206$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31207       fi
31208
31209    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31210    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31211      # Do we have a bin/java?
31212      if test ! -x "$BUILD_JDK/bin/java"; then
31213        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31214$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31215        BUILD_JDK_FOUND=no
31216      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31217        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31218$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31219        BUILD_JDK_FOUND=no
31220      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31221        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31222$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31223        BUILD_JDK_FOUND=no
31224      elif test ! -x "$BUILD_JDK/bin/javac"; then
31225        # Do we have a bin/javac?
31226        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31227$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31228        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31229$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31230        BUILD_JDK_FOUND=no
31231      else
31232        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31233        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31234
31235        # Extra M4 quote needed to protect [] in grep expression.
31236        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31237        if test "x$FOUND_CORRECT_VERSION" = x; then
31238          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31239$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31240          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31241$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31242          BUILD_JDK_FOUND=no
31243        else
31244          # We're done!
31245          BUILD_JDK_FOUND=yes
31246
31247  # Only process if variable expands to non-empty
31248
31249  if test "x$BUILD_JDK" != x; then
31250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31251
31252  # Input might be given as Windows format, start by converting to
31253  # unix format.
31254  path="$BUILD_JDK"
31255  new_path=`$CYGPATH -u "$path"`
31256
31257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31260  # "foo.exe" is OK but "foo" is an error.
31261  #
31262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31263  # It is also a way to make sure we got the proper file name for the real test later on.
31264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31265  if test "x$test_shortpath" = x; then
31266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31267$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31268    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31269  fi
31270
31271  # Call helper function which possibly converts this using DOS-style short mode.
31272  # If so, the updated path is stored in $new_path.
31273
31274  input_path="$new_path"
31275  # Check if we need to convert this using DOS-style short mode. If the path
31276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31277  # take no chances and rewrite it.
31278  # Note: m4 eats our [], so we need to use [ and ] instead.
31279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31280  if test "x$has_forbidden_chars" != x; then
31281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31285      # Going to short mode and back again did indeed matter. Since short mode is
31286      # case insensitive, let's make it lowercase to improve readability.
31287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31288      # Now convert it back to Unix-style (cygpath)
31289      input_path=`$CYGPATH -u "$shortmode_path"`
31290      new_path="$input_path"
31291    fi
31292  fi
31293
31294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31295  if test "x$test_cygdrive_prefix" = x; then
31296    # As a simple fix, exclude /usr/bin since it's not a real path.
31297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31299      # a path prefixed by /cygdrive for fixpath to work.
31300      new_path="$CYGWIN_ROOT_PATH$input_path"
31301    fi
31302  fi
31303
31304
31305  if test "x$path" != "x$new_path"; then
31306    BUILD_JDK="$new_path"
31307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31308$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31309  fi
31310
31311    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31312
31313  path="$BUILD_JDK"
31314  has_colon=`$ECHO $path | $GREP ^.:`
31315  new_path="$path"
31316  if test "x$has_colon" = x; then
31317    # Not in mixed or Windows style, start by that.
31318    new_path=`cmd //c echo $path`
31319  fi
31320
31321
31322  input_path="$new_path"
31323  # Check if we need to convert this using DOS-style short mode. If the path
31324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31325  # take no chances and rewrite it.
31326  # Note: m4 eats our [], so we need to use [ and ] instead.
31327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31328  if test "x$has_forbidden_chars" != x; then
31329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31331  fi
31332
31333
31334  windows_path="$new_path"
31335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31336    unix_path=`$CYGPATH -u "$windows_path"`
31337    new_path="$unix_path"
31338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31340    new_path="$unix_path"
31341  fi
31342
31343  if test "x$path" != "x$new_path"; then
31344    BUILD_JDK="$new_path"
31345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31346$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31347  fi
31348
31349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31351
31352    else
31353      # We're on a unix platform. Hooray! :)
31354      path="$BUILD_JDK"
31355      has_space=`$ECHO "$path" | $GREP " "`
31356      if test "x$has_space" != x; then
31357        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31358$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31359        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31360      fi
31361
31362      # Use eval to expand a potential ~
31363      eval path="$path"
31364      if test ! -f "$path" && test ! -d "$path"; then
31365        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31366      fi
31367
31368      if test -d "$path"; then
31369        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31370      else
31371        dir="`$DIRNAME "$path"`"
31372        base="`$BASENAME "$path"`"
31373        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31374      fi
31375    fi
31376  fi
31377
31378          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31379$as_echo_n "checking for Build JDK... " >&6; }
31380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31381$as_echo "$BUILD_JDK" >&6; }
31382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31383$as_echo_n "checking Build JDK version... " >&6; }
31384          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31386$as_echo "$BUILD_JDK_VERSION" >&6; }
31387        fi # end check jdk version
31388      fi # end check java
31389    fi # end check build jdk found
31390  fi
31391
31392    EXTERNAL_BUILDJDK=true
31393  else
31394    if test "x$COMPILE_TYPE" = "xcross"; then
31395      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31396      BUILD_JDK_FOUND=yes
31397      CREATE_BUILDJDK=true
31398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31399$as_echo_n "checking for Build JDK... " >&6; }
31400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31401$as_echo "yes, will build it for the host platform" >&6; }
31402    else
31403      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31404      BUILD_JDK_FOUND=yes
31405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31406$as_echo_n "checking for Build JDK... " >&6; }
31407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31408$as_echo "yes, will use output dir" >&6; }
31409    fi
31410  fi
31411
31412  JMOD="$BUILD_JDK/bin/jmod"
31413  JLINK="$BUILD_JDK/bin/jlink"
31414
31415
31416
31417  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31419$as_echo_n "checking for Build JDK... " >&6; }
31420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31421$as_echo "no" >&6; }
31422    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31423  fi
31424
31425
31426
31427
31428
31429
31430###############################################################################
31431#
31432# Configure the sources to use. We can add or override individual directories.
31433#
31434###############################################################################
31435
31436
31437  # Where are the sources.
31438  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31439  CORBA_TOPDIR="$SRC_ROOT/corba"
31440  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31441  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31442  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31443  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31444  JDK_TOPDIR="$SRC_ROOT/jdk"
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454  # This feature is no longer supported.
31455
31456
31457
31458# Check whether --with-add-source-root was given.
31459if test "${with_add_source_root+set}" = set; then :
31460  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
31461$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31462fi
31463
31464
31465
31466
31467# Check whether --with-override-source-root was given.
31468if test "${with_override_source_root+set}" = set; then :
31469  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
31470$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31471fi
31472
31473
31474
31475
31476# Check whether --with-adds-and-overrides was given.
31477if test "${with_adds_and_overrides+set}" = set; then :
31478  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
31479$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31480fi
31481
31482
31483
31484
31485# Check whether --with-override-langtools was given.
31486if test "${with_override_langtools+set}" = set; then :
31487  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31488$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31489fi
31490
31491
31492
31493
31494# Check whether --with-override-corba was given.
31495if test "${with_override_corba+set}" = set; then :
31496  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31497$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31498fi
31499
31500
31501
31502
31503# Check whether --with-override-jaxp was given.
31504if test "${with_override_jaxp+set}" = set; then :
31505  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31506$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31507fi
31508
31509
31510
31511
31512# Check whether --with-override-jaxws was given.
31513if test "${with_override_jaxws+set}" = set; then :
31514  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31515$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31516fi
31517
31518
31519
31520
31521# Check whether --with-override-hotspot was given.
31522if test "${with_override_hotspot+set}" = set; then :
31523  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31524$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31525fi
31526
31527
31528
31529
31530# Check whether --with-override-nashorn was given.
31531if test "${with_override_nashorn+set}" = set; then :
31532  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31533$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31534fi
31535
31536
31537
31538
31539# Check whether --with-override-jdk was given.
31540if test "${with_override_jdk+set}" = set; then :
31541  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31542$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31543fi
31544
31545
31546
31547
31548  BUILD_OUTPUT="$OUTPUT_ROOT"
31549
31550  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31551
31552
31553
31554# Check whether --with-import_hotspot was given.
31555if test "${with_import_hotspot+set}" = set; then :
31556  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31557$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31558fi
31559
31560
31561
31562
31563
31564
31565# Check whether --with-import-modules was given.
31566if test "${with_import_modules+set}" = set; then :
31567  withval=$with_import_modules;
31568fi
31569
31570
31571  if test "x$with_import_modules" != x \
31572      && test "x$with_import_modules" != "xno"; then
31573    if test -d "$with_import_modules"; then
31574      IMPORT_MODULES_TOPDIR="$with_import_modules"
31575
31576  # Only process if variable expands to non-empty
31577
31578  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31580
31581  # Input might be given as Windows format, start by converting to
31582  # unix format.
31583  path="$IMPORT_MODULES_TOPDIR"
31584  new_path=`$CYGPATH -u "$path"`
31585
31586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31589  # "foo.exe" is OK but "foo" is an error.
31590  #
31591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31592  # It is also a way to make sure we got the proper file name for the real test later on.
31593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31594  if test "x$test_shortpath" = x; then
31595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31596$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31597    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31598  fi
31599
31600  # Call helper function which possibly converts this using DOS-style short mode.
31601  # If so, the updated path is stored in $new_path.
31602
31603  input_path="$new_path"
31604  # Check if we need to convert this using DOS-style short mode. If the path
31605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31606  # take no chances and rewrite it.
31607  # Note: m4 eats our [], so we need to use [ and ] instead.
31608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31609  if test "x$has_forbidden_chars" != x; then
31610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31614      # Going to short mode and back again did indeed matter. Since short mode is
31615      # case insensitive, let's make it lowercase to improve readability.
31616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31617      # Now convert it back to Unix-style (cygpath)
31618      input_path=`$CYGPATH -u "$shortmode_path"`
31619      new_path="$input_path"
31620    fi
31621  fi
31622
31623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31624  if test "x$test_cygdrive_prefix" = x; then
31625    # As a simple fix, exclude /usr/bin since it's not a real path.
31626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31628      # a path prefixed by /cygdrive for fixpath to work.
31629      new_path="$CYGWIN_ROOT_PATH$input_path"
31630    fi
31631  fi
31632
31633
31634  if test "x$path" != "x$new_path"; then
31635    IMPORT_MODULES_TOPDIR="$new_path"
31636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31637$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31638  fi
31639
31640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31641
31642  path="$IMPORT_MODULES_TOPDIR"
31643  has_colon=`$ECHO $path | $GREP ^.:`
31644  new_path="$path"
31645  if test "x$has_colon" = x; then
31646    # Not in mixed or Windows style, start by that.
31647    new_path=`cmd //c echo $path`
31648  fi
31649
31650
31651  input_path="$new_path"
31652  # Check if we need to convert this using DOS-style short mode. If the path
31653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31654  # take no chances and rewrite it.
31655  # Note: m4 eats our [], so we need to use [ and ] instead.
31656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31657  if test "x$has_forbidden_chars" != x; then
31658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31660  fi
31661
31662
31663  windows_path="$new_path"
31664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31665    unix_path=`$CYGPATH -u "$windows_path"`
31666    new_path="$unix_path"
31667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31669    new_path="$unix_path"
31670  fi
31671
31672  if test "x$path" != "x$new_path"; then
31673    IMPORT_MODULES_TOPDIR="$new_path"
31674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31675$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31676  fi
31677
31678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31680
31681    else
31682      # We're on a unix platform. Hooray! :)
31683      path="$IMPORT_MODULES_TOPDIR"
31684      has_space=`$ECHO "$path" | $GREP " "`
31685      if test "x$has_space" != x; then
31686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31687$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31689      fi
31690
31691      # Use eval to expand a potential ~
31692      eval path="$path"
31693      if test ! -f "$path" && test ! -d "$path"; then
31694        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31695      fi
31696
31697      if test -d "$path"; then
31698        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31699      else
31700        dir="`$DIRNAME "$path"`"
31701        base="`$BASENAME "$path"`"
31702        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31703      fi
31704    fi
31705  fi
31706
31707    elif test -e "$with_import_modules"; then
31708      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31709      $RM -rf "$IMPORT_MODULES_TOPDIR"
31710      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31711      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31712        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31713      fi
31714    else
31715      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31716    fi
31717  fi
31718
31719  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31720    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31721  fi
31722  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31723    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31724  fi
31725  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31726    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31727  fi
31728  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31729    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31730  fi
31731  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31732    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31733  fi
31734  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31735    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31736  fi
31737  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31738    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31739  fi
31740  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31741    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31742  fi
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754###############################################################################
31755#
31756# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31757# native code.
31758#
31759###############################################################################
31760
31761# See if we are doing a complete static build or not
31762
31763  # Check whether --enable-static-build was given.
31764if test "${enable_static_build+set}" = set; then :
31765  enableval=$enable_static_build;
31766fi
31767
31768  STATIC_BUILD=false
31769  if test "x$enable_static_build" = "xyes"; then
31770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31771$as_echo_n "checking if static build is enabled... " >&6; }
31772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31773$as_echo "yes" >&6; }
31774    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31775      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31776    fi
31777    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31778    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31779    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31780    STATIC_BUILD=true
31781  elif test "x$enable_static_build" = "xno"; then
31782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31783$as_echo_n "checking if static build is enabled... " >&6; }
31784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31785$as_echo "no" >&6; }
31786  elif test "x$enable_static_build" != "x"; then
31787    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31788  fi
31789
31790
31791
31792
31793# First determine the toolchain type (compiler family)
31794
31795
31796# Check whether --with-toolchain-type was given.
31797if test "${with_toolchain_type+set}" = set; then :
31798  withval=$with_toolchain_type;
31799fi
31800
31801
31802  # Use indirect variable referencing
31803  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31804  VALID_TOOLCHAINS=${!toolchain_var_name}
31805
31806  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31807    if test -n "$XCODEBUILD"; then
31808      # On Mac OS X, default toolchain to clang after Xcode 5
31809      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31810      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31811      if test $? -ne 0; then
31812        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31813      fi
31814      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31815          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31816          $CUT -f 1 -d .`
31817      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31818$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31819      if test $XCODE_MAJOR_VERSION -ge 5; then
31820          DEFAULT_TOOLCHAIN="clang"
31821      else
31822          DEFAULT_TOOLCHAIN="gcc"
31823      fi
31824    else
31825      # If Xcode is not installed, but the command line tools are
31826      # then we can't run xcodebuild. On these systems we should
31827      # default to clang
31828      DEFAULT_TOOLCHAIN="clang"
31829    fi
31830  else
31831    # First toolchain type in the list is the default
31832    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31833  fi
31834
31835  if test "x$with_toolchain_type" = xlist; then
31836    # List all toolchains
31837    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31838$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31839    for toolchain in $VALID_TOOLCHAINS; do
31840      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31841      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31842      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31843    done
31844
31845    exit 0
31846  elif test "x$with_toolchain_type" != x; then
31847    # User override; check that it is valid
31848    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31849      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31850$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31851      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31852$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31853      as_fn_error $? "Cannot continue." "$LINENO" 5
31854    fi
31855    TOOLCHAIN_TYPE=$with_toolchain_type
31856  else
31857    # No flag given, use default
31858    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31859  fi
31860
31861
31862  TOOLCHAIN_CC_BINARY_clang="clang"
31863  TOOLCHAIN_CC_BINARY_gcc="gcc"
31864  TOOLCHAIN_CC_BINARY_microsoft="cl"
31865  TOOLCHAIN_CC_BINARY_solstudio="cc"
31866  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31867
31868  TOOLCHAIN_CXX_BINARY_clang="clang++"
31869  TOOLCHAIN_CXX_BINARY_gcc="g++"
31870  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31871  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31872  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31873
31874  # Use indirect variable referencing
31875  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31876  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31877  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31878  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31879  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31880  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31881  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31882  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31883
31884
31885  # Define filename patterns
31886  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31887    LIBRARY_PREFIX=
31888    SHARED_LIBRARY_SUFFIX='.dll'
31889    STATIC_LIBRARY_SUFFIX='.lib'
31890    SHARED_LIBRARY='$1.dll'
31891    STATIC_LIBRARY='$1.lib'
31892    OBJ_SUFFIX='.obj'
31893    EXE_SUFFIX='.exe'
31894  else
31895    LIBRARY_PREFIX=lib
31896    SHARED_LIBRARY_SUFFIX='.so'
31897    STATIC_LIBRARY_SUFFIX='.a'
31898    SHARED_LIBRARY='lib$1.so'
31899    STATIC_LIBRARY='lib$1.a'
31900    OBJ_SUFFIX='.o'
31901    EXE_SUFFIX=''
31902    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31903      # For full static builds, we're overloading the SHARED_LIBRARY
31904      # variables in order to limit the amount of changes required.
31905      # It would be better to remove SHARED and just use LIBRARY and
31906      # LIBRARY_SUFFIX for libraries that can be built either
31907      # shared or static and use STATIC_* for libraries that are
31908      # always built statically.
31909      if test "x$STATIC_BUILD" = xtrue; then
31910        SHARED_LIBRARY='lib$1.a'
31911        SHARED_LIBRARY_SUFFIX='.a'
31912      else
31913        SHARED_LIBRARY='lib$1.dylib'
31914        SHARED_LIBRARY_SUFFIX='.dylib'
31915      fi
31916    fi
31917  fi
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31929    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31930$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31931  else
31932    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31933$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31934  fi
31935
31936
31937# User supplied flags should be used when configure detects compilers
31938
31939  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31940    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31941$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31942  fi
31943
31944  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31945    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31946$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31947  fi
31948
31949  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31950    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31951$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31952  fi
31953
31954
31955# Check whether --with-extra-cflags was given.
31956if test "${with_extra_cflags+set}" = set; then :
31957  withval=$with_extra_cflags;
31958fi
31959
31960
31961
31962# Check whether --with-extra-cxxflags was given.
31963if test "${with_extra_cxxflags+set}" = set; then :
31964  withval=$with_extra_cxxflags;
31965fi
31966
31967
31968
31969# Check whether --with-extra-ldflags was given.
31970if test "${with_extra_ldflags+set}" = set; then :
31971  withval=$with_extra_ldflags;
31972fi
31973
31974
31975  EXTRA_CFLAGS="$with_extra_cflags"
31976  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31977  EXTRA_LDFLAGS="$with_extra_ldflags"
31978
31979
31980
31981
31982
31983  # The global CFLAGS and LDLAGS variables are used by configure tests and
31984  # should include the extra parameters
31985  CFLAGS="$EXTRA_CFLAGS"
31986  CXXFLAGS="$EXTRA_CXXFLAGS"
31987  LDFLAGS="$EXTRA_LDFLAGS"
31988  CPPFLAGS=""
31989
31990# The sysroot cflags are needed for configure to be able to run the compilers
31991
31992  if test "x$SYSROOT" != "x"; then
31993    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31994      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31995        # Solaris Studio does not have a concept of sysroot. Instead we must
31996        # make sure the default include and lib dirs are appended to each
31997        # compile and link command line. Must also add -I-xbuiltin to enable
31998        # inlining of system functions and intrinsics.
31999        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32000        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32001            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32002      fi
32003    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32004      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32005      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32006    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32007      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32008      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32009    fi
32010    # The global CFLAGS and LDFLAGS variables need these for configure to function
32011    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32012    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32013    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32014    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32015  fi
32016
32017  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32018    # We also need -iframework<path>/System/Library/Frameworks
32019    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32020    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32021    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32022    # set this here so it doesn't have to be peppered throughout the forest
32023    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32024    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32025  fi
32026
32027
32028
32029
32030
32031# Then detect the actual binaries needed
32032
32033  # FIXME: Is this needed?
32034  ac_ext=cpp
32035ac_cpp='$CXXCPP $CPPFLAGS'
32036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32039
32040
32041  # Store the CFLAGS etc passed to the configure script.
32042  ORG_CFLAGS="$CFLAGS"
32043  ORG_CXXFLAGS="$CXXFLAGS"
32044
32045  # autoconf magic only relies on PATH, so update it if tools dir is specified
32046  OLD_PATH="$PATH"
32047
32048  # On Windows, we need to detect the visual studio installation first.
32049  # This will change the PATH, but we need to keep that new PATH even
32050  # after toolchain detection is done, since the compiler (on x86) uses
32051  # it for DLL resolution in runtime.
32052  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32053      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32054
32055  # Store path to cygwin link.exe to help excluding it when searching for
32056  # VS linker. This must be done before changing the PATH when looking for VS.
32057  # Extract the first word of "link", so it can be a program name with args.
32058set dummy link; ac_word=$2
32059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32060$as_echo_n "checking for $ac_word... " >&6; }
32061if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32062  $as_echo_n "(cached) " >&6
32063else
32064  case $CYGWIN_LINK in
32065  [\\/]* | ?:[\\/]*)
32066  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32067  ;;
32068  *)
32069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32070for as_dir in $PATH
32071do
32072  IFS=$as_save_IFS
32073  test -z "$as_dir" && as_dir=.
32074    for ac_exec_ext in '' $ac_executable_extensions; do
32075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32076    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32078    break 2
32079  fi
32080done
32081  done
32082IFS=$as_save_IFS
32083
32084  ;;
32085esac
32086fi
32087CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32088if test -n "$CYGWIN_LINK"; then
32089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32090$as_echo "$CYGWIN_LINK" >&6; }
32091else
32092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32093$as_echo "no" >&6; }
32094fi
32095
32096
32097  if test "x$CYGWIN_LINK" != x; then
32098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32099$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32100    "$CYGWIN_LINK" --version > /dev/null
32101    if test $? -eq 0 ; then
32102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32103$as_echo "yes" >&6; }
32104    else
32105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32106$as_echo "no" >&6; }
32107      # This might be the VS linker. Don't exclude it later on.
32108      CYGWIN_LINK=""
32109    fi
32110  fi
32111
32112  # First-hand choice is to locate and run the vsvars bat file.
32113
32114
32115# Check whether --with-toolchain-version was given.
32116if test "${with_toolchain_version+set}" = set; then :
32117  withval=$with_toolchain_version;
32118fi
32119
32120
32121  if test "x$with_toolchain_version" = xlist; then
32122    # List all toolchains
32123    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32124$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32125    for version in $VALID_VS_VERSIONS; do
32126      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32127      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32128    done
32129
32130    exit 0
32131  elif test "x$DEVKIT_VS_VERSION" != x; then
32132    VS_VERSION=$DEVKIT_VS_VERSION
32133    TOOLCHAIN_VERSION=$VS_VERSION
32134    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32135    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32136    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32137    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32138    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32139    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32140
32141    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32142    # can still be exported as INCLUDE for compiler invocations without
32143    # SYSROOT_CFLAGS
32144    OLDIFS="$IFS"
32145    IFS=";"
32146    for i in $DEVKIT_VS_INCLUDE; do
32147      ipath=$i
32148
32149  unix_path="$ipath"
32150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32151    windows_path=`$CYGPATH -m "$unix_path"`
32152    ipath="$windows_path"
32153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32154    windows_path=`cmd //c echo $unix_path`
32155    ipath="$windows_path"
32156  fi
32157
32158      VS_INCLUDE="$VS_INCLUDE;$ipath"
32159    done
32160    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32161    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32162    for i in $DEVKIT_VS_LIB; do
32163      libpath=$i
32164
32165  unix_path="$libpath"
32166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32167    windows_path=`$CYGPATH -m "$unix_path"`
32168    libpath="$windows_path"
32169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32170    windows_path=`cmd //c echo $unix_path`
32171    libpath="$windows_path"
32172  fi
32173
32174      VS_LIB="$VS_LIB;$libpath"
32175    done
32176    IFS="$OLDIFS"
32177
32178    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32179$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32180
32181  elif test "x$with_toolchain_version" != x; then
32182    # User override; check that it is valid
32183    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32184      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32185$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32186      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32187$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32188      as_fn_error $? "Cannot continue." "$LINENO" 5
32189    fi
32190    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32191  else
32192    # No flag given, use default
32193    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32194  fi
32195
32196  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32197
32198  VS_VERSION="$VS_VERSION"
32199  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32200  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32201  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32202  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32203
32204  # When using --with-tools-dir, assume it points to the correct and default
32205  # version of Visual Studio or that --with-toolchain-version was also set.
32206  if test "x$with_tools_dir" != x; then
32207
32208  if test "x$VS_ENV_CMD" = x; then
32209    VS_VERSION="${VS_VERSION}"
32210    VS_BASE="$with_tools_dir/../.."
32211    METHOD="--with-tools-dir"
32212
32213    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32214      VCVARSFILE="vc/bin/vcvars32.bat"
32215    else
32216      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32217    fi
32218
32219
32220  windows_path="$VS_BASE"
32221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32222    unix_path=`$CYGPATH -u "$windows_path"`
32223    VS_BASE="$unix_path"
32224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32226    VS_BASE="$unix_path"
32227  fi
32228
32229    if test -d "$VS_BASE"; then
32230      if test -f "$VS_BASE/$VCVARSFILE"; then
32231        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32232$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32233        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32234        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32235        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32236        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32237      else
32238        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32239$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32240        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32241$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32242      fi
32243    fi
32244  fi
32245
32246
32247  if test "x$VS_ENV_CMD" = x; then
32248    VS_VERSION="${VS_VERSION}"
32249    VS_BASE="$with_tools_dir/../../.."
32250    METHOD="--with-tools-dir"
32251
32252    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32253      VCVARSFILE="vc/bin/vcvars32.bat"
32254    else
32255      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32256    fi
32257
32258
32259  windows_path="$VS_BASE"
32260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32261    unix_path=`$CYGPATH -u "$windows_path"`
32262    VS_BASE="$unix_path"
32263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32265    VS_BASE="$unix_path"
32266  fi
32267
32268    if test -d "$VS_BASE"; then
32269      if test -f "$VS_BASE/$VCVARSFILE"; then
32270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32271$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32272        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32273        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32274        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32275        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32276      else
32277        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32278$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32279        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32280$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32281      fi
32282    fi
32283  fi
32284
32285    if test "x$VS_ENV_CMD" = x; then
32286      # Having specified an argument which is incorrect will produce an instant failure;
32287      # we should not go on looking
32288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32289$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32290      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32291$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32292      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32293$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32294      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32295    fi
32296  fi
32297
32298  VS_ENV_CMD=""
32299  VS_ENV_ARGS=""
32300
32301  if test "x$VS_COMNTOOLS" != x; then
32302
32303  if test "x$VS_ENV_CMD" = x; then
32304    VS_VERSION="${VS_VERSION}"
32305    VS_BASE="$VS_COMNTOOLS/../.."
32306    METHOD="$VS_COMNTOOLS_VAR variable"
32307
32308    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32309      VCVARSFILE="vc/bin/vcvars32.bat"
32310    else
32311      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32312    fi
32313
32314
32315  windows_path="$VS_BASE"
32316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32317    unix_path=`$CYGPATH -u "$windows_path"`
32318    VS_BASE="$unix_path"
32319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32321    VS_BASE="$unix_path"
32322  fi
32323
32324    if test -d "$VS_BASE"; then
32325      if test -f "$VS_BASE/$VCVARSFILE"; then
32326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32327$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32328        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32329        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32330        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32331        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32332      else
32333        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32334$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32335        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32336$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32337      fi
32338    fi
32339  fi
32340
32341  fi
32342  if test "x$PROGRAMFILES" != x; then
32343
32344  if test "x$VS_ENV_CMD" = x; then
32345    VS_VERSION="${VS_VERSION}"
32346    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32347    METHOD="well-known name"
32348
32349    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32350      VCVARSFILE="vc/bin/vcvars32.bat"
32351    else
32352      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32353    fi
32354
32355
32356  windows_path="$VS_BASE"
32357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32358    unix_path=`$CYGPATH -u "$windows_path"`
32359    VS_BASE="$unix_path"
32360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32362    VS_BASE="$unix_path"
32363  fi
32364
32365    if test -d "$VS_BASE"; then
32366      if test -f "$VS_BASE/$VCVARSFILE"; then
32367        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32368$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32369        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32370        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32371        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32372        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32373      else
32374        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32375$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32376        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32377$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32378      fi
32379    fi
32380  fi
32381
32382  fi
32383  # Work around the insanely named ProgramFiles(x86) env variable
32384  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32385  if test "x$PROGRAMFILES_X86" != x; then
32386
32387  if test "x$VS_ENV_CMD" = x; then
32388    VS_VERSION="${VS_VERSION}"
32389    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32390    METHOD="well-known name"
32391
32392    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32393      VCVARSFILE="vc/bin/vcvars32.bat"
32394    else
32395      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32396    fi
32397
32398
32399  windows_path="$VS_BASE"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    VS_BASE="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    VS_BASE="$unix_path"
32406  fi
32407
32408    if test -d "$VS_BASE"; then
32409      if test -f "$VS_BASE/$VCVARSFILE"; then
32410        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32411$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32412        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32413        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32414        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32415        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32416      else
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32418$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32419        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32420$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32421      fi
32422    fi
32423  fi
32424
32425  fi
32426
32427  if test "x$VS_ENV_CMD" = x; then
32428    VS_VERSION="${VS_VERSION}"
32429    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32430    METHOD="well-known name"
32431
32432    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32433      VCVARSFILE="vc/bin/vcvars32.bat"
32434    else
32435      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32436    fi
32437
32438
32439  windows_path="$VS_BASE"
32440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32441    unix_path=`$CYGPATH -u "$windows_path"`
32442    VS_BASE="$unix_path"
32443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32445    VS_BASE="$unix_path"
32446  fi
32447
32448    if test -d "$VS_BASE"; then
32449      if test -f "$VS_BASE/$VCVARSFILE"; then
32450        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32451$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32452        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32453        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32454        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32455        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32456      else
32457        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32458$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32459        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32460$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32461      fi
32462    fi
32463  fi
32464
32465
32466  if test "x$VS_ENV_CMD" = x; then
32467    VS_VERSION="${VS_VERSION}"
32468    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32469    METHOD="well-known name"
32470
32471    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32472      VCVARSFILE="vc/bin/vcvars32.bat"
32473    else
32474      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32475    fi
32476
32477
32478  windows_path="$VS_BASE"
32479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32480    unix_path=`$CYGPATH -u "$windows_path"`
32481    VS_BASE="$unix_path"
32482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32484    VS_BASE="$unix_path"
32485  fi
32486
32487    if test -d "$VS_BASE"; then
32488      if test -f "$VS_BASE/$VCVARSFILE"; then
32489        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32490$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32491        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32492        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32493        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32494        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32495      else
32496        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32497$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32498        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32499$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32500      fi
32501    fi
32502  fi
32503
32504
32505  if test "x$SDK_INSTALL_DIR" != x; then
32506    if test "x$ProgramW6432" != x; then
32507
32508  if test "x$VS_ENV_CMD" = x; then
32509    VS_VERSION="${VS_VERSION}"
32510    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32511    METHOD="well-known name"
32512
32513  windows_path="$WIN_SDK_BASE"
32514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32515    unix_path=`$CYGPATH -u "$windows_path"`
32516    WIN_SDK_BASE="$unix_path"
32517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32519    WIN_SDK_BASE="$unix_path"
32520  fi
32521
32522    if test -d "$WIN_SDK_BASE"; then
32523      # There have been cases of partial or broken SDK installations. A missing
32524      # lib dir is not going to work.
32525      if test ! -d "$WIN_SDK_BASE/lib"; then
32526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32527$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32528        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32529$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32530      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32532$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32533        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32534        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32535          VS_ENV_ARGS="/x86"
32536        else
32537          VS_ENV_ARGS="/x64"
32538        fi
32539        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32540        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32541        # TODO: improve detection for other versions of SDK
32542        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32543      else
32544        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32545$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32546        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32547$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32548      fi
32549    fi
32550  fi
32551
32552    fi
32553    if test "x$PROGRAMW6432" != x; then
32554
32555  if test "x$VS_ENV_CMD" = x; then
32556    VS_VERSION="${VS_VERSION}"
32557    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32558    METHOD="well-known name"
32559
32560  windows_path="$WIN_SDK_BASE"
32561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32562    unix_path=`$CYGPATH -u "$windows_path"`
32563    WIN_SDK_BASE="$unix_path"
32564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32566    WIN_SDK_BASE="$unix_path"
32567  fi
32568
32569    if test -d "$WIN_SDK_BASE"; then
32570      # There have been cases of partial or broken SDK installations. A missing
32571      # lib dir is not going to work.
32572      if test ! -d "$WIN_SDK_BASE/lib"; then
32573        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32574$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32575        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32576$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32577      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32578        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32579$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32580        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32581        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32582          VS_ENV_ARGS="/x86"
32583        else
32584          VS_ENV_ARGS="/x64"
32585        fi
32586        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32587        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32588        # TODO: improve detection for other versions of SDK
32589        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32590      else
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32592$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32593        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32594$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32595      fi
32596    fi
32597  fi
32598
32599    fi
32600    if test "x$PROGRAMFILES" != x; then
32601
32602  if test "x$VS_ENV_CMD" = x; then
32603    VS_VERSION="${VS_VERSION}"
32604    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32605    METHOD="well-known name"
32606
32607  windows_path="$WIN_SDK_BASE"
32608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32609    unix_path=`$CYGPATH -u "$windows_path"`
32610    WIN_SDK_BASE="$unix_path"
32611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32613    WIN_SDK_BASE="$unix_path"
32614  fi
32615
32616    if test -d "$WIN_SDK_BASE"; then
32617      # There have been cases of partial or broken SDK installations. A missing
32618      # lib dir is not going to work.
32619      if test ! -d "$WIN_SDK_BASE/lib"; then
32620        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32621$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32622        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32623$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32624      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32625        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32626$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32627        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32628        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32629          VS_ENV_ARGS="/x86"
32630        else
32631          VS_ENV_ARGS="/x64"
32632        fi
32633        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32634        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32635        # TODO: improve detection for other versions of SDK
32636        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32637      else
32638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32639$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32640        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32641$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32642      fi
32643    fi
32644  fi
32645
32646    fi
32647
32648  if test "x$VS_ENV_CMD" = x; then
32649    VS_VERSION="${VS_VERSION}"
32650    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32651    METHOD="well-known name"
32652
32653  windows_path="$WIN_SDK_BASE"
32654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32655    unix_path=`$CYGPATH -u "$windows_path"`
32656    WIN_SDK_BASE="$unix_path"
32657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32659    WIN_SDK_BASE="$unix_path"
32660  fi
32661
32662    if test -d "$WIN_SDK_BASE"; then
32663      # There have been cases of partial or broken SDK installations. A missing
32664      # lib dir is not going to work.
32665      if test ! -d "$WIN_SDK_BASE/lib"; then
32666        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32667$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32668        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32669$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32670      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32672$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32673        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32674        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32675          VS_ENV_ARGS="/x86"
32676        else
32677          VS_ENV_ARGS="/x64"
32678        fi
32679        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32680        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32681        # TODO: improve detection for other versions of SDK
32682        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32683      else
32684        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32685$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32686        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32687$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32688      fi
32689    fi
32690  fi
32691
32692
32693  if test "x$VS_ENV_CMD" = x; then
32694    VS_VERSION="${VS_VERSION}"
32695    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32696    METHOD="well-known name"
32697
32698  windows_path="$WIN_SDK_BASE"
32699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32700    unix_path=`$CYGPATH -u "$windows_path"`
32701    WIN_SDK_BASE="$unix_path"
32702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32704    WIN_SDK_BASE="$unix_path"
32705  fi
32706
32707    if test -d "$WIN_SDK_BASE"; then
32708      # There have been cases of partial or broken SDK installations. A missing
32709      # lib dir is not going to work.
32710      if test ! -d "$WIN_SDK_BASE/lib"; then
32711        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32712$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32713        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32714$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32715      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32716        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32717$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32718        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32719        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32720          VS_ENV_ARGS="/x86"
32721        else
32722          VS_ENV_ARGS="/x64"
32723        fi
32724        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32725        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32726        # TODO: improve detection for other versions of SDK
32727        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32728      else
32729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32730$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32732$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32733      fi
32734    fi
32735  fi
32736
32737  fi
32738
32739    if test "x$VS_ENV_CMD" != x; then
32740      TOOLCHAIN_VERSION=$VS_VERSION
32741      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32742      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32743      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32744      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32745      # The rest of the variables are already evaled while probing
32746      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32747$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32748      break
32749    fi
32750  done
32751
32752
32753  # If we have a devkit, skip all of the below.
32754  if test "x$DEVKIT_VS_VERSION" = x; then
32755    if test "x$VS_ENV_CMD" != x; then
32756      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32757
32758  # Only process if variable expands to non-empty
32759
32760  if test "x$VS_ENV_CMD" != x; then
32761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32762
32763  # First separate the path from the arguments. This will split at the first
32764  # space.
32765  complete="$VS_ENV_CMD"
32766  path="${complete%% *}"
32767  tmp="$complete EOL"
32768  arguments="${tmp#* }"
32769
32770  # Input might be given as Windows format, start by converting to
32771  # unix format.
32772  new_path=`$CYGPATH -u "$path"`
32773
32774  # Now try to locate executable using which
32775  new_path=`$WHICH "$new_path" 2> /dev/null`
32776  # bat and cmd files are not always considered executable in cygwin causing which
32777  # to not find them
32778  if test "x$new_path" = x \
32779      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32780      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32781    new_path=`$CYGPATH -u "$path"`
32782  fi
32783  if test "x$new_path" = x; then
32784    # Oops. Which didn't find the executable.
32785    # The splitting of arguments from the executable at a space might have been incorrect,
32786    # since paths with space are more likely in Windows. Give it another try with the whole
32787    # argument.
32788    path="$complete"
32789    arguments="EOL"
32790    new_path=`$CYGPATH -u "$path"`
32791    new_path=`$WHICH "$new_path" 2> /dev/null`
32792    # bat and cmd files are not always considered executable in cygwin causing which
32793    # to not find them
32794    if test "x$new_path" = x \
32795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32797      new_path=`$CYGPATH -u "$path"`
32798    fi
32799    if test "x$new_path" = x; then
32800      # It's still not found. Now this is an unrecoverable error.
32801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32802$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32803      has_space=`$ECHO "$complete" | $GREP " "`
32804      if test "x$has_space" != x; then
32805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32807      fi
32808      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32809    fi
32810  fi
32811
32812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32815  # "foo.exe" is OK but "foo" is an error.
32816  #
32817  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32818  # It is also a way to make sure we got the proper file name for the real test later on.
32819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32820  if test "x$test_shortpath" = x; then
32821    # Short path failed, file does not exist as specified.
32822    # Try adding .exe or .cmd
32823    if test -f "${new_path}.exe"; then
32824      input_to_shortpath="${new_path}.exe"
32825    elif test -f "${new_path}.cmd"; then
32826      input_to_shortpath="${new_path}.cmd"
32827    else
32828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32829$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32830      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32831$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32832      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32833    fi
32834  else
32835    input_to_shortpath="$new_path"
32836  fi
32837
32838  # Call helper function which possibly converts this using DOS-style short mode.
32839  # If so, the updated path is stored in $new_path.
32840  new_path="$input_to_shortpath"
32841
32842  input_path="$input_to_shortpath"
32843  # Check if we need to convert this using DOS-style short mode. If the path
32844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845  # take no chances and rewrite it.
32846  # Note: m4 eats our [], so we need to use [ and ] instead.
32847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32848  if test "x$has_forbidden_chars" != x; then
32849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32853      # Going to short mode and back again did indeed matter. Since short mode is
32854      # case insensitive, let's make it lowercase to improve readability.
32855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32856      # Now convert it back to Unix-style (cygpath)
32857      input_path=`$CYGPATH -u "$shortmode_path"`
32858      new_path="$input_path"
32859    fi
32860  fi
32861
32862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32863  if test "x$test_cygdrive_prefix" = x; then
32864    # As a simple fix, exclude /usr/bin since it's not a real path.
32865    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32867      # a path prefixed by /cygdrive for fixpath to work.
32868      new_path="$CYGWIN_ROOT_PATH$input_path"
32869    fi
32870  fi
32871
32872  # remove trailing .exe if any
32873  new_path="${new_path/%.exe/}"
32874
32875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32876
32877  # First separate the path from the arguments. This will split at the first
32878  # space.
32879  complete="$VS_ENV_CMD"
32880  path="${complete%% *}"
32881  tmp="$complete EOL"
32882  arguments="${tmp#* }"
32883
32884  # Input might be given as Windows format, start by converting to
32885  # unix format.
32886  new_path="$path"
32887
32888  windows_path="$new_path"
32889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32890    unix_path=`$CYGPATH -u "$windows_path"`
32891    new_path="$unix_path"
32892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32894    new_path="$unix_path"
32895  fi
32896
32897
32898  # Now try to locate executable using which
32899  new_path=`$WHICH "$new_path" 2> /dev/null`
32900
32901  if test "x$new_path" = x; then
32902    # Oops. Which didn't find the executable.
32903    # The splitting of arguments from the executable at a space might have been incorrect,
32904    # since paths with space are more likely in Windows. Give it another try with the whole
32905    # argument.
32906    path="$complete"
32907    arguments="EOL"
32908    new_path="$path"
32909
32910  windows_path="$new_path"
32911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32912    unix_path=`$CYGPATH -u "$windows_path"`
32913    new_path="$unix_path"
32914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32916    new_path="$unix_path"
32917  fi
32918
32919
32920    new_path=`$WHICH "$new_path" 2> /dev/null`
32921    # bat and cmd files are not always considered executable in MSYS causing which
32922    # to not find them
32923    if test "x$new_path" = x \
32924        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32925        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32926      new_path="$path"
32927
32928  windows_path="$new_path"
32929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32930    unix_path=`$CYGPATH -u "$windows_path"`
32931    new_path="$unix_path"
32932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32934    new_path="$unix_path"
32935  fi
32936
32937    fi
32938
32939    if test "x$new_path" = x; then
32940      # It's still not found. Now this is an unrecoverable error.
32941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32942$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32943      has_space=`$ECHO "$complete" | $GREP " "`
32944      if test "x$has_space" != x; then
32945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32947      fi
32948      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32949    fi
32950  fi
32951
32952  # Now new_path has a complete unix path to the binary
32953  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32954    # Keep paths in /bin as-is, but remove trailing .exe if any
32955    new_path="${new_path/%.exe/}"
32956    # Do not save /bin paths to all_fixpath_prefixes!
32957  else
32958    # Not in mixed or Windows style, start by that.
32959    new_path=`cmd //c echo $new_path`
32960
32961  input_path="$new_path"
32962  # Check if we need to convert this using DOS-style short mode. If the path
32963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32964  # take no chances and rewrite it.
32965  # Note: m4 eats our [], so we need to use [ and ] instead.
32966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32967  if test "x$has_forbidden_chars" != x; then
32968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32970  fi
32971
32972    # Output is in $new_path
32973
32974  windows_path="$new_path"
32975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32976    unix_path=`$CYGPATH -u "$windows_path"`
32977    new_path="$unix_path"
32978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32980    new_path="$unix_path"
32981  fi
32982
32983    # remove trailing .exe if any
32984    new_path="${new_path/%.exe/}"
32985
32986    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32987    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32988  fi
32989
32990    else
32991      # We're on a unix platform. Hooray! :)
32992      # First separate the path from the arguments. This will split at the first
32993      # space.
32994      complete="$VS_ENV_CMD"
32995      path="${complete%% *}"
32996      tmp="$complete EOL"
32997      arguments="${tmp#* }"
32998
32999      # Cannot rely on the command "which" here since it doesn't always work.
33000      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33001      if test -z "$is_absolute_path"; then
33002        # Path to executable is not absolute. Find it.
33003        IFS_save="$IFS"
33004        IFS=:
33005        for p in $PATH; do
33006          if test -f "$p/$path" && test -x "$p/$path"; then
33007            new_path="$p/$path"
33008            break
33009          fi
33010        done
33011        IFS="$IFS_save"
33012      else
33013        # This is an absolute path, we can use it without further modifications.
33014        new_path="$path"
33015      fi
33016
33017      if test "x$new_path" = x; then
33018        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33019$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33020        has_space=`$ECHO "$complete" | $GREP " "`
33021        if test "x$has_space" != x; then
33022          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33023$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33024        fi
33025        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33026      fi
33027    fi
33028
33029    # Now join together the path and the arguments once again
33030    if test "x$arguments" != xEOL; then
33031      new_complete="$new_path ${arguments% *}"
33032    else
33033      new_complete="$new_path"
33034    fi
33035
33036    if test "x$complete" != "x$new_complete"; then
33037      VS_ENV_CMD="$new_complete"
33038      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33039$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33040    fi
33041  fi
33042
33043
33044      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33045      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33046$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33047
33048      # We need to create a couple of temporary files.
33049      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33050      $MKDIR -p $VS_ENV_TMP_DIR
33051
33052      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33053      # Instead create a shell script which will set the relevant variables when run.
33054      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33055
33056  unix_path="$WINPATH_VS_ENV_CMD"
33057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33058    windows_path=`$CYGPATH -m "$unix_path"`
33059    WINPATH_VS_ENV_CMD="$windows_path"
33060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33061    windows_path=`cmd //c echo $unix_path`
33062    WINPATH_VS_ENV_CMD="$windows_path"
33063  fi
33064
33065      WINPATH_BASH="$BASH"
33066
33067  unix_path="$WINPATH_BASH"
33068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33069    windows_path=`$CYGPATH -m "$unix_path"`
33070    WINPATH_BASH="$windows_path"
33071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33072    windows_path=`cmd //c echo $unix_path`
33073    WINPATH_BASH="$windows_path"
33074  fi
33075
33076
33077      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33078      # script (executable by bash) that will setup the important variables.
33079      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33080      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33081      # This will end up something like:
33082      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33083      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33084      # These will end up something like:
33085      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33086      # The trailing space for everyone except PATH is no typo, but is needed due
33087      # to trailing \ in the Windows paths. These will be stripped later.
33088      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33089          >> $EXTRACT_VC_ENV_BAT_FILE
33090      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33091          >> $EXTRACT_VC_ENV_BAT_FILE
33092      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33093          >> $EXTRACT_VC_ENV_BAT_FILE
33094      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33095          >> $EXTRACT_VC_ENV_BAT_FILE
33096      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33097          >> $EXTRACT_VC_ENV_BAT_FILE
33098      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33099          >> $EXTRACT_VC_ENV_BAT_FILE
33100
33101      # Now execute the newly created bat file.
33102      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33103      # Change directory so we don't need to mess with Windows paths in redirects.
33104      cd $VS_ENV_TMP_DIR
33105      cmd /c extract-vs-env.bat | $CAT
33106      cd $CURDIR
33107
33108      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33110$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33111        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33112$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33113        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33114$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33115        as_fn_error $? "Cannot continue" "$LINENO" 5
33116      fi
33117
33118      # Now set all paths and other env variables. This will allow the rest of
33119      # the configure script to find and run the compiler in the proper way.
33120      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33121$as_echo "$as_me: Setting extracted environment variables" >&6;}
33122      . $VS_ENV_TMP_DIR/set-vs-env.sh
33123      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33124      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33125    else
33126      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33127      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33128$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33129    fi
33130  fi
33131
33132  # At this point, we should have correct variables in the environment, or we can't continue.
33133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33134$as_echo_n "checking for Visual Studio variables... " >&6; }
33135
33136  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33137      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33138    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33140$as_echo "present but broken" >&6; }
33141      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33142    else
33143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33144$as_echo "ok" >&6; }
33145      # Remove any trailing "\" ";" and " " from the variables.
33146      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33147      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33148      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33149      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33150      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33151      # Remove any paths containing # (typically F#) as that messes up make. This
33152      # is needed if visual studio was installed with F# support.
33153      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33154
33155
33156
33157
33158
33159      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33160      OLDIFS="$IFS"
33161      IFS=";"
33162      for i in $VS_INCLUDE; do
33163        ipath=$i
33164        # Only process non-empty elements
33165        if test "x$ipath" != x; then
33166          IFS="$OLDIFS"
33167          # Check that directory exists before calling fixup_path
33168          testpath=$ipath
33169
33170  windows_path="$testpath"
33171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33172    unix_path=`$CYGPATH -u "$windows_path"`
33173    testpath="$unix_path"
33174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33176    testpath="$unix_path"
33177  fi
33178
33179          if test -d "$testpath"; then
33180
33181  # Only process if variable expands to non-empty
33182
33183  if test "x$ipath" != x; then
33184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33185
33186  # Input might be given as Windows format, start by converting to
33187  # unix format.
33188  path="$ipath"
33189  new_path=`$CYGPATH -u "$path"`
33190
33191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33194  # "foo.exe" is OK but "foo" is an error.
33195  #
33196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33197  # It is also a way to make sure we got the proper file name for the real test later on.
33198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33199  if test "x$test_shortpath" = x; then
33200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33201$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33202    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33203  fi
33204
33205  # Call helper function which possibly converts this using DOS-style short mode.
33206  # If so, the updated path is stored in $new_path.
33207
33208  input_path="$new_path"
33209  # Check if we need to convert this using DOS-style short mode. If the path
33210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33211  # take no chances and rewrite it.
33212  # Note: m4 eats our [], so we need to use [ and ] instead.
33213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33214  if test "x$has_forbidden_chars" != x; then
33215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33219      # Going to short mode and back again did indeed matter. Since short mode is
33220      # case insensitive, let's make it lowercase to improve readability.
33221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33222      # Now convert it back to Unix-style (cygpath)
33223      input_path=`$CYGPATH -u "$shortmode_path"`
33224      new_path="$input_path"
33225    fi
33226  fi
33227
33228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33229  if test "x$test_cygdrive_prefix" = x; then
33230    # As a simple fix, exclude /usr/bin since it's not a real path.
33231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33233      # a path prefixed by /cygdrive for fixpath to work.
33234      new_path="$CYGWIN_ROOT_PATH$input_path"
33235    fi
33236  fi
33237
33238
33239  if test "x$path" != "x$new_path"; then
33240    ipath="$new_path"
33241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33242$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33243  fi
33244
33245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33246
33247  path="$ipath"
33248  has_colon=`$ECHO $path | $GREP ^.:`
33249  new_path="$path"
33250  if test "x$has_colon" = x; then
33251    # Not in mixed or Windows style, start by that.
33252    new_path=`cmd //c echo $path`
33253  fi
33254
33255
33256  input_path="$new_path"
33257  # Check if we need to convert this using DOS-style short mode. If the path
33258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33259  # take no chances and rewrite it.
33260  # Note: m4 eats our [], so we need to use [ and ] instead.
33261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33262  if test "x$has_forbidden_chars" != x; then
33263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33265  fi
33266
33267
33268  windows_path="$new_path"
33269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33270    unix_path=`$CYGPATH -u "$windows_path"`
33271    new_path="$unix_path"
33272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33274    new_path="$unix_path"
33275  fi
33276
33277  if test "x$path" != "x$new_path"; then
33278    ipath="$new_path"
33279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33280$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33281  fi
33282
33283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33285
33286    else
33287      # We're on a unix platform. Hooray! :)
33288      path="$ipath"
33289      has_space=`$ECHO "$path" | $GREP " "`
33290      if test "x$has_space" != x; then
33291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33292$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33294      fi
33295
33296      # Use eval to expand a potential ~
33297      eval path="$path"
33298      if test ! -f "$path" && test ! -d "$path"; then
33299        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33300      fi
33301
33302      if test -d "$path"; then
33303        ipath="`cd "$path"; $THEPWDCMD -L`"
33304      else
33305        dir="`$DIRNAME "$path"`"
33306        base="`$BASENAME "$path"`"
33307        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33308      fi
33309    fi
33310  fi
33311
33312            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33313          fi
33314          IFS=";"
33315        fi
33316      done
33317      # Convert VS_LIB into SYSROOT_LDFLAGS
33318      for i in $VS_LIB; do
33319        libpath=$i
33320        # Only process non-empty elements
33321        if test "x$libpath" != x; then
33322          IFS="$OLDIFS"
33323          # Check that directory exists before calling fixup_path
33324          testpath=$libpath
33325
33326  windows_path="$testpath"
33327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33328    unix_path=`$CYGPATH -u "$windows_path"`
33329    testpath="$unix_path"
33330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33332    testpath="$unix_path"
33333  fi
33334
33335          if test -d "$testpath"; then
33336
33337  # Only process if variable expands to non-empty
33338
33339  if test "x$libpath" != x; then
33340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33341
33342  # Input might be given as Windows format, start by converting to
33343  # unix format.
33344  path="$libpath"
33345  new_path=`$CYGPATH -u "$path"`
33346
33347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33350  # "foo.exe" is OK but "foo" is an error.
33351  #
33352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33353  # It is also a way to make sure we got the proper file name for the real test later on.
33354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33355  if test "x$test_shortpath" = x; then
33356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33357$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33358    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33359  fi
33360
33361  # Call helper function which possibly converts this using DOS-style short mode.
33362  # If so, the updated path is stored in $new_path.
33363
33364  input_path="$new_path"
33365  # Check if we need to convert this using DOS-style short mode. If the path
33366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33367  # take no chances and rewrite it.
33368  # Note: m4 eats our [], so we need to use [ and ] instead.
33369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33370  if test "x$has_forbidden_chars" != x; then
33371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33375      # Going to short mode and back again did indeed matter. Since short mode is
33376      # case insensitive, let's make it lowercase to improve readability.
33377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33378      # Now convert it back to Unix-style (cygpath)
33379      input_path=`$CYGPATH -u "$shortmode_path"`
33380      new_path="$input_path"
33381    fi
33382  fi
33383
33384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33385  if test "x$test_cygdrive_prefix" = x; then
33386    # As a simple fix, exclude /usr/bin since it's not a real path.
33387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33389      # a path prefixed by /cygdrive for fixpath to work.
33390      new_path="$CYGWIN_ROOT_PATH$input_path"
33391    fi
33392  fi
33393
33394
33395  if test "x$path" != "x$new_path"; then
33396    libpath="$new_path"
33397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33398$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33399  fi
33400
33401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33402
33403  path="$libpath"
33404  has_colon=`$ECHO $path | $GREP ^.:`
33405  new_path="$path"
33406  if test "x$has_colon" = x; then
33407    # Not in mixed or Windows style, start by that.
33408    new_path=`cmd //c echo $path`
33409  fi
33410
33411
33412  input_path="$new_path"
33413  # Check if we need to convert this using DOS-style short mode. If the path
33414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33415  # take no chances and rewrite it.
33416  # Note: m4 eats our [], so we need to use [ and ] instead.
33417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33418  if test "x$has_forbidden_chars" != x; then
33419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33421  fi
33422
33423
33424  windows_path="$new_path"
33425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33426    unix_path=`$CYGPATH -u "$windows_path"`
33427    new_path="$unix_path"
33428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33430    new_path="$unix_path"
33431  fi
33432
33433  if test "x$path" != "x$new_path"; then
33434    libpath="$new_path"
33435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33436$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33437  fi
33438
33439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33441
33442    else
33443      # We're on a unix platform. Hooray! :)
33444      path="$libpath"
33445      has_space=`$ECHO "$path" | $GREP " "`
33446      if test "x$has_space" != x; then
33447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33448$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33449        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33450      fi
33451
33452      # Use eval to expand a potential ~
33453      eval path="$path"
33454      if test ! -f "$path" && test ! -d "$path"; then
33455        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33456      fi
33457
33458      if test -d "$path"; then
33459        libpath="`cd "$path"; $THEPWDCMD -L`"
33460      else
33461        dir="`$DIRNAME "$path"`"
33462        base="`$BASENAME "$path"`"
33463        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33464      fi
33465    fi
33466  fi
33467
33468            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33469          fi
33470          IFS=";"
33471        fi
33472      done
33473      IFS="$OLDIFS"
33474    fi
33475  else
33476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33477$as_echo "not found" >&6; }
33478
33479    if test "x$VS_ENV_CMD" = x; then
33480      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33481$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33482      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33483$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33484    else
33485      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33486$as_echo "$as_me: Running the extraction script failed." >&6;}
33487    fi
33488    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33489$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33490    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33491$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33492    as_fn_error $? "Cannot continue" "$LINENO" 5
33493  fi
33494
33495    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33496    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33497    PATH="$VS_PATH"
33498    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33499    export INCLUDE="$VS_INCLUDE"
33500    export LIB="$VS_LIB"
33501  else
33502    if test "x$XCODE_VERSION_OUTPUT" != x; then
33503      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33504      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33505      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33506    else
33507      # Currently we do not define this for other toolchains. This might change as the need arise.
33508      TOOLCHAIN_VERSION=
33509    fi
33510  fi
33511
33512
33513  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33514  # override all other locations.
33515  if test "x$TOOLCHAIN_PATH" != x; then
33516    PATH=$TOOLCHAIN_PATH:$PATH
33517  fi
33518
33519
33520  #
33521  # Setup the compilers (CC and CXX)
33522  #
33523
33524  COMPILER_NAME=C
33525  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33526
33527  if test "x$CC" != x; then
33528    # User has supplied compiler name already, always let that override.
33529    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33530$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33531    if test "x`basename $CC`" = "x$CC"; then
33532      # A command without a complete path is provided, search $PATH.
33533
33534      for ac_prog in $CC
33535do
33536  # Extract the first word of "$ac_prog", so it can be a program name with args.
33537set dummy $ac_prog; ac_word=$2
33538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33539$as_echo_n "checking for $ac_word... " >&6; }
33540if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33541  $as_echo_n "(cached) " >&6
33542else
33543  case $POTENTIAL_CC in
33544  [\\/]* | ?:[\\/]*)
33545  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33546  ;;
33547  *)
33548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33549for as_dir in $PATH
33550do
33551  IFS=$as_save_IFS
33552  test -z "$as_dir" && as_dir=.
33553    for ac_exec_ext in '' $ac_executable_extensions; do
33554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33555    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33557    break 2
33558  fi
33559done
33560  done
33561IFS=$as_save_IFS
33562
33563  ;;
33564esac
33565fi
33566POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33567if test -n "$POTENTIAL_CC"; then
33568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33569$as_echo "$POTENTIAL_CC" >&6; }
33570else
33571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33572$as_echo "no" >&6; }
33573fi
33574
33575
33576  test -n "$POTENTIAL_CC" && break
33577done
33578
33579      if test "x$POTENTIAL_CC" != x; then
33580        CC=$POTENTIAL_CC
33581      else
33582        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33583      fi
33584    else
33585      # Otherwise it might already be a complete path
33586      if test ! -x "$CC"; then
33587        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33588      fi
33589    fi
33590  else
33591    # No user supplied value. Locate compiler ourselves.
33592
33593    # If we are cross compiling, assume cross compilation tools follows the
33594    # cross compilation standard where they are prefixed with the autoconf
33595    # standard name for the target. For example the binary
33596    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33597    # If we are not cross compiling, then the default compiler name will be
33598    # used.
33599
33600    CC=
33601    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33602    # before checking the rest of the PATH.
33603    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33604    # step, this should not be necessary.
33605    if test -n "$TOOLCHAIN_PATH"; then
33606      PATH_save="$PATH"
33607      PATH="$TOOLCHAIN_PATH"
33608      if test -n "$ac_tool_prefix"; then
33609  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33610set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33612$as_echo_n "checking for $ac_word... " >&6; }
33613if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33614  $as_echo_n "(cached) " >&6
33615else
33616  case $TOOLCHAIN_PATH_CC in
33617  [\\/]* | ?:[\\/]*)
33618  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33619  ;;
33620  *)
33621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33622for as_dir in $PATH
33623do
33624  IFS=$as_save_IFS
33625  test -z "$as_dir" && as_dir=.
33626    for ac_exec_ext in '' $ac_executable_extensions; do
33627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33628    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33630    break 2
33631  fi
33632done
33633  done
33634IFS=$as_save_IFS
33635
33636  ;;
33637esac
33638fi
33639TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33640if test -n "$TOOLCHAIN_PATH_CC"; then
33641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33642$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33643else
33644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33645$as_echo "no" >&6; }
33646fi
33647
33648
33649fi
33650if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33651  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33652  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33653set dummy $SEARCH_LIST; ac_word=$2
33654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33655$as_echo_n "checking for $ac_word... " >&6; }
33656if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33657  $as_echo_n "(cached) " >&6
33658else
33659  case $ac_pt_TOOLCHAIN_PATH_CC in
33660  [\\/]* | ?:[\\/]*)
33661  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33662  ;;
33663  *)
33664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33665for as_dir in $PATH
33666do
33667  IFS=$as_save_IFS
33668  test -z "$as_dir" && as_dir=.
33669    for ac_exec_ext in '' $ac_executable_extensions; do
33670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33671    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33673    break 2
33674  fi
33675done
33676  done
33677IFS=$as_save_IFS
33678
33679  ;;
33680esac
33681fi
33682ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33683if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33685$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33686else
33687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33688$as_echo "no" >&6; }
33689fi
33690
33691  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33692    TOOLCHAIN_PATH_CC=""
33693  else
33694    case $cross_compiling:$ac_tool_warned in
33695yes:)
33696{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33697$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33698ac_tool_warned=yes ;;
33699esac
33700    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33701  fi
33702else
33703  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33704fi
33705
33706      CC=$TOOLCHAIN_PATH_CC
33707      PATH="$PATH_save"
33708    fi
33709
33710    # AC_PATH_TOOL can't be run multiple times with the same variable,
33711    # so create a new name for this run.
33712    if test "x$CC" = x; then
33713      if test -n "$ac_tool_prefix"; then
33714  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33715set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33717$as_echo_n "checking for $ac_word... " >&6; }
33718if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33719  $as_echo_n "(cached) " >&6
33720else
33721  case $POTENTIAL_CC in
33722  [\\/]* | ?:[\\/]*)
33723  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33724  ;;
33725  *)
33726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33727for as_dir in $PATH
33728do
33729  IFS=$as_save_IFS
33730  test -z "$as_dir" && as_dir=.
33731    for ac_exec_ext in '' $ac_executable_extensions; do
33732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33733    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33735    break 2
33736  fi
33737done
33738  done
33739IFS=$as_save_IFS
33740
33741  ;;
33742esac
33743fi
33744POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33745if test -n "$POTENTIAL_CC"; then
33746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33747$as_echo "$POTENTIAL_CC" >&6; }
33748else
33749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33750$as_echo "no" >&6; }
33751fi
33752
33753
33754fi
33755if test -z "$ac_cv_path_POTENTIAL_CC"; then
33756  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33757  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33758set dummy $SEARCH_LIST; ac_word=$2
33759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33760$as_echo_n "checking for $ac_word... " >&6; }
33761if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33762  $as_echo_n "(cached) " >&6
33763else
33764  case $ac_pt_POTENTIAL_CC in
33765  [\\/]* | ?:[\\/]*)
33766  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33767  ;;
33768  *)
33769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33770for as_dir in $PATH
33771do
33772  IFS=$as_save_IFS
33773  test -z "$as_dir" && as_dir=.
33774    for ac_exec_ext in '' $ac_executable_extensions; do
33775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33776    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33778    break 2
33779  fi
33780done
33781  done
33782IFS=$as_save_IFS
33783
33784  ;;
33785esac
33786fi
33787ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33788if test -n "$ac_pt_POTENTIAL_CC"; then
33789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33790$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33791else
33792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33793$as_echo "no" >&6; }
33794fi
33795
33796  if test "x$ac_pt_POTENTIAL_CC" = x; then
33797    POTENTIAL_CC=""
33798  else
33799    case $cross_compiling:$ac_tool_warned in
33800yes:)
33801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33803ac_tool_warned=yes ;;
33804esac
33805    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33806  fi
33807else
33808  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33809fi
33810
33811      CC=$POTENTIAL_CC
33812    fi
33813
33814    if test "x$CC" = x; then
33815
33816  # Print a helpful message on how to acquire the necessary build dependency.
33817  # devkit is the help tag: freetype, cups, alsa etc
33818  MISSING_DEPENDENCY=devkit
33819
33820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33821    cygwin_help $MISSING_DEPENDENCY
33822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33823    msys_help $MISSING_DEPENDENCY
33824  else
33825    PKGHANDLER_COMMAND=
33826
33827    case $PKGHANDLER in
33828      apt-get)
33829        apt_help     $MISSING_DEPENDENCY ;;
33830      yum)
33831        yum_help     $MISSING_DEPENDENCY ;;
33832      brew)
33833        brew_help    $MISSING_DEPENDENCY ;;
33834      port)
33835        port_help    $MISSING_DEPENDENCY ;;
33836      pkgutil)
33837        pkgutil_help $MISSING_DEPENDENCY ;;
33838      pkgadd)
33839        pkgadd_help  $MISSING_DEPENDENCY ;;
33840    esac
33841
33842    if test "x$PKGHANDLER_COMMAND" != x; then
33843      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33844    fi
33845  fi
33846
33847      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33848    fi
33849  fi
33850
33851  # Now we have a compiler binary in CC. Make sure it's okay.
33852
33853  # Only process if variable expands to non-empty
33854
33855  if test "x$CC" != x; then
33856    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33857
33858  # First separate the path from the arguments. This will split at the first
33859  # space.
33860  complete="$CC"
33861  path="${complete%% *}"
33862  tmp="$complete EOL"
33863  arguments="${tmp#* }"
33864
33865  # Input might be given as Windows format, start by converting to
33866  # unix format.
33867  new_path=`$CYGPATH -u "$path"`
33868
33869  # Now try to locate executable using which
33870  new_path=`$WHICH "$new_path" 2> /dev/null`
33871  # bat and cmd files are not always considered executable in cygwin causing which
33872  # to not find them
33873  if test "x$new_path" = x \
33874      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33875      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33876    new_path=`$CYGPATH -u "$path"`
33877  fi
33878  if test "x$new_path" = x; then
33879    # Oops. Which didn't find the executable.
33880    # The splitting of arguments from the executable at a space might have been incorrect,
33881    # since paths with space are more likely in Windows. Give it another try with the whole
33882    # argument.
33883    path="$complete"
33884    arguments="EOL"
33885    new_path=`$CYGPATH -u "$path"`
33886    new_path=`$WHICH "$new_path" 2> /dev/null`
33887    # bat and cmd files are not always considered executable in cygwin causing which
33888    # to not find them
33889    if test "x$new_path" = x \
33890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33892      new_path=`$CYGPATH -u "$path"`
33893    fi
33894    if test "x$new_path" = x; then
33895      # It's still not found. Now this is an unrecoverable error.
33896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33897$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33898      has_space=`$ECHO "$complete" | $GREP " "`
33899      if test "x$has_space" != x; then
33900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33902      fi
33903      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33904    fi
33905  fi
33906
33907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33910  # "foo.exe" is OK but "foo" is an error.
33911  #
33912  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33913  # It is also a way to make sure we got the proper file name for the real test later on.
33914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33915  if test "x$test_shortpath" = x; then
33916    # Short path failed, file does not exist as specified.
33917    # Try adding .exe or .cmd
33918    if test -f "${new_path}.exe"; then
33919      input_to_shortpath="${new_path}.exe"
33920    elif test -f "${new_path}.cmd"; then
33921      input_to_shortpath="${new_path}.cmd"
33922    else
33923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33924$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33925      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33926$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33927      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33928    fi
33929  else
33930    input_to_shortpath="$new_path"
33931  fi
33932
33933  # Call helper function which possibly converts this using DOS-style short mode.
33934  # If so, the updated path is stored in $new_path.
33935  new_path="$input_to_shortpath"
33936
33937  input_path="$input_to_shortpath"
33938  # Check if we need to convert this using DOS-style short mode. If the path
33939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33940  # take no chances and rewrite it.
33941  # Note: m4 eats our [], so we need to use [ and ] instead.
33942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33943  if test "x$has_forbidden_chars" != x; then
33944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33948      # Going to short mode and back again did indeed matter. Since short mode is
33949      # case insensitive, let's make it lowercase to improve readability.
33950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33951      # Now convert it back to Unix-style (cygpath)
33952      input_path=`$CYGPATH -u "$shortmode_path"`
33953      new_path="$input_path"
33954    fi
33955  fi
33956
33957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33958  if test "x$test_cygdrive_prefix" = x; then
33959    # As a simple fix, exclude /usr/bin since it's not a real path.
33960    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33962      # a path prefixed by /cygdrive for fixpath to work.
33963      new_path="$CYGWIN_ROOT_PATH$input_path"
33964    fi
33965  fi
33966
33967  # remove trailing .exe if any
33968  new_path="${new_path/%.exe/}"
33969
33970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33971
33972  # First separate the path from the arguments. This will split at the first
33973  # space.
33974  complete="$CC"
33975  path="${complete%% *}"
33976  tmp="$complete EOL"
33977  arguments="${tmp#* }"
33978
33979  # Input might be given as Windows format, start by converting to
33980  # unix format.
33981  new_path="$path"
33982
33983  windows_path="$new_path"
33984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33985    unix_path=`$CYGPATH -u "$windows_path"`
33986    new_path="$unix_path"
33987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33989    new_path="$unix_path"
33990  fi
33991
33992
33993  # Now try to locate executable using which
33994  new_path=`$WHICH "$new_path" 2> /dev/null`
33995
33996  if test "x$new_path" = x; then
33997    # Oops. Which didn't find the executable.
33998    # The splitting of arguments from the executable at a space might have been incorrect,
33999    # since paths with space are more likely in Windows. Give it another try with the whole
34000    # argument.
34001    path="$complete"
34002    arguments="EOL"
34003    new_path="$path"
34004
34005  windows_path="$new_path"
34006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34007    unix_path=`$CYGPATH -u "$windows_path"`
34008    new_path="$unix_path"
34009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34011    new_path="$unix_path"
34012  fi
34013
34014
34015    new_path=`$WHICH "$new_path" 2> /dev/null`
34016    # bat and cmd files are not always considered executable in MSYS causing which
34017    # to not find them
34018    if test "x$new_path" = x \
34019        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34020        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34021      new_path="$path"
34022
34023  windows_path="$new_path"
34024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34025    unix_path=`$CYGPATH -u "$windows_path"`
34026    new_path="$unix_path"
34027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34029    new_path="$unix_path"
34030  fi
34031
34032    fi
34033
34034    if test "x$new_path" = x; then
34035      # It's still not found. Now this is an unrecoverable error.
34036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34037$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34038      has_space=`$ECHO "$complete" | $GREP " "`
34039      if test "x$has_space" != x; then
34040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34042      fi
34043      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34044    fi
34045  fi
34046
34047  # Now new_path has a complete unix path to the binary
34048  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34049    # Keep paths in /bin as-is, but remove trailing .exe if any
34050    new_path="${new_path/%.exe/}"
34051    # Do not save /bin paths to all_fixpath_prefixes!
34052  else
34053    # Not in mixed or Windows style, start by that.
34054    new_path=`cmd //c echo $new_path`
34055
34056  input_path="$new_path"
34057  # Check if we need to convert this using DOS-style short mode. If the path
34058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34059  # take no chances and rewrite it.
34060  # Note: m4 eats our [], so we need to use [ and ] instead.
34061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34062  if test "x$has_forbidden_chars" != x; then
34063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34065  fi
34066
34067    # Output is in $new_path
34068
34069  windows_path="$new_path"
34070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34071    unix_path=`$CYGPATH -u "$windows_path"`
34072    new_path="$unix_path"
34073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34075    new_path="$unix_path"
34076  fi
34077
34078    # remove trailing .exe if any
34079    new_path="${new_path/%.exe/}"
34080
34081    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34082    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34083  fi
34084
34085    else
34086      # We're on a unix platform. Hooray! :)
34087      # First separate the path from the arguments. This will split at the first
34088      # space.
34089      complete="$CC"
34090      path="${complete%% *}"
34091      tmp="$complete EOL"
34092      arguments="${tmp#* }"
34093
34094      # Cannot rely on the command "which" here since it doesn't always work.
34095      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34096      if test -z "$is_absolute_path"; then
34097        # Path to executable is not absolute. Find it.
34098        IFS_save="$IFS"
34099        IFS=:
34100        for p in $PATH; do
34101          if test -f "$p/$path" && test -x "$p/$path"; then
34102            new_path="$p/$path"
34103            break
34104          fi
34105        done
34106        IFS="$IFS_save"
34107      else
34108        # This is an absolute path, we can use it without further modifications.
34109        new_path="$path"
34110      fi
34111
34112      if test "x$new_path" = x; then
34113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34114$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34115        has_space=`$ECHO "$complete" | $GREP " "`
34116        if test "x$has_space" != x; then
34117          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34119        fi
34120        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34121      fi
34122    fi
34123
34124    # Now join together the path and the arguments once again
34125    if test "x$arguments" != xEOL; then
34126      new_complete="$new_path ${arguments% *}"
34127    else
34128      new_complete="$new_path"
34129    fi
34130
34131    if test "x$complete" != "x$new_complete"; then
34132      CC="$new_complete"
34133      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34134$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34135    fi
34136  fi
34137
34138  TEST_COMPILER="$CC"
34139
34140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34141$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34142  SYMLINK_ORIGINAL="$TEST_COMPILER"
34143
34144  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34145    # Follow a chain of symbolic links. Use readlink
34146    # where it exists, else fall back to horribly
34147    # complicated shell code.
34148    if test "x$READLINK_TESTED" != yes; then
34149      # On MacOSX there is a readlink tool with a different
34150      # purpose than the GNU readlink tool. Check the found readlink.
34151      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34152      if test "x$ISGNU" = x; then
34153        # A readlink that we do not know how to use.
34154        # Are there other non-GNU readlinks out there?
34155        READLINK_TESTED=yes
34156        READLINK=
34157      fi
34158    fi
34159
34160    if test "x$READLINK" != x; then
34161      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34162    else
34163      # Save the current directory for restoring afterwards
34164      STARTDIR=$PWD
34165      COUNTER=0
34166      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34167      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34168      cd $sym_link_dir
34169      # Use -P flag to resolve symlinks in directories.
34170      cd `$THEPWDCMD -P`
34171      sym_link_dir=`$THEPWDCMD -P`
34172      # Resolve file symlinks
34173      while test $COUNTER -lt 20; do
34174        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34175        if test "x$ISLINK" == x; then
34176          # This is not a symbolic link! We are done!
34177          break
34178        fi
34179        # Again resolve directory symlinks since the target of the just found
34180        # link could be in a different directory
34181        cd `$DIRNAME $ISLINK`
34182        sym_link_dir=`$THEPWDCMD -P`
34183        sym_link_file=`$BASENAME $ISLINK`
34184        let COUNTER=COUNTER+1
34185      done
34186      cd $STARTDIR
34187      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34188    fi
34189  fi
34190
34191  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34193$as_echo "no symlink" >&6; }
34194  else
34195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34196$as_echo "$SYMLINK_ORIGINAL" >&6; }
34197
34198    # We can't handle ccache by gcc wrappers, since we need to know if we're
34199    # using ccache. Instead ccache usage must be controlled by a configure option.
34200    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34201    if test "x$COMPILER_BASENAME" = "xccache"; then
34202      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34203$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34204      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34205    fi
34206  fi
34207
34208
34209  COMPILER=$CC
34210  COMPILER_NAME=$COMPILER_NAME
34211
34212  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34213    # cc -V output typically looks like
34214    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34215    # or
34216    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34217    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34218    # Check that this is likely to be the Solaris Studio cc.
34219    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34220    if test $? -ne 0; then
34221      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34222      { $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
34223$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34224      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34225$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34226      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34227$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34228      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34229    fi
34230    # Remove usage instructions (if present), and
34231    # collapse compiler output into a single line
34232    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34233        $SED -e 's/ *[Uu]sage:.*//'`
34234    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34235        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34236  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34237    # xlc -qversion output typically looks like
34238    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34239    #     Version: 11.01.0000.0015
34240    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34241    # Check that this is likely to be the IBM XL C compiler.
34242    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34243    if test $? -ne 0; then
34244      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34245      { $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
34246$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34247      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34248$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34249      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34250$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34251      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34252    fi
34253    # Collapse compiler output into a single line
34254    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34255    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34256        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34257  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34258    # There is no specific version flag, but all output starts with a version string.
34259    # First line typically looks something like:
34260    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34261    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34262    # Check that this is likely to be Microsoft CL.EXE.
34263    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34264    if test $? -ne 0; then
34265      { $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
34266$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34267      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34268$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34269      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34270    fi
34271    # Collapse compiler output into a single line
34272    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34273    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34274        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34275  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34276    # gcc --version output typically looks like
34277    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34278    #     Copyright (C) 2013 Free Software Foundation, Inc.
34279    #     This is free software; see the source for copying conditions.  There is NO
34280    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34281    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34282    # Check that this is likely to be GCC.
34283    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34284    if test $? -ne 0; then
34285      { $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
34286$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34287      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34288$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34289      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34290    fi
34291    # Remove Copyright and legalese from version string, and
34292    # collapse into a single line
34293    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34294        $SED -e 's/ *Copyright .*//'`
34295    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34296        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34297  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34298    # clang --version output typically looks like
34299    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34300    #    clang version 3.3 (tags/RELEASE_33/final)
34301    # or
34302    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34303    #    Target: x86_64-pc-linux-gnu
34304    #    Thread model: posix
34305    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34306    # Check that this is likely to be clang
34307    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34308    if test $? -ne 0; then
34309      { $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
34310$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34311      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34312$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34313      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34314    fi
34315    # Collapse compiler output into a single line
34316    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34317    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34318        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34319  else
34320      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34321  fi
34322  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34323  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34324  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34325  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34326
34327  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34328$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34329
34330
34331  # Now that we have resolved CC ourself, let autoconf have its go at it
34332  ac_ext=c
34333ac_cpp='$CPP $CPPFLAGS'
34334ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34335ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34336ac_compiler_gnu=$ac_cv_c_compiler_gnu
34337if test -n "$ac_tool_prefix"; then
34338  for ac_prog in $CC
34339  do
34340    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34341set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34343$as_echo_n "checking for $ac_word... " >&6; }
34344if ${ac_cv_prog_CC+:} false; then :
34345  $as_echo_n "(cached) " >&6
34346else
34347  if test -n "$CC"; then
34348  ac_cv_prog_CC="$CC" # Let the user override the test.
34349else
34350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34351for as_dir in $PATH
34352do
34353  IFS=$as_save_IFS
34354  test -z "$as_dir" && as_dir=.
34355    for ac_exec_ext in '' $ac_executable_extensions; do
34356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34357    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34359    break 2
34360  fi
34361done
34362  done
34363IFS=$as_save_IFS
34364
34365fi
34366fi
34367CC=$ac_cv_prog_CC
34368if test -n "$CC"; then
34369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34370$as_echo "$CC" >&6; }
34371else
34372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34373$as_echo "no" >&6; }
34374fi
34375
34376
34377    test -n "$CC" && break
34378  done
34379fi
34380if test -z "$CC"; then
34381  ac_ct_CC=$CC
34382  for ac_prog in $CC
34383do
34384  # Extract the first word of "$ac_prog", so it can be a program name with args.
34385set dummy $ac_prog; ac_word=$2
34386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34387$as_echo_n "checking for $ac_word... " >&6; }
34388if ${ac_cv_prog_ac_ct_CC+:} false; then :
34389  $as_echo_n "(cached) " >&6
34390else
34391  if test -n "$ac_ct_CC"; then
34392  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34393else
34394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34395for as_dir in $PATH
34396do
34397  IFS=$as_save_IFS
34398  test -z "$as_dir" && as_dir=.
34399    for ac_exec_ext in '' $ac_executable_extensions; do
34400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34401    ac_cv_prog_ac_ct_CC="$ac_prog"
34402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34403    break 2
34404  fi
34405done
34406  done
34407IFS=$as_save_IFS
34408
34409fi
34410fi
34411ac_ct_CC=$ac_cv_prog_ac_ct_CC
34412if test -n "$ac_ct_CC"; then
34413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34414$as_echo "$ac_ct_CC" >&6; }
34415else
34416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34417$as_echo "no" >&6; }
34418fi
34419
34420
34421  test -n "$ac_ct_CC" && break
34422done
34423
34424  if test "x$ac_ct_CC" = x; then
34425    CC=""
34426  else
34427    case $cross_compiling:$ac_tool_warned in
34428yes:)
34429{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34430$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34431ac_tool_warned=yes ;;
34432esac
34433    CC=$ac_ct_CC
34434  fi
34435fi
34436
34437
34438test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34440as_fn_error $? "no acceptable C compiler found in \$PATH
34441See \`config.log' for more details" "$LINENO" 5; }
34442
34443# Provide some information about the compiler.
34444$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34445set X $ac_compile
34446ac_compiler=$2
34447for ac_option in --version -v -V -qversion; do
34448  { { ac_try="$ac_compiler $ac_option >&5"
34449case "(($ac_try" in
34450  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34451  *) ac_try_echo=$ac_try;;
34452esac
34453eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34454$as_echo "$ac_try_echo"; } >&5
34455  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34456  ac_status=$?
34457  if test -s conftest.err; then
34458    sed '10a\
34459... rest of stderr output deleted ...
34460         10q' conftest.err >conftest.er1
34461    cat conftest.er1 >&5
34462  fi
34463  rm -f conftest.er1 conftest.err
34464  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34465  test $ac_status = 0; }
34466done
34467
34468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34469/* end confdefs.h.  */
34470
34471int
34472main ()
34473{
34474
34475  ;
34476  return 0;
34477}
34478_ACEOF
34479ac_clean_files_save=$ac_clean_files
34480ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34481# Try to create an executable without -o first, disregard a.out.
34482# It will help us diagnose broken compilers, and finding out an intuition
34483# of exeext.
34484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34485$as_echo_n "checking whether the C compiler works... " >&6; }
34486ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34487
34488# The possible output files:
34489ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34490
34491ac_rmfiles=
34492for ac_file in $ac_files
34493do
34494  case $ac_file in
34495    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34496    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34497  esac
34498done
34499rm -f $ac_rmfiles
34500
34501if { { ac_try="$ac_link_default"
34502case "(($ac_try" in
34503  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34504  *) ac_try_echo=$ac_try;;
34505esac
34506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34507$as_echo "$ac_try_echo"; } >&5
34508  (eval "$ac_link_default") 2>&5
34509  ac_status=$?
34510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34511  test $ac_status = 0; }; then :
34512  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34513# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34514# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34515# so that the user can short-circuit this test for compilers unknown to
34516# Autoconf.
34517for ac_file in $ac_files ''
34518do
34519  test -f "$ac_file" || continue
34520  case $ac_file in
34521    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34522	;;
34523    [ab].out )
34524	# We found the default executable, but exeext='' is most
34525	# certainly right.
34526	break;;
34527    *.* )
34528	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34529	then :; else
34530	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34531	fi
34532	# We set ac_cv_exeext here because the later test for it is not
34533	# safe: cross compilers may not add the suffix if given an `-o'
34534	# argument, so we may need to know it at that point already.
34535	# Even if this section looks crufty: it has the advantage of
34536	# actually working.
34537	break;;
34538    * )
34539	break;;
34540  esac
34541done
34542test "$ac_cv_exeext" = no && ac_cv_exeext=
34543
34544else
34545  ac_file=''
34546fi
34547if test -z "$ac_file"; then :
34548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34549$as_echo "no" >&6; }
34550$as_echo "$as_me: failed program was:" >&5
34551sed 's/^/| /' conftest.$ac_ext >&5
34552
34553{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34554$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34555as_fn_error 77 "C compiler cannot create executables
34556See \`config.log' for more details" "$LINENO" 5; }
34557else
34558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34559$as_echo "yes" >&6; }
34560fi
34561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34562$as_echo_n "checking for C compiler default output file name... " >&6; }
34563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34564$as_echo "$ac_file" >&6; }
34565ac_exeext=$ac_cv_exeext
34566
34567rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34568ac_clean_files=$ac_clean_files_save
34569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34570$as_echo_n "checking for suffix of executables... " >&6; }
34571if { { ac_try="$ac_link"
34572case "(($ac_try" in
34573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34574  *) ac_try_echo=$ac_try;;
34575esac
34576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34577$as_echo "$ac_try_echo"; } >&5
34578  (eval "$ac_link") 2>&5
34579  ac_status=$?
34580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34581  test $ac_status = 0; }; then :
34582  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34583# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34584# work properly (i.e., refer to `conftest.exe'), while it won't with
34585# `rm'.
34586for ac_file in conftest.exe conftest conftest.*; do
34587  test -f "$ac_file" || continue
34588  case $ac_file in
34589    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34590    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34591	  break;;
34592    * ) break;;
34593  esac
34594done
34595else
34596  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34598as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34599See \`config.log' for more details" "$LINENO" 5; }
34600fi
34601rm -f conftest conftest$ac_cv_exeext
34602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34603$as_echo "$ac_cv_exeext" >&6; }
34604
34605rm -f conftest.$ac_ext
34606EXEEXT=$ac_cv_exeext
34607ac_exeext=$EXEEXT
34608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34609/* end confdefs.h.  */
34610#include <stdio.h>
34611int
34612main ()
34613{
34614FILE *f = fopen ("conftest.out", "w");
34615 return ferror (f) || fclose (f) != 0;
34616
34617  ;
34618  return 0;
34619}
34620_ACEOF
34621ac_clean_files="$ac_clean_files conftest.out"
34622# Check that the compiler produces executables we can run.  If not, either
34623# the compiler is broken, or we cross compile.
34624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34625$as_echo_n "checking whether we are cross compiling... " >&6; }
34626if test "$cross_compiling" != yes; then
34627  { { ac_try="$ac_link"
34628case "(($ac_try" in
34629  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34630  *) ac_try_echo=$ac_try;;
34631esac
34632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34633$as_echo "$ac_try_echo"; } >&5
34634  (eval "$ac_link") 2>&5
34635  ac_status=$?
34636  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34637  test $ac_status = 0; }
34638  if { ac_try='./conftest$ac_cv_exeext'
34639  { { case "(($ac_try" in
34640  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34641  *) ac_try_echo=$ac_try;;
34642esac
34643eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34644$as_echo "$ac_try_echo"; } >&5
34645  (eval "$ac_try") 2>&5
34646  ac_status=$?
34647  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34648  test $ac_status = 0; }; }; then
34649    cross_compiling=no
34650  else
34651    if test "$cross_compiling" = maybe; then
34652	cross_compiling=yes
34653    else
34654	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34656as_fn_error $? "cannot run C compiled programs.
34657If you meant to cross compile, use \`--host'.
34658See \`config.log' for more details" "$LINENO" 5; }
34659    fi
34660  fi
34661fi
34662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34663$as_echo "$cross_compiling" >&6; }
34664
34665rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34666ac_clean_files=$ac_clean_files_save
34667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34668$as_echo_n "checking for suffix of object files... " >&6; }
34669if ${ac_cv_objext+:} false; then :
34670  $as_echo_n "(cached) " >&6
34671else
34672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34673/* end confdefs.h.  */
34674
34675int
34676main ()
34677{
34678
34679  ;
34680  return 0;
34681}
34682_ACEOF
34683rm -f conftest.o conftest.obj
34684if { { ac_try="$ac_compile"
34685case "(($ac_try" in
34686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34687  *) ac_try_echo=$ac_try;;
34688esac
34689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34690$as_echo "$ac_try_echo"; } >&5
34691  (eval "$ac_compile") 2>&5
34692  ac_status=$?
34693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34694  test $ac_status = 0; }; then :
34695  for ac_file in conftest.o conftest.obj conftest.*; do
34696  test -f "$ac_file" || continue;
34697  case $ac_file in
34698    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34699    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34700       break;;
34701  esac
34702done
34703else
34704  $as_echo "$as_me: failed program was:" >&5
34705sed 's/^/| /' conftest.$ac_ext >&5
34706
34707{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34709as_fn_error $? "cannot compute suffix of object files: cannot compile
34710See \`config.log' for more details" "$LINENO" 5; }
34711fi
34712rm -f conftest.$ac_cv_objext conftest.$ac_ext
34713fi
34714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34715$as_echo "$ac_cv_objext" >&6; }
34716OBJEXT=$ac_cv_objext
34717ac_objext=$OBJEXT
34718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34719$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34720if ${ac_cv_c_compiler_gnu+:} false; then :
34721  $as_echo_n "(cached) " >&6
34722else
34723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34724/* end confdefs.h.  */
34725
34726int
34727main ()
34728{
34729#ifndef __GNUC__
34730       choke me
34731#endif
34732
34733  ;
34734  return 0;
34735}
34736_ACEOF
34737if ac_fn_c_try_compile "$LINENO"; then :
34738  ac_compiler_gnu=yes
34739else
34740  ac_compiler_gnu=no
34741fi
34742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34743ac_cv_c_compiler_gnu=$ac_compiler_gnu
34744
34745fi
34746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34747$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34748if test $ac_compiler_gnu = yes; then
34749  GCC=yes
34750else
34751  GCC=
34752fi
34753ac_test_CFLAGS=${CFLAGS+set}
34754ac_save_CFLAGS=$CFLAGS
34755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34756$as_echo_n "checking whether $CC accepts -g... " >&6; }
34757if ${ac_cv_prog_cc_g+:} false; then :
34758  $as_echo_n "(cached) " >&6
34759else
34760  ac_save_c_werror_flag=$ac_c_werror_flag
34761   ac_c_werror_flag=yes
34762   ac_cv_prog_cc_g=no
34763   CFLAGS="-g"
34764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34765/* end confdefs.h.  */
34766
34767int
34768main ()
34769{
34770
34771  ;
34772  return 0;
34773}
34774_ACEOF
34775if ac_fn_c_try_compile "$LINENO"; then :
34776  ac_cv_prog_cc_g=yes
34777else
34778  CFLAGS=""
34779      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34780/* end confdefs.h.  */
34781
34782int
34783main ()
34784{
34785
34786  ;
34787  return 0;
34788}
34789_ACEOF
34790if ac_fn_c_try_compile "$LINENO"; then :
34791
34792else
34793  ac_c_werror_flag=$ac_save_c_werror_flag
34794	 CFLAGS="-g"
34795	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34796/* end confdefs.h.  */
34797
34798int
34799main ()
34800{
34801
34802  ;
34803  return 0;
34804}
34805_ACEOF
34806if ac_fn_c_try_compile "$LINENO"; then :
34807  ac_cv_prog_cc_g=yes
34808fi
34809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34810fi
34811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34812fi
34813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34814   ac_c_werror_flag=$ac_save_c_werror_flag
34815fi
34816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34817$as_echo "$ac_cv_prog_cc_g" >&6; }
34818if test "$ac_test_CFLAGS" = set; then
34819  CFLAGS=$ac_save_CFLAGS
34820elif test $ac_cv_prog_cc_g = yes; then
34821  if test "$GCC" = yes; then
34822    CFLAGS="-g -O2"
34823  else
34824    CFLAGS="-g"
34825  fi
34826else
34827  if test "$GCC" = yes; then
34828    CFLAGS="-O2"
34829  else
34830    CFLAGS=
34831  fi
34832fi
34833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34834$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34835if ${ac_cv_prog_cc_c89+:} false; then :
34836  $as_echo_n "(cached) " >&6
34837else
34838  ac_cv_prog_cc_c89=no
34839ac_save_CC=$CC
34840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34841/* end confdefs.h.  */
34842#include <stdarg.h>
34843#include <stdio.h>
34844struct stat;
34845/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34846struct buf { int x; };
34847FILE * (*rcsopen) (struct buf *, struct stat *, int);
34848static char *e (p, i)
34849     char **p;
34850     int i;
34851{
34852  return p[i];
34853}
34854static char *f (char * (*g) (char **, int), char **p, ...)
34855{
34856  char *s;
34857  va_list v;
34858  va_start (v,p);
34859  s = g (p, va_arg (v,int));
34860  va_end (v);
34861  return s;
34862}
34863
34864/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34865   function prototypes and stuff, but not '\xHH' hex character constants.
34866   These don't provoke an error unfortunately, instead are silently treated
34867   as 'x'.  The following induces an error, until -std is added to get
34868   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34869   array size at least.  It's necessary to write '\x00'==0 to get something
34870   that's true only with -std.  */
34871int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34872
34873/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34874   inside strings and character constants.  */
34875#define FOO(x) 'x'
34876int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34877
34878int test (int i, double x);
34879struct s1 {int (*f) (int a);};
34880struct s2 {int (*f) (double a);};
34881int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34882int argc;
34883char **argv;
34884int
34885main ()
34886{
34887return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34888  ;
34889  return 0;
34890}
34891_ACEOF
34892for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34893	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34894do
34895  CC="$ac_save_CC $ac_arg"
34896  if ac_fn_c_try_compile "$LINENO"; then :
34897  ac_cv_prog_cc_c89=$ac_arg
34898fi
34899rm -f core conftest.err conftest.$ac_objext
34900  test "x$ac_cv_prog_cc_c89" != "xno" && break
34901done
34902rm -f conftest.$ac_ext
34903CC=$ac_save_CC
34904
34905fi
34906# AC_CACHE_VAL
34907case "x$ac_cv_prog_cc_c89" in
34908  x)
34909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34910$as_echo "none needed" >&6; } ;;
34911  xno)
34912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34913$as_echo "unsupported" >&6; } ;;
34914  *)
34915    CC="$CC $ac_cv_prog_cc_c89"
34916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34917$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34918esac
34919if test "x$ac_cv_prog_cc_c89" != xno; then :
34920
34921fi
34922
34923ac_ext=cpp
34924ac_cpp='$CXXCPP $CPPFLAGS'
34925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34928
34929
34930
34931  COMPILER_NAME=C++
34932  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34933
34934  if test "x$CXX" != x; then
34935    # User has supplied compiler name already, always let that override.
34936    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34937$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34938    if test "x`basename $CXX`" = "x$CXX"; then
34939      # A command without a complete path is provided, search $PATH.
34940
34941      for ac_prog in $CXX
34942do
34943  # Extract the first word of "$ac_prog", so it can be a program name with args.
34944set dummy $ac_prog; ac_word=$2
34945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34946$as_echo_n "checking for $ac_word... " >&6; }
34947if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34948  $as_echo_n "(cached) " >&6
34949else
34950  case $POTENTIAL_CXX in
34951  [\\/]* | ?:[\\/]*)
34952  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34953  ;;
34954  *)
34955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34956for as_dir in $PATH
34957do
34958  IFS=$as_save_IFS
34959  test -z "$as_dir" && as_dir=.
34960    for ac_exec_ext in '' $ac_executable_extensions; do
34961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34962    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34964    break 2
34965  fi
34966done
34967  done
34968IFS=$as_save_IFS
34969
34970  ;;
34971esac
34972fi
34973POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34974if test -n "$POTENTIAL_CXX"; then
34975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34976$as_echo "$POTENTIAL_CXX" >&6; }
34977else
34978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34979$as_echo "no" >&6; }
34980fi
34981
34982
34983  test -n "$POTENTIAL_CXX" && break
34984done
34985
34986      if test "x$POTENTIAL_CXX" != x; then
34987        CXX=$POTENTIAL_CXX
34988      else
34989        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34990      fi
34991    else
34992      # Otherwise it might already be a complete path
34993      if test ! -x "$CXX"; then
34994        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34995      fi
34996    fi
34997  else
34998    # No user supplied value. Locate compiler ourselves.
34999
35000    # If we are cross compiling, assume cross compilation tools follows the
35001    # cross compilation standard where they are prefixed with the autoconf
35002    # standard name for the target. For example the binary
35003    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35004    # If we are not cross compiling, then the default compiler name will be
35005    # used.
35006
35007    CXX=
35008    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35009    # before checking the rest of the PATH.
35010    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35011    # step, this should not be necessary.
35012    if test -n "$TOOLCHAIN_PATH"; then
35013      PATH_save="$PATH"
35014      PATH="$TOOLCHAIN_PATH"
35015      if test -n "$ac_tool_prefix"; then
35016  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35017set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35019$as_echo_n "checking for $ac_word... " >&6; }
35020if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35021  $as_echo_n "(cached) " >&6
35022else
35023  case $TOOLCHAIN_PATH_CXX in
35024  [\\/]* | ?:[\\/]*)
35025  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35026  ;;
35027  *)
35028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35029for as_dir in $PATH
35030do
35031  IFS=$as_save_IFS
35032  test -z "$as_dir" && as_dir=.
35033    for ac_exec_ext in '' $ac_executable_extensions; do
35034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35035    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35037    break 2
35038  fi
35039done
35040  done
35041IFS=$as_save_IFS
35042
35043  ;;
35044esac
35045fi
35046TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35047if test -n "$TOOLCHAIN_PATH_CXX"; then
35048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35049$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35050else
35051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35052$as_echo "no" >&6; }
35053fi
35054
35055
35056fi
35057if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35058  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35059  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35060set dummy $SEARCH_LIST; ac_word=$2
35061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35062$as_echo_n "checking for $ac_word... " >&6; }
35063if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35064  $as_echo_n "(cached) " >&6
35065else
35066  case $ac_pt_TOOLCHAIN_PATH_CXX in
35067  [\\/]* | ?:[\\/]*)
35068  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35069  ;;
35070  *)
35071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35072for as_dir in $PATH
35073do
35074  IFS=$as_save_IFS
35075  test -z "$as_dir" && as_dir=.
35076    for ac_exec_ext in '' $ac_executable_extensions; do
35077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35078    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35080    break 2
35081  fi
35082done
35083  done
35084IFS=$as_save_IFS
35085
35086  ;;
35087esac
35088fi
35089ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35090if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35092$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35093else
35094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35095$as_echo "no" >&6; }
35096fi
35097
35098  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35099    TOOLCHAIN_PATH_CXX=""
35100  else
35101    case $cross_compiling:$ac_tool_warned in
35102yes:)
35103{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35104$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35105ac_tool_warned=yes ;;
35106esac
35107    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35108  fi
35109else
35110  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35111fi
35112
35113      CXX=$TOOLCHAIN_PATH_CXX
35114      PATH="$PATH_save"
35115    fi
35116
35117    # AC_PATH_TOOL can't be run multiple times with the same variable,
35118    # so create a new name for this run.
35119    if test "x$CXX" = x; then
35120      if test -n "$ac_tool_prefix"; then
35121  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35122set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35124$as_echo_n "checking for $ac_word... " >&6; }
35125if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35126  $as_echo_n "(cached) " >&6
35127else
35128  case $POTENTIAL_CXX in
35129  [\\/]* | ?:[\\/]*)
35130  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35131  ;;
35132  *)
35133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35134for as_dir in $PATH
35135do
35136  IFS=$as_save_IFS
35137  test -z "$as_dir" && as_dir=.
35138    for ac_exec_ext in '' $ac_executable_extensions; do
35139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35140    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35142    break 2
35143  fi
35144done
35145  done
35146IFS=$as_save_IFS
35147
35148  ;;
35149esac
35150fi
35151POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35152if test -n "$POTENTIAL_CXX"; then
35153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35154$as_echo "$POTENTIAL_CXX" >&6; }
35155else
35156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35157$as_echo "no" >&6; }
35158fi
35159
35160
35161fi
35162if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35163  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35164  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35165set dummy $SEARCH_LIST; ac_word=$2
35166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35167$as_echo_n "checking for $ac_word... " >&6; }
35168if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35169  $as_echo_n "(cached) " >&6
35170else
35171  case $ac_pt_POTENTIAL_CXX in
35172  [\\/]* | ?:[\\/]*)
35173  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35174  ;;
35175  *)
35176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35177for as_dir in $PATH
35178do
35179  IFS=$as_save_IFS
35180  test -z "$as_dir" && as_dir=.
35181    for ac_exec_ext in '' $ac_executable_extensions; do
35182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35183    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35185    break 2
35186  fi
35187done
35188  done
35189IFS=$as_save_IFS
35190
35191  ;;
35192esac
35193fi
35194ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35195if test -n "$ac_pt_POTENTIAL_CXX"; then
35196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35197$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35198else
35199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35200$as_echo "no" >&6; }
35201fi
35202
35203  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35204    POTENTIAL_CXX=""
35205  else
35206    case $cross_compiling:$ac_tool_warned in
35207yes:)
35208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35210ac_tool_warned=yes ;;
35211esac
35212    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35213  fi
35214else
35215  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35216fi
35217
35218      CXX=$POTENTIAL_CXX
35219    fi
35220
35221    if test "x$CXX" = x; then
35222
35223  # Print a helpful message on how to acquire the necessary build dependency.
35224  # devkit is the help tag: freetype, cups, alsa etc
35225  MISSING_DEPENDENCY=devkit
35226
35227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35228    cygwin_help $MISSING_DEPENDENCY
35229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35230    msys_help $MISSING_DEPENDENCY
35231  else
35232    PKGHANDLER_COMMAND=
35233
35234    case $PKGHANDLER in
35235      apt-get)
35236        apt_help     $MISSING_DEPENDENCY ;;
35237      yum)
35238        yum_help     $MISSING_DEPENDENCY ;;
35239      brew)
35240        brew_help    $MISSING_DEPENDENCY ;;
35241      port)
35242        port_help    $MISSING_DEPENDENCY ;;
35243      pkgutil)
35244        pkgutil_help $MISSING_DEPENDENCY ;;
35245      pkgadd)
35246        pkgadd_help  $MISSING_DEPENDENCY ;;
35247    esac
35248
35249    if test "x$PKGHANDLER_COMMAND" != x; then
35250      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35251    fi
35252  fi
35253
35254      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35255    fi
35256  fi
35257
35258  # Now we have a compiler binary in CXX. Make sure it's okay.
35259
35260  # Only process if variable expands to non-empty
35261
35262  if test "x$CXX" != x; then
35263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35264
35265  # First separate the path from the arguments. This will split at the first
35266  # space.
35267  complete="$CXX"
35268  path="${complete%% *}"
35269  tmp="$complete EOL"
35270  arguments="${tmp#* }"
35271
35272  # Input might be given as Windows format, start by converting to
35273  # unix format.
35274  new_path=`$CYGPATH -u "$path"`
35275
35276  # Now try to locate executable using which
35277  new_path=`$WHICH "$new_path" 2> /dev/null`
35278  # bat and cmd files are not always considered executable in cygwin causing which
35279  # to not find them
35280  if test "x$new_path" = x \
35281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35283    new_path=`$CYGPATH -u "$path"`
35284  fi
35285  if test "x$new_path" = x; then
35286    # Oops. Which didn't find the executable.
35287    # The splitting of arguments from the executable at a space might have been incorrect,
35288    # since paths with space are more likely in Windows. Give it another try with the whole
35289    # argument.
35290    path="$complete"
35291    arguments="EOL"
35292    new_path=`$CYGPATH -u "$path"`
35293    new_path=`$WHICH "$new_path" 2> /dev/null`
35294    # bat and cmd files are not always considered executable in cygwin causing which
35295    # to not find them
35296    if test "x$new_path" = x \
35297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35299      new_path=`$CYGPATH -u "$path"`
35300    fi
35301    if test "x$new_path" = x; then
35302      # It's still not found. Now this is an unrecoverable error.
35303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35304$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35305      has_space=`$ECHO "$complete" | $GREP " "`
35306      if test "x$has_space" != x; then
35307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35309      fi
35310      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35311    fi
35312  fi
35313
35314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35317  # "foo.exe" is OK but "foo" is an error.
35318  #
35319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35320  # It is also a way to make sure we got the proper file name for the real test later on.
35321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35322  if test "x$test_shortpath" = x; then
35323    # Short path failed, file does not exist as specified.
35324    # Try adding .exe or .cmd
35325    if test -f "${new_path}.exe"; then
35326      input_to_shortpath="${new_path}.exe"
35327    elif test -f "${new_path}.cmd"; then
35328      input_to_shortpath="${new_path}.cmd"
35329    else
35330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35331$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35334      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35335    fi
35336  else
35337    input_to_shortpath="$new_path"
35338  fi
35339
35340  # Call helper function which possibly converts this using DOS-style short mode.
35341  # If so, the updated path is stored in $new_path.
35342  new_path="$input_to_shortpath"
35343
35344  input_path="$input_to_shortpath"
35345  # Check if we need to convert this using DOS-style short mode. If the path
35346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35347  # take no chances and rewrite it.
35348  # Note: m4 eats our [], so we need to use [ and ] instead.
35349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35350  if test "x$has_forbidden_chars" != x; then
35351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35355      # Going to short mode and back again did indeed matter. Since short mode is
35356      # case insensitive, let's make it lowercase to improve readability.
35357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35358      # Now convert it back to Unix-style (cygpath)
35359      input_path=`$CYGPATH -u "$shortmode_path"`
35360      new_path="$input_path"
35361    fi
35362  fi
35363
35364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35365  if test "x$test_cygdrive_prefix" = x; then
35366    # As a simple fix, exclude /usr/bin since it's not a real path.
35367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35369      # a path prefixed by /cygdrive for fixpath to work.
35370      new_path="$CYGWIN_ROOT_PATH$input_path"
35371    fi
35372  fi
35373
35374  # remove trailing .exe if any
35375  new_path="${new_path/%.exe/}"
35376
35377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35378
35379  # First separate the path from the arguments. This will split at the first
35380  # space.
35381  complete="$CXX"
35382  path="${complete%% *}"
35383  tmp="$complete EOL"
35384  arguments="${tmp#* }"
35385
35386  # Input might be given as Windows format, start by converting to
35387  # unix format.
35388  new_path="$path"
35389
35390  windows_path="$new_path"
35391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35392    unix_path=`$CYGPATH -u "$windows_path"`
35393    new_path="$unix_path"
35394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35396    new_path="$unix_path"
35397  fi
35398
35399
35400  # Now try to locate executable using which
35401  new_path=`$WHICH "$new_path" 2> /dev/null`
35402
35403  if test "x$new_path" = x; then
35404    # Oops. Which didn't find the executable.
35405    # The splitting of arguments from the executable at a space might have been incorrect,
35406    # since paths with space are more likely in Windows. Give it another try with the whole
35407    # argument.
35408    path="$complete"
35409    arguments="EOL"
35410    new_path="$path"
35411
35412  windows_path="$new_path"
35413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35414    unix_path=`$CYGPATH -u "$windows_path"`
35415    new_path="$unix_path"
35416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35418    new_path="$unix_path"
35419  fi
35420
35421
35422    new_path=`$WHICH "$new_path" 2> /dev/null`
35423    # bat and cmd files are not always considered executable in MSYS causing which
35424    # to not find them
35425    if test "x$new_path" = x \
35426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35428      new_path="$path"
35429
35430  windows_path="$new_path"
35431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35432    unix_path=`$CYGPATH -u "$windows_path"`
35433    new_path="$unix_path"
35434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35436    new_path="$unix_path"
35437  fi
35438
35439    fi
35440
35441    if test "x$new_path" = x; then
35442      # It's still not found. Now this is an unrecoverable error.
35443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35444$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35445      has_space=`$ECHO "$complete" | $GREP " "`
35446      if test "x$has_space" != x; then
35447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35449      fi
35450      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35451    fi
35452  fi
35453
35454  # Now new_path has a complete unix path to the binary
35455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35456    # Keep paths in /bin as-is, but remove trailing .exe if any
35457    new_path="${new_path/%.exe/}"
35458    # Do not save /bin paths to all_fixpath_prefixes!
35459  else
35460    # Not in mixed or Windows style, start by that.
35461    new_path=`cmd //c echo $new_path`
35462
35463  input_path="$new_path"
35464  # Check if we need to convert this using DOS-style short mode. If the path
35465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35466  # take no chances and rewrite it.
35467  # Note: m4 eats our [], so we need to use [ and ] instead.
35468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35469  if test "x$has_forbidden_chars" != x; then
35470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35472  fi
35473
35474    # Output is in $new_path
35475
35476  windows_path="$new_path"
35477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35478    unix_path=`$CYGPATH -u "$windows_path"`
35479    new_path="$unix_path"
35480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35482    new_path="$unix_path"
35483  fi
35484
35485    # remove trailing .exe if any
35486    new_path="${new_path/%.exe/}"
35487
35488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35490  fi
35491
35492    else
35493      # We're on a unix platform. Hooray! :)
35494      # First separate the path from the arguments. This will split at the first
35495      # space.
35496      complete="$CXX"
35497      path="${complete%% *}"
35498      tmp="$complete EOL"
35499      arguments="${tmp#* }"
35500
35501      # Cannot rely on the command "which" here since it doesn't always work.
35502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35503      if test -z "$is_absolute_path"; then
35504        # Path to executable is not absolute. Find it.
35505        IFS_save="$IFS"
35506        IFS=:
35507        for p in $PATH; do
35508          if test -f "$p/$path" && test -x "$p/$path"; then
35509            new_path="$p/$path"
35510            break
35511          fi
35512        done
35513        IFS="$IFS_save"
35514      else
35515        # This is an absolute path, we can use it without further modifications.
35516        new_path="$path"
35517      fi
35518
35519      if test "x$new_path" = x; then
35520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35521$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35522        has_space=`$ECHO "$complete" | $GREP " "`
35523        if test "x$has_space" != x; then
35524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35526        fi
35527        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35528      fi
35529    fi
35530
35531    # Now join together the path and the arguments once again
35532    if test "x$arguments" != xEOL; then
35533      new_complete="$new_path ${arguments% *}"
35534    else
35535      new_complete="$new_path"
35536    fi
35537
35538    if test "x$complete" != "x$new_complete"; then
35539      CXX="$new_complete"
35540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35541$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35542    fi
35543  fi
35544
35545  TEST_COMPILER="$CXX"
35546
35547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35548$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35549  SYMLINK_ORIGINAL="$TEST_COMPILER"
35550
35551  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35552    # Follow a chain of symbolic links. Use readlink
35553    # where it exists, else fall back to horribly
35554    # complicated shell code.
35555    if test "x$READLINK_TESTED" != yes; then
35556      # On MacOSX there is a readlink tool with a different
35557      # purpose than the GNU readlink tool. Check the found readlink.
35558      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35559      if test "x$ISGNU" = x; then
35560        # A readlink that we do not know how to use.
35561        # Are there other non-GNU readlinks out there?
35562        READLINK_TESTED=yes
35563        READLINK=
35564      fi
35565    fi
35566
35567    if test "x$READLINK" != x; then
35568      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35569    else
35570      # Save the current directory for restoring afterwards
35571      STARTDIR=$PWD
35572      COUNTER=0
35573      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35574      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35575      cd $sym_link_dir
35576      # Use -P flag to resolve symlinks in directories.
35577      cd `$THEPWDCMD -P`
35578      sym_link_dir=`$THEPWDCMD -P`
35579      # Resolve file symlinks
35580      while test $COUNTER -lt 20; do
35581        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35582        if test "x$ISLINK" == x; then
35583          # This is not a symbolic link! We are done!
35584          break
35585        fi
35586        # Again resolve directory symlinks since the target of the just found
35587        # link could be in a different directory
35588        cd `$DIRNAME $ISLINK`
35589        sym_link_dir=`$THEPWDCMD -P`
35590        sym_link_file=`$BASENAME $ISLINK`
35591        let COUNTER=COUNTER+1
35592      done
35593      cd $STARTDIR
35594      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35595    fi
35596  fi
35597
35598  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35600$as_echo "no symlink" >&6; }
35601  else
35602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35603$as_echo "$SYMLINK_ORIGINAL" >&6; }
35604
35605    # We can't handle ccache by gcc wrappers, since we need to know if we're
35606    # using ccache. Instead ccache usage must be controlled by a configure option.
35607    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35608    if test "x$COMPILER_BASENAME" = "xccache"; then
35609      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35610$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35611      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35612    fi
35613  fi
35614
35615
35616  COMPILER=$CXX
35617  COMPILER_NAME=$COMPILER_NAME
35618
35619  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35620    # cc -V output typically looks like
35621    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35622    # or
35623    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35624    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35625    # Check that this is likely to be the Solaris Studio cc.
35626    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35627    if test $? -ne 0; then
35628      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35629      { $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
35630$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35631      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35632$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35633      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35634$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35635      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35636    fi
35637    # Remove usage instructions (if present), and
35638    # collapse compiler output into a single line
35639    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35640        $SED -e 's/ *[Uu]sage:.*//'`
35641    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35642        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35643  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35644    # xlc -qversion output typically looks like
35645    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35646    #     Version: 11.01.0000.0015
35647    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35648    # Check that this is likely to be the IBM XL C compiler.
35649    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35650    if test $? -ne 0; then
35651      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35652      { $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
35653$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35654      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35655$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35656      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35657$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35658      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35659    fi
35660    # Collapse compiler output into a single line
35661    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35662    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35663        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35664  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35665    # There is no specific version flag, but all output starts with a version string.
35666    # First line typically looks something like:
35667    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35668    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35669    # Check that this is likely to be Microsoft CL.EXE.
35670    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35671    if test $? -ne 0; then
35672      { $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
35673$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35674      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35675$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35676      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35677    fi
35678    # Collapse compiler output into a single line
35679    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35680    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35681        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35682  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35683    # gcc --version output typically looks like
35684    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35685    #     Copyright (C) 2013 Free Software Foundation, Inc.
35686    #     This is free software; see the source for copying conditions.  There is NO
35687    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35688    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35689    # Check that this is likely to be GCC.
35690    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35691    if test $? -ne 0; then
35692      { $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
35693$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35694      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35695$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35696      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35697    fi
35698    # Remove Copyright and legalese from version string, and
35699    # collapse into a single line
35700    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35701        $SED -e 's/ *Copyright .*//'`
35702    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35703        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35704  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35705    # clang --version output typically looks like
35706    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35707    #    clang version 3.3 (tags/RELEASE_33/final)
35708    # or
35709    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35710    #    Target: x86_64-pc-linux-gnu
35711    #    Thread model: posix
35712    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35713    # Check that this is likely to be clang
35714    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35715    if test $? -ne 0; then
35716      { $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
35717$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35718      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35719$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35720      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35721    fi
35722    # Collapse compiler output into a single line
35723    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35724    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35725        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35726  else
35727      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35728  fi
35729  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35730  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35731  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35732  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35733
35734  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35735$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35736
35737
35738  # Now that we have resolved CXX ourself, let autoconf have its go at it
35739  ac_ext=cpp
35740ac_cpp='$CXXCPP $CPPFLAGS'
35741ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35742ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35743ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35744if test -z "$CXX"; then
35745  if test -n "$CCC"; then
35746    CXX=$CCC
35747  else
35748    if test -n "$ac_tool_prefix"; then
35749  for ac_prog in $CXX
35750  do
35751    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35752set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35754$as_echo_n "checking for $ac_word... " >&6; }
35755if ${ac_cv_prog_CXX+:} false; then :
35756  $as_echo_n "(cached) " >&6
35757else
35758  if test -n "$CXX"; then
35759  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35760else
35761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35762for as_dir in $PATH
35763do
35764  IFS=$as_save_IFS
35765  test -z "$as_dir" && as_dir=.
35766    for ac_exec_ext in '' $ac_executable_extensions; do
35767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35768    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35770    break 2
35771  fi
35772done
35773  done
35774IFS=$as_save_IFS
35775
35776fi
35777fi
35778CXX=$ac_cv_prog_CXX
35779if test -n "$CXX"; then
35780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35781$as_echo "$CXX" >&6; }
35782else
35783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35784$as_echo "no" >&6; }
35785fi
35786
35787
35788    test -n "$CXX" && break
35789  done
35790fi
35791if test -z "$CXX"; then
35792  ac_ct_CXX=$CXX
35793  for ac_prog in $CXX
35794do
35795  # Extract the first word of "$ac_prog", so it can be a program name with args.
35796set dummy $ac_prog; ac_word=$2
35797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35798$as_echo_n "checking for $ac_word... " >&6; }
35799if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35800  $as_echo_n "(cached) " >&6
35801else
35802  if test -n "$ac_ct_CXX"; then
35803  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35804else
35805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35806for as_dir in $PATH
35807do
35808  IFS=$as_save_IFS
35809  test -z "$as_dir" && as_dir=.
35810    for ac_exec_ext in '' $ac_executable_extensions; do
35811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35812    ac_cv_prog_ac_ct_CXX="$ac_prog"
35813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35814    break 2
35815  fi
35816done
35817  done
35818IFS=$as_save_IFS
35819
35820fi
35821fi
35822ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35823if test -n "$ac_ct_CXX"; then
35824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35825$as_echo "$ac_ct_CXX" >&6; }
35826else
35827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35828$as_echo "no" >&6; }
35829fi
35830
35831
35832  test -n "$ac_ct_CXX" && break
35833done
35834
35835  if test "x$ac_ct_CXX" = x; then
35836    CXX="g++"
35837  else
35838    case $cross_compiling:$ac_tool_warned in
35839yes:)
35840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35842ac_tool_warned=yes ;;
35843esac
35844    CXX=$ac_ct_CXX
35845  fi
35846fi
35847
35848  fi
35849fi
35850# Provide some information about the compiler.
35851$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35852set X $ac_compile
35853ac_compiler=$2
35854for ac_option in --version -v -V -qversion; do
35855  { { ac_try="$ac_compiler $ac_option >&5"
35856case "(($ac_try" in
35857  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35858  *) ac_try_echo=$ac_try;;
35859esac
35860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35861$as_echo "$ac_try_echo"; } >&5
35862  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35863  ac_status=$?
35864  if test -s conftest.err; then
35865    sed '10a\
35866... rest of stderr output deleted ...
35867         10q' conftest.err >conftest.er1
35868    cat conftest.er1 >&5
35869  fi
35870  rm -f conftest.er1 conftest.err
35871  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35872  test $ac_status = 0; }
35873done
35874
35875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35876$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35877if ${ac_cv_cxx_compiler_gnu+:} false; then :
35878  $as_echo_n "(cached) " >&6
35879else
35880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35881/* end confdefs.h.  */
35882
35883int
35884main ()
35885{
35886#ifndef __GNUC__
35887       choke me
35888#endif
35889
35890  ;
35891  return 0;
35892}
35893_ACEOF
35894if ac_fn_cxx_try_compile "$LINENO"; then :
35895  ac_compiler_gnu=yes
35896else
35897  ac_compiler_gnu=no
35898fi
35899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35900ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35901
35902fi
35903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35904$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35905if test $ac_compiler_gnu = yes; then
35906  GXX=yes
35907else
35908  GXX=
35909fi
35910ac_test_CXXFLAGS=${CXXFLAGS+set}
35911ac_save_CXXFLAGS=$CXXFLAGS
35912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35913$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35914if ${ac_cv_prog_cxx_g+:} false; then :
35915  $as_echo_n "(cached) " >&6
35916else
35917  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35918   ac_cxx_werror_flag=yes
35919   ac_cv_prog_cxx_g=no
35920   CXXFLAGS="-g"
35921   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35922/* end confdefs.h.  */
35923
35924int
35925main ()
35926{
35927
35928  ;
35929  return 0;
35930}
35931_ACEOF
35932if ac_fn_cxx_try_compile "$LINENO"; then :
35933  ac_cv_prog_cxx_g=yes
35934else
35935  CXXFLAGS=""
35936      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35937/* end confdefs.h.  */
35938
35939int
35940main ()
35941{
35942
35943  ;
35944  return 0;
35945}
35946_ACEOF
35947if ac_fn_cxx_try_compile "$LINENO"; then :
35948
35949else
35950  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35951	 CXXFLAGS="-g"
35952	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35953/* end confdefs.h.  */
35954
35955int
35956main ()
35957{
35958
35959  ;
35960  return 0;
35961}
35962_ACEOF
35963if ac_fn_cxx_try_compile "$LINENO"; then :
35964  ac_cv_prog_cxx_g=yes
35965fi
35966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35967fi
35968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35969fi
35970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35971   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35972fi
35973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35974$as_echo "$ac_cv_prog_cxx_g" >&6; }
35975if test "$ac_test_CXXFLAGS" = set; then
35976  CXXFLAGS=$ac_save_CXXFLAGS
35977elif test $ac_cv_prog_cxx_g = yes; then
35978  if test "$GXX" = yes; then
35979    CXXFLAGS="-g -O2"
35980  else
35981    CXXFLAGS="-g"
35982  fi
35983else
35984  if test "$GXX" = yes; then
35985    CXXFLAGS="-O2"
35986  else
35987    CXXFLAGS=
35988  fi
35989fi
35990ac_ext=cpp
35991ac_cpp='$CXXCPP $CPPFLAGS'
35992ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35993ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35994ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35995
35996
35997  # This is the compiler version number on the form X.Y[.Z]
35998
35999
36000
36001
36002  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36003    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36004$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36005    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36006$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36007  fi
36008
36009  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36010  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36011    { $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
36012$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;}
36013  fi
36014
36015  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36016    { $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
36017$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36018  fi
36019
36020  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36021
36022
36023  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36024
36025
36026
36027
36028
36029
36030
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073    # Execute function body
36074
36075  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36076  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36077
36078  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36079    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36080  fi
36081
36082  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36083    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36084  fi
36085
36086  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36087  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36088
36089  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36090    :
36091
36092  else
36093    :
36094
36095          { $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
36096$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36097
36098
36099  fi
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114  fi
36115
36116  #
36117  # Setup the preprocessor (CPP and CXXCPP)
36118  #
36119  ac_ext=c
36120ac_cpp='$CPP $CPPFLAGS'
36121ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36122ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36123ac_compiler_gnu=$ac_cv_c_compiler_gnu
36124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36125$as_echo_n "checking how to run the C preprocessor... " >&6; }
36126# On Suns, sometimes $CPP names a directory.
36127if test -n "$CPP" && test -d "$CPP"; then
36128  CPP=
36129fi
36130if test -z "$CPP"; then
36131  if ${ac_cv_prog_CPP+:} false; then :
36132  $as_echo_n "(cached) " >&6
36133else
36134      # Double quotes because CPP needs to be expanded
36135    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36136    do
36137      ac_preproc_ok=false
36138for ac_c_preproc_warn_flag in '' yes
36139do
36140  # Use a header file that comes with gcc, so configuring glibc
36141  # with a fresh cross-compiler works.
36142  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36143  # <limits.h> exists even on freestanding compilers.
36144  # On the NeXT, cc -E runs the code through the compiler's parser,
36145  # not just through cpp. "Syntax error" is here to catch this case.
36146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36147/* end confdefs.h.  */
36148#ifdef __STDC__
36149# include <limits.h>
36150#else
36151# include <assert.h>
36152#endif
36153		     Syntax error
36154_ACEOF
36155if ac_fn_c_try_cpp "$LINENO"; then :
36156
36157else
36158  # Broken: fails on valid input.
36159continue
36160fi
36161rm -f conftest.err conftest.i conftest.$ac_ext
36162
36163  # OK, works on sane cases.  Now check whether nonexistent headers
36164  # can be detected and how.
36165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36166/* end confdefs.h.  */
36167#include <ac_nonexistent.h>
36168_ACEOF
36169if ac_fn_c_try_cpp "$LINENO"; then :
36170  # Broken: success on invalid input.
36171continue
36172else
36173  # Passes both tests.
36174ac_preproc_ok=:
36175break
36176fi
36177rm -f conftest.err conftest.i conftest.$ac_ext
36178
36179done
36180# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36181rm -f conftest.i conftest.err conftest.$ac_ext
36182if $ac_preproc_ok; then :
36183  break
36184fi
36185
36186    done
36187    ac_cv_prog_CPP=$CPP
36188
36189fi
36190  CPP=$ac_cv_prog_CPP
36191else
36192  ac_cv_prog_CPP=$CPP
36193fi
36194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36195$as_echo "$CPP" >&6; }
36196ac_preproc_ok=false
36197for ac_c_preproc_warn_flag in '' yes
36198do
36199  # Use a header file that comes with gcc, so configuring glibc
36200  # with a fresh cross-compiler works.
36201  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36202  # <limits.h> exists even on freestanding compilers.
36203  # On the NeXT, cc -E runs the code through the compiler's parser,
36204  # not just through cpp. "Syntax error" is here to catch this case.
36205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36206/* end confdefs.h.  */
36207#ifdef __STDC__
36208# include <limits.h>
36209#else
36210# include <assert.h>
36211#endif
36212		     Syntax error
36213_ACEOF
36214if ac_fn_c_try_cpp "$LINENO"; then :
36215
36216else
36217  # Broken: fails on valid input.
36218continue
36219fi
36220rm -f conftest.err conftest.i conftest.$ac_ext
36221
36222  # OK, works on sane cases.  Now check whether nonexistent headers
36223  # can be detected and how.
36224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36225/* end confdefs.h.  */
36226#include <ac_nonexistent.h>
36227_ACEOF
36228if ac_fn_c_try_cpp "$LINENO"; then :
36229  # Broken: success on invalid input.
36230continue
36231else
36232  # Passes both tests.
36233ac_preproc_ok=:
36234break
36235fi
36236rm -f conftest.err conftest.i conftest.$ac_ext
36237
36238done
36239# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36240rm -f conftest.i conftest.err conftest.$ac_ext
36241if $ac_preproc_ok; then :
36242
36243else
36244  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36245$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36246as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36247See \`config.log' for more details" "$LINENO" 5; }
36248fi
36249
36250ac_ext=cpp
36251ac_cpp='$CXXCPP $CPPFLAGS'
36252ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36253ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36254ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36255
36256
36257  # Only process if variable expands to non-empty
36258
36259  if test "x$CPP" != x; then
36260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36261
36262  # First separate the path from the arguments. This will split at the first
36263  # space.
36264  complete="$CPP"
36265  path="${complete%% *}"
36266  tmp="$complete EOL"
36267  arguments="${tmp#* }"
36268
36269  # Input might be given as Windows format, start by converting to
36270  # unix format.
36271  new_path=`$CYGPATH -u "$path"`
36272
36273  # Now try to locate executable using which
36274  new_path=`$WHICH "$new_path" 2> /dev/null`
36275  # bat and cmd files are not always considered executable in cygwin causing which
36276  # to not find them
36277  if test "x$new_path" = x \
36278      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36279      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36280    new_path=`$CYGPATH -u "$path"`
36281  fi
36282  if test "x$new_path" = x; then
36283    # Oops. Which didn't find the executable.
36284    # The splitting of arguments from the executable at a space might have been incorrect,
36285    # since paths with space are more likely in Windows. Give it another try with the whole
36286    # argument.
36287    path="$complete"
36288    arguments="EOL"
36289    new_path=`$CYGPATH -u "$path"`
36290    new_path=`$WHICH "$new_path" 2> /dev/null`
36291    # bat and cmd files are not always considered executable in cygwin causing which
36292    # to not find them
36293    if test "x$new_path" = x \
36294        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36295        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36296      new_path=`$CYGPATH -u "$path"`
36297    fi
36298    if test "x$new_path" = x; then
36299      # It's still not found. Now this is an unrecoverable error.
36300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36301$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36302      has_space=`$ECHO "$complete" | $GREP " "`
36303      if test "x$has_space" != x; then
36304        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36305$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36306      fi
36307      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36308    fi
36309  fi
36310
36311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36314  # "foo.exe" is OK but "foo" is an error.
36315  #
36316  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36317  # It is also a way to make sure we got the proper file name for the real test later on.
36318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36319  if test "x$test_shortpath" = x; then
36320    # Short path failed, file does not exist as specified.
36321    # Try adding .exe or .cmd
36322    if test -f "${new_path}.exe"; then
36323      input_to_shortpath="${new_path}.exe"
36324    elif test -f "${new_path}.cmd"; then
36325      input_to_shortpath="${new_path}.cmd"
36326    else
36327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36328$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36329      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36330$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36331      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36332    fi
36333  else
36334    input_to_shortpath="$new_path"
36335  fi
36336
36337  # Call helper function which possibly converts this using DOS-style short mode.
36338  # If so, the updated path is stored in $new_path.
36339  new_path="$input_to_shortpath"
36340
36341  input_path="$input_to_shortpath"
36342  # Check if we need to convert this using DOS-style short mode. If the path
36343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36344  # take no chances and rewrite it.
36345  # Note: m4 eats our [], so we need to use [ and ] instead.
36346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36347  if test "x$has_forbidden_chars" != x; then
36348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36352      # Going to short mode and back again did indeed matter. Since short mode is
36353      # case insensitive, let's make it lowercase to improve readability.
36354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36355      # Now convert it back to Unix-style (cygpath)
36356      input_path=`$CYGPATH -u "$shortmode_path"`
36357      new_path="$input_path"
36358    fi
36359  fi
36360
36361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36362  if test "x$test_cygdrive_prefix" = x; then
36363    # As a simple fix, exclude /usr/bin since it's not a real path.
36364    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36366      # a path prefixed by /cygdrive for fixpath to work.
36367      new_path="$CYGWIN_ROOT_PATH$input_path"
36368    fi
36369  fi
36370
36371  # remove trailing .exe if any
36372  new_path="${new_path/%.exe/}"
36373
36374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36375
36376  # First separate the path from the arguments. This will split at the first
36377  # space.
36378  complete="$CPP"
36379  path="${complete%% *}"
36380  tmp="$complete EOL"
36381  arguments="${tmp#* }"
36382
36383  # Input might be given as Windows format, start by converting to
36384  # unix format.
36385  new_path="$path"
36386
36387  windows_path="$new_path"
36388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36389    unix_path=`$CYGPATH -u "$windows_path"`
36390    new_path="$unix_path"
36391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36393    new_path="$unix_path"
36394  fi
36395
36396
36397  # Now try to locate executable using which
36398  new_path=`$WHICH "$new_path" 2> /dev/null`
36399
36400  if test "x$new_path" = x; then
36401    # Oops. Which didn't find the executable.
36402    # The splitting of arguments from the executable at a space might have been incorrect,
36403    # since paths with space are more likely in Windows. Give it another try with the whole
36404    # argument.
36405    path="$complete"
36406    arguments="EOL"
36407    new_path="$path"
36408
36409  windows_path="$new_path"
36410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36411    unix_path=`$CYGPATH -u "$windows_path"`
36412    new_path="$unix_path"
36413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36415    new_path="$unix_path"
36416  fi
36417
36418
36419    new_path=`$WHICH "$new_path" 2> /dev/null`
36420    # bat and cmd files are not always considered executable in MSYS causing which
36421    # to not find them
36422    if test "x$new_path" = x \
36423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36425      new_path="$path"
36426
36427  windows_path="$new_path"
36428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36429    unix_path=`$CYGPATH -u "$windows_path"`
36430    new_path="$unix_path"
36431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36433    new_path="$unix_path"
36434  fi
36435
36436    fi
36437
36438    if test "x$new_path" = x; then
36439      # It's still not found. Now this is an unrecoverable error.
36440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36441$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36442      has_space=`$ECHO "$complete" | $GREP " "`
36443      if test "x$has_space" != x; then
36444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36446      fi
36447      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36448    fi
36449  fi
36450
36451  # Now new_path has a complete unix path to the binary
36452  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36453    # Keep paths in /bin as-is, but remove trailing .exe if any
36454    new_path="${new_path/%.exe/}"
36455    # Do not save /bin paths to all_fixpath_prefixes!
36456  else
36457    # Not in mixed or Windows style, start by that.
36458    new_path=`cmd //c echo $new_path`
36459
36460  input_path="$new_path"
36461  # Check if we need to convert this using DOS-style short mode. If the path
36462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36463  # take no chances and rewrite it.
36464  # Note: m4 eats our [], so we need to use [ and ] instead.
36465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36466  if test "x$has_forbidden_chars" != x; then
36467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36469  fi
36470
36471    # Output is in $new_path
36472
36473  windows_path="$new_path"
36474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36475    unix_path=`$CYGPATH -u "$windows_path"`
36476    new_path="$unix_path"
36477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36479    new_path="$unix_path"
36480  fi
36481
36482    # remove trailing .exe if any
36483    new_path="${new_path/%.exe/}"
36484
36485    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36486    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36487  fi
36488
36489    else
36490      # We're on a unix platform. Hooray! :)
36491      # First separate the path from the arguments. This will split at the first
36492      # space.
36493      complete="$CPP"
36494      path="${complete%% *}"
36495      tmp="$complete EOL"
36496      arguments="${tmp#* }"
36497
36498      # Cannot rely on the command "which" here since it doesn't always work.
36499      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36500      if test -z "$is_absolute_path"; then
36501        # Path to executable is not absolute. Find it.
36502        IFS_save="$IFS"
36503        IFS=:
36504        for p in $PATH; do
36505          if test -f "$p/$path" && test -x "$p/$path"; then
36506            new_path="$p/$path"
36507            break
36508          fi
36509        done
36510        IFS="$IFS_save"
36511      else
36512        # This is an absolute path, we can use it without further modifications.
36513        new_path="$path"
36514      fi
36515
36516      if test "x$new_path" = x; then
36517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36518$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36519        has_space=`$ECHO "$complete" | $GREP " "`
36520        if test "x$has_space" != x; then
36521          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36522$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36523        fi
36524        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36525      fi
36526    fi
36527
36528    # Now join together the path and the arguments once again
36529    if test "x$arguments" != xEOL; then
36530      new_complete="$new_path ${arguments% *}"
36531    else
36532      new_complete="$new_path"
36533    fi
36534
36535    if test "x$complete" != "x$new_complete"; then
36536      CPP="$new_complete"
36537      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36538$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36539    fi
36540  fi
36541
36542  ac_ext=cpp
36543ac_cpp='$CXXCPP $CPPFLAGS'
36544ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36545ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36546ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36548$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36549if test -z "$CXXCPP"; then
36550  if ${ac_cv_prog_CXXCPP+:} false; then :
36551  $as_echo_n "(cached) " >&6
36552else
36553      # Double quotes because CXXCPP needs to be expanded
36554    for CXXCPP in "$CXX -E" "/lib/cpp"
36555    do
36556      ac_preproc_ok=false
36557for ac_cxx_preproc_warn_flag in '' yes
36558do
36559  # Use a header file that comes with gcc, so configuring glibc
36560  # with a fresh cross-compiler works.
36561  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36562  # <limits.h> exists even on freestanding compilers.
36563  # On the NeXT, cc -E runs the code through the compiler's parser,
36564  # not just through cpp. "Syntax error" is here to catch this case.
36565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36566/* end confdefs.h.  */
36567#ifdef __STDC__
36568# include <limits.h>
36569#else
36570# include <assert.h>
36571#endif
36572		     Syntax error
36573_ACEOF
36574if ac_fn_cxx_try_cpp "$LINENO"; then :
36575
36576else
36577  # Broken: fails on valid input.
36578continue
36579fi
36580rm -f conftest.err conftest.i conftest.$ac_ext
36581
36582  # OK, works on sane cases.  Now check whether nonexistent headers
36583  # can be detected and how.
36584  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36585/* end confdefs.h.  */
36586#include <ac_nonexistent.h>
36587_ACEOF
36588if ac_fn_cxx_try_cpp "$LINENO"; then :
36589  # Broken: success on invalid input.
36590continue
36591else
36592  # Passes both tests.
36593ac_preproc_ok=:
36594break
36595fi
36596rm -f conftest.err conftest.i conftest.$ac_ext
36597
36598done
36599# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36600rm -f conftest.i conftest.err conftest.$ac_ext
36601if $ac_preproc_ok; then :
36602  break
36603fi
36604
36605    done
36606    ac_cv_prog_CXXCPP=$CXXCPP
36607
36608fi
36609  CXXCPP=$ac_cv_prog_CXXCPP
36610else
36611  ac_cv_prog_CXXCPP=$CXXCPP
36612fi
36613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36614$as_echo "$CXXCPP" >&6; }
36615ac_preproc_ok=false
36616for ac_cxx_preproc_warn_flag in '' yes
36617do
36618  # Use a header file that comes with gcc, so configuring glibc
36619  # with a fresh cross-compiler works.
36620  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36621  # <limits.h> exists even on freestanding compilers.
36622  # On the NeXT, cc -E runs the code through the compiler's parser,
36623  # not just through cpp. "Syntax error" is here to catch this case.
36624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36625/* end confdefs.h.  */
36626#ifdef __STDC__
36627# include <limits.h>
36628#else
36629# include <assert.h>
36630#endif
36631		     Syntax error
36632_ACEOF
36633if ac_fn_cxx_try_cpp "$LINENO"; then :
36634
36635else
36636  # Broken: fails on valid input.
36637continue
36638fi
36639rm -f conftest.err conftest.i conftest.$ac_ext
36640
36641  # OK, works on sane cases.  Now check whether nonexistent headers
36642  # can be detected and how.
36643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36644/* end confdefs.h.  */
36645#include <ac_nonexistent.h>
36646_ACEOF
36647if ac_fn_cxx_try_cpp "$LINENO"; then :
36648  # Broken: success on invalid input.
36649continue
36650else
36651  # Passes both tests.
36652ac_preproc_ok=:
36653break
36654fi
36655rm -f conftest.err conftest.i conftest.$ac_ext
36656
36657done
36658# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36659rm -f conftest.i conftest.err conftest.$ac_ext
36660if $ac_preproc_ok; then :
36661
36662else
36663  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36665as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36666See \`config.log' for more details" "$LINENO" 5; }
36667fi
36668
36669ac_ext=cpp
36670ac_cpp='$CXXCPP $CPPFLAGS'
36671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36674
36675
36676  # Only process if variable expands to non-empty
36677
36678  if test "x$CXXCPP" != x; then
36679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36680
36681  # First separate the path from the arguments. This will split at the first
36682  # space.
36683  complete="$CXXCPP"
36684  path="${complete%% *}"
36685  tmp="$complete EOL"
36686  arguments="${tmp#* }"
36687
36688  # Input might be given as Windows format, start by converting to
36689  # unix format.
36690  new_path=`$CYGPATH -u "$path"`
36691
36692  # Now try to locate executable using which
36693  new_path=`$WHICH "$new_path" 2> /dev/null`
36694  # bat and cmd files are not always considered executable in cygwin causing which
36695  # to not find them
36696  if test "x$new_path" = x \
36697      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36698      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36699    new_path=`$CYGPATH -u "$path"`
36700  fi
36701  if test "x$new_path" = x; then
36702    # Oops. Which didn't find the executable.
36703    # The splitting of arguments from the executable at a space might have been incorrect,
36704    # since paths with space are more likely in Windows. Give it another try with the whole
36705    # argument.
36706    path="$complete"
36707    arguments="EOL"
36708    new_path=`$CYGPATH -u "$path"`
36709    new_path=`$WHICH "$new_path" 2> /dev/null`
36710    # bat and cmd files are not always considered executable in cygwin causing which
36711    # to not find them
36712    if test "x$new_path" = x \
36713        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36714        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36715      new_path=`$CYGPATH -u "$path"`
36716    fi
36717    if test "x$new_path" = x; then
36718      # It's still not found. Now this is an unrecoverable error.
36719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36720$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36721      has_space=`$ECHO "$complete" | $GREP " "`
36722      if test "x$has_space" != x; then
36723        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36724$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36725      fi
36726      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36727    fi
36728  fi
36729
36730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36733  # "foo.exe" is OK but "foo" is an error.
36734  #
36735  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36736  # It is also a way to make sure we got the proper file name for the real test later on.
36737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36738  if test "x$test_shortpath" = x; then
36739    # Short path failed, file does not exist as specified.
36740    # Try adding .exe or .cmd
36741    if test -f "${new_path}.exe"; then
36742      input_to_shortpath="${new_path}.exe"
36743    elif test -f "${new_path}.cmd"; then
36744      input_to_shortpath="${new_path}.cmd"
36745    else
36746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36747$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36748      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36749$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36750      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36751    fi
36752  else
36753    input_to_shortpath="$new_path"
36754  fi
36755
36756  # Call helper function which possibly converts this using DOS-style short mode.
36757  # If so, the updated path is stored in $new_path.
36758  new_path="$input_to_shortpath"
36759
36760  input_path="$input_to_shortpath"
36761  # Check if we need to convert this using DOS-style short mode. If the path
36762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36763  # take no chances and rewrite it.
36764  # Note: m4 eats our [], so we need to use [ and ] instead.
36765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36766  if test "x$has_forbidden_chars" != x; then
36767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36771      # Going to short mode and back again did indeed matter. Since short mode is
36772      # case insensitive, let's make it lowercase to improve readability.
36773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36774      # Now convert it back to Unix-style (cygpath)
36775      input_path=`$CYGPATH -u "$shortmode_path"`
36776      new_path="$input_path"
36777    fi
36778  fi
36779
36780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36781  if test "x$test_cygdrive_prefix" = x; then
36782    # As a simple fix, exclude /usr/bin since it's not a real path.
36783    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36785      # a path prefixed by /cygdrive for fixpath to work.
36786      new_path="$CYGWIN_ROOT_PATH$input_path"
36787    fi
36788  fi
36789
36790  # remove trailing .exe if any
36791  new_path="${new_path/%.exe/}"
36792
36793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36794
36795  # First separate the path from the arguments. This will split at the first
36796  # space.
36797  complete="$CXXCPP"
36798  path="${complete%% *}"
36799  tmp="$complete EOL"
36800  arguments="${tmp#* }"
36801
36802  # Input might be given as Windows format, start by converting to
36803  # unix format.
36804  new_path="$path"
36805
36806  windows_path="$new_path"
36807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36808    unix_path=`$CYGPATH -u "$windows_path"`
36809    new_path="$unix_path"
36810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36812    new_path="$unix_path"
36813  fi
36814
36815
36816  # Now try to locate executable using which
36817  new_path=`$WHICH "$new_path" 2> /dev/null`
36818
36819  if test "x$new_path" = x; then
36820    # Oops. Which didn't find the executable.
36821    # The splitting of arguments from the executable at a space might have been incorrect,
36822    # since paths with space are more likely in Windows. Give it another try with the whole
36823    # argument.
36824    path="$complete"
36825    arguments="EOL"
36826    new_path="$path"
36827
36828  windows_path="$new_path"
36829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36830    unix_path=`$CYGPATH -u "$windows_path"`
36831    new_path="$unix_path"
36832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36834    new_path="$unix_path"
36835  fi
36836
36837
36838    new_path=`$WHICH "$new_path" 2> /dev/null`
36839    # bat and cmd files are not always considered executable in MSYS causing which
36840    # to not find them
36841    if test "x$new_path" = x \
36842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36844      new_path="$path"
36845
36846  windows_path="$new_path"
36847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36848    unix_path=`$CYGPATH -u "$windows_path"`
36849    new_path="$unix_path"
36850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36852    new_path="$unix_path"
36853  fi
36854
36855    fi
36856
36857    if test "x$new_path" = x; then
36858      # It's still not found. Now this is an unrecoverable error.
36859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36860$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36861      has_space=`$ECHO "$complete" | $GREP " "`
36862      if test "x$has_space" != x; then
36863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36865      fi
36866      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36867    fi
36868  fi
36869
36870  # Now new_path has a complete unix path to the binary
36871  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36872    # Keep paths in /bin as-is, but remove trailing .exe if any
36873    new_path="${new_path/%.exe/}"
36874    # Do not save /bin paths to all_fixpath_prefixes!
36875  else
36876    # Not in mixed or Windows style, start by that.
36877    new_path=`cmd //c echo $new_path`
36878
36879  input_path="$new_path"
36880  # Check if we need to convert this using DOS-style short mode. If the path
36881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36882  # take no chances and rewrite it.
36883  # Note: m4 eats our [], so we need to use [ and ] instead.
36884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36885  if test "x$has_forbidden_chars" != x; then
36886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36888  fi
36889
36890    # Output is in $new_path
36891
36892  windows_path="$new_path"
36893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36894    unix_path=`$CYGPATH -u "$windows_path"`
36895    new_path="$unix_path"
36896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36898    new_path="$unix_path"
36899  fi
36900
36901    # remove trailing .exe if any
36902    new_path="${new_path/%.exe/}"
36903
36904    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36905    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36906  fi
36907
36908    else
36909      # We're on a unix platform. Hooray! :)
36910      # First separate the path from the arguments. This will split at the first
36911      # space.
36912      complete="$CXXCPP"
36913      path="${complete%% *}"
36914      tmp="$complete EOL"
36915      arguments="${tmp#* }"
36916
36917      # Cannot rely on the command "which" here since it doesn't always work.
36918      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36919      if test -z "$is_absolute_path"; then
36920        # Path to executable is not absolute. Find it.
36921        IFS_save="$IFS"
36922        IFS=:
36923        for p in $PATH; do
36924          if test -f "$p/$path" && test -x "$p/$path"; then
36925            new_path="$p/$path"
36926            break
36927          fi
36928        done
36929        IFS="$IFS_save"
36930      else
36931        # This is an absolute path, we can use it without further modifications.
36932        new_path="$path"
36933      fi
36934
36935      if test "x$new_path" = x; then
36936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36937$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36938        has_space=`$ECHO "$complete" | $GREP " "`
36939        if test "x$has_space" != x; then
36940          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36941$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36942        fi
36943        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36944      fi
36945    fi
36946
36947    # Now join together the path and the arguments once again
36948    if test "x$arguments" != xEOL; then
36949      new_complete="$new_path ${arguments% *}"
36950    else
36951      new_complete="$new_path"
36952    fi
36953
36954    if test "x$complete" != "x$new_complete"; then
36955      CXXCPP="$new_complete"
36956      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36957$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36958    fi
36959  fi
36960
36961
36962  #
36963  # Setup the linker (LD)
36964  #
36965  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36966    # In the Microsoft toolchain we have a separate LD command "link".
36967    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36968    # a cygwin program for something completely different.
36969    # Extract the first word of "link", so it can be a program name with args.
36970set dummy link; ac_word=$2
36971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36972$as_echo_n "checking for $ac_word... " >&6; }
36973if ${ac_cv_prog_LD+:} false; then :
36974  $as_echo_n "(cached) " >&6
36975else
36976  if test -n "$LD"; then
36977  ac_cv_prog_LD="$LD" # Let the user override the test.
36978else
36979  ac_prog_rejected=no
36980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36981for as_dir in $PATH
36982do
36983  IFS=$as_save_IFS
36984  test -z "$as_dir" && as_dir=.
36985    for ac_exec_ext in '' $ac_executable_extensions; do
36986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36987    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36988       ac_prog_rejected=yes
36989       continue
36990     fi
36991    ac_cv_prog_LD="link"
36992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36993    break 2
36994  fi
36995done
36996  done
36997IFS=$as_save_IFS
36998
36999if test $ac_prog_rejected = yes; then
37000  # We found a bogon in the path, so make sure we never use it.
37001  set dummy $ac_cv_prog_LD
37002  shift
37003  if test $# != 0; then
37004    # We chose a different compiler from the bogus one.
37005    # However, it has the same basename, so the bogon will be chosen
37006    # first if we set LD to just the basename; use the full file name.
37007    shift
37008    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37009  fi
37010fi
37011fi
37012fi
37013LD=$ac_cv_prog_LD
37014if test -n "$LD"; then
37015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37016$as_echo "$LD" >&6; }
37017else
37018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37019$as_echo "no" >&6; }
37020fi
37021
37022
37023
37024  # Only process if variable expands to non-empty
37025
37026  if test "x$LD" != x; then
37027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37028
37029  # First separate the path from the arguments. This will split at the first
37030  # space.
37031  complete="$LD"
37032  path="${complete%% *}"
37033  tmp="$complete EOL"
37034  arguments="${tmp#* }"
37035
37036  # Input might be given as Windows format, start by converting to
37037  # unix format.
37038  new_path=`$CYGPATH -u "$path"`
37039
37040  # Now try to locate executable using which
37041  new_path=`$WHICH "$new_path" 2> /dev/null`
37042  # bat and cmd files are not always considered executable in cygwin causing which
37043  # to not find them
37044  if test "x$new_path" = x \
37045      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37046      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37047    new_path=`$CYGPATH -u "$path"`
37048  fi
37049  if test "x$new_path" = x; then
37050    # Oops. Which didn't find the executable.
37051    # The splitting of arguments from the executable at a space might have been incorrect,
37052    # since paths with space are more likely in Windows. Give it another try with the whole
37053    # argument.
37054    path="$complete"
37055    arguments="EOL"
37056    new_path=`$CYGPATH -u "$path"`
37057    new_path=`$WHICH "$new_path" 2> /dev/null`
37058    # bat and cmd files are not always considered executable in cygwin causing which
37059    # to not find them
37060    if test "x$new_path" = x \
37061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37063      new_path=`$CYGPATH -u "$path"`
37064    fi
37065    if test "x$new_path" = x; then
37066      # It's still not found. Now this is an unrecoverable error.
37067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37068$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37069      has_space=`$ECHO "$complete" | $GREP " "`
37070      if test "x$has_space" != x; then
37071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37073      fi
37074      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37075    fi
37076  fi
37077
37078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37081  # "foo.exe" is OK but "foo" is an error.
37082  #
37083  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37084  # It is also a way to make sure we got the proper file name for the real test later on.
37085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37086  if test "x$test_shortpath" = x; then
37087    # Short path failed, file does not exist as specified.
37088    # Try adding .exe or .cmd
37089    if test -f "${new_path}.exe"; then
37090      input_to_shortpath="${new_path}.exe"
37091    elif test -f "${new_path}.cmd"; then
37092      input_to_shortpath="${new_path}.cmd"
37093    else
37094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37095$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37098      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37099    fi
37100  else
37101    input_to_shortpath="$new_path"
37102  fi
37103
37104  # Call helper function which possibly converts this using DOS-style short mode.
37105  # If so, the updated path is stored in $new_path.
37106  new_path="$input_to_shortpath"
37107
37108  input_path="$input_to_shortpath"
37109  # Check if we need to convert this using DOS-style short mode. If the path
37110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37111  # take no chances and rewrite it.
37112  # Note: m4 eats our [], so we need to use [ and ] instead.
37113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37114  if test "x$has_forbidden_chars" != x; then
37115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37119      # Going to short mode and back again did indeed matter. Since short mode is
37120      # case insensitive, let's make it lowercase to improve readability.
37121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37122      # Now convert it back to Unix-style (cygpath)
37123      input_path=`$CYGPATH -u "$shortmode_path"`
37124      new_path="$input_path"
37125    fi
37126  fi
37127
37128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37129  if test "x$test_cygdrive_prefix" = x; then
37130    # As a simple fix, exclude /usr/bin since it's not a real path.
37131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37133      # a path prefixed by /cygdrive for fixpath to work.
37134      new_path="$CYGWIN_ROOT_PATH$input_path"
37135    fi
37136  fi
37137
37138  # remove trailing .exe if any
37139  new_path="${new_path/%.exe/}"
37140
37141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37142
37143  # First separate the path from the arguments. This will split at the first
37144  # space.
37145  complete="$LD"
37146  path="${complete%% *}"
37147  tmp="$complete EOL"
37148  arguments="${tmp#* }"
37149
37150  # Input might be given as Windows format, start by converting to
37151  # unix format.
37152  new_path="$path"
37153
37154  windows_path="$new_path"
37155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37156    unix_path=`$CYGPATH -u "$windows_path"`
37157    new_path="$unix_path"
37158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37160    new_path="$unix_path"
37161  fi
37162
37163
37164  # Now try to locate executable using which
37165  new_path=`$WHICH "$new_path" 2> /dev/null`
37166
37167  if test "x$new_path" = x; then
37168    # Oops. Which didn't find the executable.
37169    # The splitting of arguments from the executable at a space might have been incorrect,
37170    # since paths with space are more likely in Windows. Give it another try with the whole
37171    # argument.
37172    path="$complete"
37173    arguments="EOL"
37174    new_path="$path"
37175
37176  windows_path="$new_path"
37177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37178    unix_path=`$CYGPATH -u "$windows_path"`
37179    new_path="$unix_path"
37180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37182    new_path="$unix_path"
37183  fi
37184
37185
37186    new_path=`$WHICH "$new_path" 2> /dev/null`
37187    # bat and cmd files are not always considered executable in MSYS causing which
37188    # to not find them
37189    if test "x$new_path" = x \
37190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37192      new_path="$path"
37193
37194  windows_path="$new_path"
37195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37196    unix_path=`$CYGPATH -u "$windows_path"`
37197    new_path="$unix_path"
37198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37200    new_path="$unix_path"
37201  fi
37202
37203    fi
37204
37205    if test "x$new_path" = x; then
37206      # It's still not found. Now this is an unrecoverable error.
37207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37208$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37209      has_space=`$ECHO "$complete" | $GREP " "`
37210      if test "x$has_space" != x; then
37211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37213      fi
37214      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37215    fi
37216  fi
37217
37218  # Now new_path has a complete unix path to the binary
37219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37220    # Keep paths in /bin as-is, but remove trailing .exe if any
37221    new_path="${new_path/%.exe/}"
37222    # Do not save /bin paths to all_fixpath_prefixes!
37223  else
37224    # Not in mixed or Windows style, start by that.
37225    new_path=`cmd //c echo $new_path`
37226
37227  input_path="$new_path"
37228  # Check if we need to convert this using DOS-style short mode. If the path
37229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37230  # take no chances and rewrite it.
37231  # Note: m4 eats our [], so we need to use [ and ] instead.
37232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37233  if test "x$has_forbidden_chars" != x; then
37234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37236  fi
37237
37238    # Output is in $new_path
37239
37240  windows_path="$new_path"
37241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37242    unix_path=`$CYGPATH -u "$windows_path"`
37243    new_path="$unix_path"
37244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37246    new_path="$unix_path"
37247  fi
37248
37249    # remove trailing .exe if any
37250    new_path="${new_path/%.exe/}"
37251
37252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37254  fi
37255
37256    else
37257      # We're on a unix platform. Hooray! :)
37258      # First separate the path from the arguments. This will split at the first
37259      # space.
37260      complete="$LD"
37261      path="${complete%% *}"
37262      tmp="$complete EOL"
37263      arguments="${tmp#* }"
37264
37265      # Cannot rely on the command "which" here since it doesn't always work.
37266      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37267      if test -z "$is_absolute_path"; then
37268        # Path to executable is not absolute. Find it.
37269        IFS_save="$IFS"
37270        IFS=:
37271        for p in $PATH; do
37272          if test -f "$p/$path" && test -x "$p/$path"; then
37273            new_path="$p/$path"
37274            break
37275          fi
37276        done
37277        IFS="$IFS_save"
37278      else
37279        # This is an absolute path, we can use it without further modifications.
37280        new_path="$path"
37281      fi
37282
37283      if test "x$new_path" = x; then
37284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37285$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37286        has_space=`$ECHO "$complete" | $GREP " "`
37287        if test "x$has_space" != x; then
37288          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37290        fi
37291        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37292      fi
37293    fi
37294
37295    # Now join together the path and the arguments once again
37296    if test "x$arguments" != xEOL; then
37297      new_complete="$new_path ${arguments% *}"
37298    else
37299      new_complete="$new_path"
37300    fi
37301
37302    if test "x$complete" != "x$new_complete"; then
37303      LD="$new_complete"
37304      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37305$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37306    fi
37307  fi
37308
37309    # Verify that we indeed succeeded with this trick.
37310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37311$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37312    "$LD" --version > /dev/null
37313    if test $? -eq 0 ; then
37314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37315$as_echo "no" >&6; }
37316      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37317    else
37318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37319$as_echo "yes" >&6; }
37320    fi
37321    LDCXX="$LD"
37322  else
37323    # All other toolchains use the compiler to link.
37324    LD="$CC"
37325    LDCXX="$CXX"
37326  fi
37327
37328  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37329
37330
37331  #
37332  # Setup the assembler (AS)
37333  #
37334  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37335
37336
37337  # Publish this variable in the help.
37338
37339
37340  if [ -z "${AS+x}" ]; then
37341    # The variable is not set by user, try to locate tool using the code snippet
37342    for ac_prog in as
37343do
37344  # Extract the first word of "$ac_prog", so it can be a program name with args.
37345set dummy $ac_prog; ac_word=$2
37346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37347$as_echo_n "checking for $ac_word... " >&6; }
37348if ${ac_cv_path_AS+:} false; then :
37349  $as_echo_n "(cached) " >&6
37350else
37351  case $AS in
37352  [\\/]* | ?:[\\/]*)
37353  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37354  ;;
37355  *)
37356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37357for as_dir in $PATH
37358do
37359  IFS=$as_save_IFS
37360  test -z "$as_dir" && as_dir=.
37361    for ac_exec_ext in '' $ac_executable_extensions; do
37362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37363    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37365    break 2
37366  fi
37367done
37368  done
37369IFS=$as_save_IFS
37370
37371  ;;
37372esac
37373fi
37374AS=$ac_cv_path_AS
37375if test -n "$AS"; then
37376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37377$as_echo "$AS" >&6; }
37378else
37379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37380$as_echo "no" >&6; }
37381fi
37382
37383
37384  test -n "$AS" && break
37385done
37386
37387  else
37388    # The variable is set, but is it from the command line or the environment?
37389
37390    # Try to remove the string !AS! from our list.
37391    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37392    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37393      # If it failed, the variable was not from the command line. Ignore it,
37394      # but warn the user (except for BASH, which is always set by the calling BASH).
37395      if test "xAS" != xBASH; then
37396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37397$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37398      fi
37399      # Try to locate tool using the code snippet
37400      for ac_prog in as
37401do
37402  # Extract the first word of "$ac_prog", so it can be a program name with args.
37403set dummy $ac_prog; ac_word=$2
37404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37405$as_echo_n "checking for $ac_word... " >&6; }
37406if ${ac_cv_path_AS+:} false; then :
37407  $as_echo_n "(cached) " >&6
37408else
37409  case $AS in
37410  [\\/]* | ?:[\\/]*)
37411  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37412  ;;
37413  *)
37414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37415for as_dir in $PATH
37416do
37417  IFS=$as_save_IFS
37418  test -z "$as_dir" && as_dir=.
37419    for ac_exec_ext in '' $ac_executable_extensions; do
37420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37421    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37423    break 2
37424  fi
37425done
37426  done
37427IFS=$as_save_IFS
37428
37429  ;;
37430esac
37431fi
37432AS=$ac_cv_path_AS
37433if test -n "$AS"; then
37434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37435$as_echo "$AS" >&6; }
37436else
37437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37438$as_echo "no" >&6; }
37439fi
37440
37441
37442  test -n "$AS" && break
37443done
37444
37445    else
37446      # If it succeeded, then it was overridden by the user. We will use it
37447      # for the tool.
37448
37449      # First remove it from the list of overridden variables, so we can test
37450      # for unknown variables in the end.
37451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37452
37453      # Check if we try to supply an empty value
37454      if test "x$AS" = x; then
37455        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37456$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37458$as_echo_n "checking for AS... " >&6; }
37459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37460$as_echo "disabled" >&6; }
37461      else
37462        # Check if the provided tool contains a complete path.
37463        tool_specified="$AS"
37464        tool_basename="${tool_specified##*/}"
37465        if test "x$tool_basename" = "x$tool_specified"; then
37466          # A command without a complete path is provided, search $PATH.
37467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37468$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37469          # Extract the first word of "$tool_basename", so it can be a program name with args.
37470set dummy $tool_basename; ac_word=$2
37471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37472$as_echo_n "checking for $ac_word... " >&6; }
37473if ${ac_cv_path_AS+:} false; then :
37474  $as_echo_n "(cached) " >&6
37475else
37476  case $AS in
37477  [\\/]* | ?:[\\/]*)
37478  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37479  ;;
37480  *)
37481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37482for as_dir in $PATH
37483do
37484  IFS=$as_save_IFS
37485  test -z "$as_dir" && as_dir=.
37486    for ac_exec_ext in '' $ac_executable_extensions; do
37487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37488    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37490    break 2
37491  fi
37492done
37493  done
37494IFS=$as_save_IFS
37495
37496  ;;
37497esac
37498fi
37499AS=$ac_cv_path_AS
37500if test -n "$AS"; then
37501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37502$as_echo "$AS" >&6; }
37503else
37504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37505$as_echo "no" >&6; }
37506fi
37507
37508
37509          if test "x$AS" = x; then
37510            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37511          fi
37512        else
37513          # Otherwise we believe it is a complete path. Use it as it is.
37514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37515$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37516          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37517$as_echo_n "checking for AS... " >&6; }
37518          if test ! -x "$tool_specified"; then
37519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37520$as_echo "not found" >&6; }
37521            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37522          fi
37523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37524$as_echo "$tool_specified" >&6; }
37525        fi
37526      fi
37527    fi
37528
37529  fi
37530
37531
37532
37533  # Only process if variable expands to non-empty
37534
37535  if test "x$AS" != x; then
37536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37537
37538  # First separate the path from the arguments. This will split at the first
37539  # space.
37540  complete="$AS"
37541  path="${complete%% *}"
37542  tmp="$complete EOL"
37543  arguments="${tmp#* }"
37544
37545  # Input might be given as Windows format, start by converting to
37546  # unix format.
37547  new_path=`$CYGPATH -u "$path"`
37548
37549  # Now try to locate executable using which
37550  new_path=`$WHICH "$new_path" 2> /dev/null`
37551  # bat and cmd files are not always considered executable in cygwin causing which
37552  # to not find them
37553  if test "x$new_path" = x \
37554      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37555      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37556    new_path=`$CYGPATH -u "$path"`
37557  fi
37558  if test "x$new_path" = x; then
37559    # Oops. Which didn't find the executable.
37560    # The splitting of arguments from the executable at a space might have been incorrect,
37561    # since paths with space are more likely in Windows. Give it another try with the whole
37562    # argument.
37563    path="$complete"
37564    arguments="EOL"
37565    new_path=`$CYGPATH -u "$path"`
37566    new_path=`$WHICH "$new_path" 2> /dev/null`
37567    # bat and cmd files are not always considered executable in cygwin causing which
37568    # to not find them
37569    if test "x$new_path" = x \
37570        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37571        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37572      new_path=`$CYGPATH -u "$path"`
37573    fi
37574    if test "x$new_path" = x; then
37575      # It's still not found. Now this is an unrecoverable error.
37576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37577$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37578      has_space=`$ECHO "$complete" | $GREP " "`
37579      if test "x$has_space" != x; then
37580        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37581$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37582      fi
37583      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37584    fi
37585  fi
37586
37587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37590  # "foo.exe" is OK but "foo" is an error.
37591  #
37592  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37593  # It is also a way to make sure we got the proper file name for the real test later on.
37594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37595  if test "x$test_shortpath" = x; then
37596    # Short path failed, file does not exist as specified.
37597    # Try adding .exe or .cmd
37598    if test -f "${new_path}.exe"; then
37599      input_to_shortpath="${new_path}.exe"
37600    elif test -f "${new_path}.cmd"; then
37601      input_to_shortpath="${new_path}.cmd"
37602    else
37603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37604$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37605      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37606$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37607      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37608    fi
37609  else
37610    input_to_shortpath="$new_path"
37611  fi
37612
37613  # Call helper function which possibly converts this using DOS-style short mode.
37614  # If so, the updated path is stored in $new_path.
37615  new_path="$input_to_shortpath"
37616
37617  input_path="$input_to_shortpath"
37618  # Check if we need to convert this using DOS-style short mode. If the path
37619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37620  # take no chances and rewrite it.
37621  # Note: m4 eats our [], so we need to use [ and ] instead.
37622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37623  if test "x$has_forbidden_chars" != x; then
37624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37628      # Going to short mode and back again did indeed matter. Since short mode is
37629      # case insensitive, let's make it lowercase to improve readability.
37630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37631      # Now convert it back to Unix-style (cygpath)
37632      input_path=`$CYGPATH -u "$shortmode_path"`
37633      new_path="$input_path"
37634    fi
37635  fi
37636
37637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37638  if test "x$test_cygdrive_prefix" = x; then
37639    # As a simple fix, exclude /usr/bin since it's not a real path.
37640    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37642      # a path prefixed by /cygdrive for fixpath to work.
37643      new_path="$CYGWIN_ROOT_PATH$input_path"
37644    fi
37645  fi
37646
37647  # remove trailing .exe if any
37648  new_path="${new_path/%.exe/}"
37649
37650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37651
37652  # First separate the path from the arguments. This will split at the first
37653  # space.
37654  complete="$AS"
37655  path="${complete%% *}"
37656  tmp="$complete EOL"
37657  arguments="${tmp#* }"
37658
37659  # Input might be given as Windows format, start by converting to
37660  # unix format.
37661  new_path="$path"
37662
37663  windows_path="$new_path"
37664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37665    unix_path=`$CYGPATH -u "$windows_path"`
37666    new_path="$unix_path"
37667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37669    new_path="$unix_path"
37670  fi
37671
37672
37673  # Now try to locate executable using which
37674  new_path=`$WHICH "$new_path" 2> /dev/null`
37675
37676  if test "x$new_path" = x; then
37677    # Oops. Which didn't find the executable.
37678    # The splitting of arguments from the executable at a space might have been incorrect,
37679    # since paths with space are more likely in Windows. Give it another try with the whole
37680    # argument.
37681    path="$complete"
37682    arguments="EOL"
37683    new_path="$path"
37684
37685  windows_path="$new_path"
37686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37687    unix_path=`$CYGPATH -u "$windows_path"`
37688    new_path="$unix_path"
37689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37691    new_path="$unix_path"
37692  fi
37693
37694
37695    new_path=`$WHICH "$new_path" 2> /dev/null`
37696    # bat and cmd files are not always considered executable in MSYS causing which
37697    # to not find them
37698    if test "x$new_path" = x \
37699        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37700        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37701      new_path="$path"
37702
37703  windows_path="$new_path"
37704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37705    unix_path=`$CYGPATH -u "$windows_path"`
37706    new_path="$unix_path"
37707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37709    new_path="$unix_path"
37710  fi
37711
37712    fi
37713
37714    if test "x$new_path" = x; then
37715      # It's still not found. Now this is an unrecoverable error.
37716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37717$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37718      has_space=`$ECHO "$complete" | $GREP " "`
37719      if test "x$has_space" != x; then
37720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37722      fi
37723      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37724    fi
37725  fi
37726
37727  # Now new_path has a complete unix path to the binary
37728  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37729    # Keep paths in /bin as-is, but remove trailing .exe if any
37730    new_path="${new_path/%.exe/}"
37731    # Do not save /bin paths to all_fixpath_prefixes!
37732  else
37733    # Not in mixed or Windows style, start by that.
37734    new_path=`cmd //c echo $new_path`
37735
37736  input_path="$new_path"
37737  # Check if we need to convert this using DOS-style short mode. If the path
37738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37739  # take no chances and rewrite it.
37740  # Note: m4 eats our [], so we need to use [ and ] instead.
37741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37742  if test "x$has_forbidden_chars" != x; then
37743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37745  fi
37746
37747    # Output is in $new_path
37748
37749  windows_path="$new_path"
37750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37751    unix_path=`$CYGPATH -u "$windows_path"`
37752    new_path="$unix_path"
37753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37755    new_path="$unix_path"
37756  fi
37757
37758    # remove trailing .exe if any
37759    new_path="${new_path/%.exe/}"
37760
37761    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37762    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37763  fi
37764
37765    else
37766      # We're on a unix platform. Hooray! :)
37767      # First separate the path from the arguments. This will split at the first
37768      # space.
37769      complete="$AS"
37770      path="${complete%% *}"
37771      tmp="$complete EOL"
37772      arguments="${tmp#* }"
37773
37774      # Cannot rely on the command "which" here since it doesn't always work.
37775      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37776      if test -z "$is_absolute_path"; then
37777        # Path to executable is not absolute. Find it.
37778        IFS_save="$IFS"
37779        IFS=:
37780        for p in $PATH; do
37781          if test -f "$p/$path" && test -x "$p/$path"; then
37782            new_path="$p/$path"
37783            break
37784          fi
37785        done
37786        IFS="$IFS_save"
37787      else
37788        # This is an absolute path, we can use it without further modifications.
37789        new_path="$path"
37790      fi
37791
37792      if test "x$new_path" = x; then
37793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37794$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37795        has_space=`$ECHO "$complete" | $GREP " "`
37796        if test "x$has_space" != x; then
37797          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37798$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37799        fi
37800        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37801      fi
37802    fi
37803
37804    # Now join together the path and the arguments once again
37805    if test "x$arguments" != xEOL; then
37806      new_complete="$new_path ${arguments% *}"
37807    else
37808      new_complete="$new_path"
37809    fi
37810
37811    if test "x$complete" != "x$new_complete"; then
37812      AS="$new_complete"
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37814$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37815    fi
37816  fi
37817
37818    if test "x$AS" = x; then
37819      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37820    fi
37821  else
37822    # FIXME: is this correct for microsoft?
37823    AS="$CC -c"
37824  fi
37825
37826
37827  #
37828  # Setup the archiver (AR)
37829  #
37830  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37831    # The corresponding ar tool is lib.exe (used to create static libraries)
37832    # Extract the first word of "lib", so it can be a program name with args.
37833set dummy lib; ac_word=$2
37834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37835$as_echo_n "checking for $ac_word... " >&6; }
37836if ${ac_cv_prog_AR+:} false; then :
37837  $as_echo_n "(cached) " >&6
37838else
37839  if test -n "$AR"; then
37840  ac_cv_prog_AR="$AR" # Let the user override the test.
37841else
37842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37843for as_dir in $PATH
37844do
37845  IFS=$as_save_IFS
37846  test -z "$as_dir" && as_dir=.
37847    for ac_exec_ext in '' $ac_executable_extensions; do
37848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37849    ac_cv_prog_AR="lib"
37850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37851    break 2
37852  fi
37853done
37854  done
37855IFS=$as_save_IFS
37856
37857fi
37858fi
37859AR=$ac_cv_prog_AR
37860if test -n "$AR"; then
37861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37862$as_echo "$AR" >&6; }
37863else
37864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37865$as_echo "no" >&6; }
37866fi
37867
37868
37869  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37870
37871
37872  # Publish this variable in the help.
37873
37874
37875  if [ -z "${AR+x}" ]; then
37876    # The variable is not set by user, try to locate tool using the code snippet
37877    if test -n "$ac_tool_prefix"; then
37878  for ac_prog in ar gcc-ar
37879  do
37880    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37881set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37883$as_echo_n "checking for $ac_word... " >&6; }
37884if ${ac_cv_prog_AR+:} false; then :
37885  $as_echo_n "(cached) " >&6
37886else
37887  if test -n "$AR"; then
37888  ac_cv_prog_AR="$AR" # Let the user override the test.
37889else
37890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37891for as_dir in $PATH
37892do
37893  IFS=$as_save_IFS
37894  test -z "$as_dir" && as_dir=.
37895    for ac_exec_ext in '' $ac_executable_extensions; do
37896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37897    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37899    break 2
37900  fi
37901done
37902  done
37903IFS=$as_save_IFS
37904
37905fi
37906fi
37907AR=$ac_cv_prog_AR
37908if test -n "$AR"; then
37909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37910$as_echo "$AR" >&6; }
37911else
37912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37913$as_echo "no" >&6; }
37914fi
37915
37916
37917    test -n "$AR" && break
37918  done
37919fi
37920if test -z "$AR"; then
37921  ac_ct_AR=$AR
37922  for ac_prog in ar gcc-ar
37923do
37924  # Extract the first word of "$ac_prog", so it can be a program name with args.
37925set dummy $ac_prog; ac_word=$2
37926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37927$as_echo_n "checking for $ac_word... " >&6; }
37928if ${ac_cv_prog_ac_ct_AR+:} false; then :
37929  $as_echo_n "(cached) " >&6
37930else
37931  if test -n "$ac_ct_AR"; then
37932  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37933else
37934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37935for as_dir in $PATH
37936do
37937  IFS=$as_save_IFS
37938  test -z "$as_dir" && as_dir=.
37939    for ac_exec_ext in '' $ac_executable_extensions; do
37940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37941    ac_cv_prog_ac_ct_AR="$ac_prog"
37942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37943    break 2
37944  fi
37945done
37946  done
37947IFS=$as_save_IFS
37948
37949fi
37950fi
37951ac_ct_AR=$ac_cv_prog_ac_ct_AR
37952if test -n "$ac_ct_AR"; then
37953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37954$as_echo "$ac_ct_AR" >&6; }
37955else
37956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37957$as_echo "no" >&6; }
37958fi
37959
37960
37961  test -n "$ac_ct_AR" && break
37962done
37963
37964  if test "x$ac_ct_AR" = x; then
37965    AR=""
37966  else
37967    case $cross_compiling:$ac_tool_warned in
37968yes:)
37969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37971ac_tool_warned=yes ;;
37972esac
37973    AR=$ac_ct_AR
37974  fi
37975fi
37976
37977  else
37978    # The variable is set, but is it from the command line or the environment?
37979
37980    # Try to remove the string !AR! from our list.
37981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37983      # If it failed, the variable was not from the command line. Ignore it,
37984      # but warn the user (except for BASH, which is always set by the calling BASH).
37985      if test "xAR" != xBASH; then
37986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37987$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37988      fi
37989      # Try to locate tool using the code snippet
37990      if test -n "$ac_tool_prefix"; then
37991  for ac_prog in ar gcc-ar
37992  do
37993    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37994set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37996$as_echo_n "checking for $ac_word... " >&6; }
37997if ${ac_cv_prog_AR+:} false; then :
37998  $as_echo_n "(cached) " >&6
37999else
38000  if test -n "$AR"; then
38001  ac_cv_prog_AR="$AR" # Let the user override the test.
38002else
38003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38004for as_dir in $PATH
38005do
38006  IFS=$as_save_IFS
38007  test -z "$as_dir" && as_dir=.
38008    for ac_exec_ext in '' $ac_executable_extensions; do
38009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38010    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38012    break 2
38013  fi
38014done
38015  done
38016IFS=$as_save_IFS
38017
38018fi
38019fi
38020AR=$ac_cv_prog_AR
38021if test -n "$AR"; then
38022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38023$as_echo "$AR" >&6; }
38024else
38025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38026$as_echo "no" >&6; }
38027fi
38028
38029
38030    test -n "$AR" && break
38031  done
38032fi
38033if test -z "$AR"; then
38034  ac_ct_AR=$AR
38035  for ac_prog in ar gcc-ar
38036do
38037  # Extract the first word of "$ac_prog", so it can be a program name with args.
38038set dummy $ac_prog; ac_word=$2
38039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38040$as_echo_n "checking for $ac_word... " >&6; }
38041if ${ac_cv_prog_ac_ct_AR+:} false; then :
38042  $as_echo_n "(cached) " >&6
38043else
38044  if test -n "$ac_ct_AR"; then
38045  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38046else
38047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38048for as_dir in $PATH
38049do
38050  IFS=$as_save_IFS
38051  test -z "$as_dir" && as_dir=.
38052    for ac_exec_ext in '' $ac_executable_extensions; do
38053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38054    ac_cv_prog_ac_ct_AR="$ac_prog"
38055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38056    break 2
38057  fi
38058done
38059  done
38060IFS=$as_save_IFS
38061
38062fi
38063fi
38064ac_ct_AR=$ac_cv_prog_ac_ct_AR
38065if test -n "$ac_ct_AR"; then
38066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38067$as_echo "$ac_ct_AR" >&6; }
38068else
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38070$as_echo "no" >&6; }
38071fi
38072
38073
38074  test -n "$ac_ct_AR" && break
38075done
38076
38077  if test "x$ac_ct_AR" = x; then
38078    AR=""
38079  else
38080    case $cross_compiling:$ac_tool_warned in
38081yes:)
38082{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38083$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38084ac_tool_warned=yes ;;
38085esac
38086    AR=$ac_ct_AR
38087  fi
38088fi
38089
38090    else
38091      # If it succeeded, then it was overridden by the user. We will use it
38092      # for the tool.
38093
38094      # First remove it from the list of overridden variables, so we can test
38095      # for unknown variables in the end.
38096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38097
38098      # Check if we try to supply an empty value
38099      if test "x$AR" = x; then
38100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38101$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38103$as_echo_n "checking for AR... " >&6; }
38104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38105$as_echo "disabled" >&6; }
38106      else
38107        # Check if the provided tool contains a complete path.
38108        tool_specified="$AR"
38109        tool_basename="${tool_specified##*/}"
38110        if test "x$tool_basename" = "x$tool_specified"; then
38111          # A command without a complete path is provided, search $PATH.
38112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38113$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38114          # Extract the first word of "$tool_basename", so it can be a program name with args.
38115set dummy $tool_basename; ac_word=$2
38116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38117$as_echo_n "checking for $ac_word... " >&6; }
38118if ${ac_cv_path_AR+:} false; then :
38119  $as_echo_n "(cached) " >&6
38120else
38121  case $AR in
38122  [\\/]* | ?:[\\/]*)
38123  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38124  ;;
38125  *)
38126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38127for as_dir in $PATH
38128do
38129  IFS=$as_save_IFS
38130  test -z "$as_dir" && as_dir=.
38131    for ac_exec_ext in '' $ac_executable_extensions; do
38132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38133    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38135    break 2
38136  fi
38137done
38138  done
38139IFS=$as_save_IFS
38140
38141  ;;
38142esac
38143fi
38144AR=$ac_cv_path_AR
38145if test -n "$AR"; then
38146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38147$as_echo "$AR" >&6; }
38148else
38149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38150$as_echo "no" >&6; }
38151fi
38152
38153
38154          if test "x$AR" = x; then
38155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38156          fi
38157        else
38158          # Otherwise we believe it is a complete path. Use it as it is.
38159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38160$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38162$as_echo_n "checking for AR... " >&6; }
38163          if test ! -x "$tool_specified"; then
38164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38165$as_echo "not found" >&6; }
38166            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38167          fi
38168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38169$as_echo "$tool_specified" >&6; }
38170        fi
38171      fi
38172    fi
38173
38174  fi
38175
38176
38177  else
38178
38179
38180  # Publish this variable in the help.
38181
38182
38183  if [ -z "${AR+x}" ]; then
38184    # The variable is not set by user, try to locate tool using the code snippet
38185    if test -n "$ac_tool_prefix"; then
38186  for ac_prog in ar
38187  do
38188    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38189set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38191$as_echo_n "checking for $ac_word... " >&6; }
38192if ${ac_cv_prog_AR+:} false; then :
38193  $as_echo_n "(cached) " >&6
38194else
38195  if test -n "$AR"; then
38196  ac_cv_prog_AR="$AR" # Let the user override the test.
38197else
38198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38199for as_dir in $PATH
38200do
38201  IFS=$as_save_IFS
38202  test -z "$as_dir" && as_dir=.
38203    for ac_exec_ext in '' $ac_executable_extensions; do
38204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38205    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38207    break 2
38208  fi
38209done
38210  done
38211IFS=$as_save_IFS
38212
38213fi
38214fi
38215AR=$ac_cv_prog_AR
38216if test -n "$AR"; then
38217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38218$as_echo "$AR" >&6; }
38219else
38220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38221$as_echo "no" >&6; }
38222fi
38223
38224
38225    test -n "$AR" && break
38226  done
38227fi
38228if test -z "$AR"; then
38229  ac_ct_AR=$AR
38230  for ac_prog in ar
38231do
38232  # Extract the first word of "$ac_prog", so it can be a program name with args.
38233set dummy $ac_prog; ac_word=$2
38234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38235$as_echo_n "checking for $ac_word... " >&6; }
38236if ${ac_cv_prog_ac_ct_AR+:} false; then :
38237  $as_echo_n "(cached) " >&6
38238else
38239  if test -n "$ac_ct_AR"; then
38240  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38241else
38242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38243for as_dir in $PATH
38244do
38245  IFS=$as_save_IFS
38246  test -z "$as_dir" && as_dir=.
38247    for ac_exec_ext in '' $ac_executable_extensions; do
38248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38249    ac_cv_prog_ac_ct_AR="$ac_prog"
38250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38251    break 2
38252  fi
38253done
38254  done
38255IFS=$as_save_IFS
38256
38257fi
38258fi
38259ac_ct_AR=$ac_cv_prog_ac_ct_AR
38260if test -n "$ac_ct_AR"; then
38261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38262$as_echo "$ac_ct_AR" >&6; }
38263else
38264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38265$as_echo "no" >&6; }
38266fi
38267
38268
38269  test -n "$ac_ct_AR" && break
38270done
38271
38272  if test "x$ac_ct_AR" = x; then
38273    AR=""
38274  else
38275    case $cross_compiling:$ac_tool_warned in
38276yes:)
38277{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38278$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38279ac_tool_warned=yes ;;
38280esac
38281    AR=$ac_ct_AR
38282  fi
38283fi
38284
38285  else
38286    # The variable is set, but is it from the command line or the environment?
38287
38288    # Try to remove the string !AR! from our list.
38289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38291      # If it failed, the variable was not from the command line. Ignore it,
38292      # but warn the user (except for BASH, which is always set by the calling BASH).
38293      if test "xAR" != xBASH; then
38294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38295$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38296      fi
38297      # Try to locate tool using the code snippet
38298      if test -n "$ac_tool_prefix"; then
38299  for ac_prog in ar
38300  do
38301    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38302set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38304$as_echo_n "checking for $ac_word... " >&6; }
38305if ${ac_cv_prog_AR+:} false; then :
38306  $as_echo_n "(cached) " >&6
38307else
38308  if test -n "$AR"; then
38309  ac_cv_prog_AR="$AR" # Let the user override the test.
38310else
38311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38312for as_dir in $PATH
38313do
38314  IFS=$as_save_IFS
38315  test -z "$as_dir" && as_dir=.
38316    for ac_exec_ext in '' $ac_executable_extensions; do
38317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38318    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38320    break 2
38321  fi
38322done
38323  done
38324IFS=$as_save_IFS
38325
38326fi
38327fi
38328AR=$ac_cv_prog_AR
38329if test -n "$AR"; then
38330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38331$as_echo "$AR" >&6; }
38332else
38333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38334$as_echo "no" >&6; }
38335fi
38336
38337
38338    test -n "$AR" && break
38339  done
38340fi
38341if test -z "$AR"; then
38342  ac_ct_AR=$AR
38343  for ac_prog in ar
38344do
38345  # Extract the first word of "$ac_prog", so it can be a program name with args.
38346set dummy $ac_prog; ac_word=$2
38347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38348$as_echo_n "checking for $ac_word... " >&6; }
38349if ${ac_cv_prog_ac_ct_AR+:} false; then :
38350  $as_echo_n "(cached) " >&6
38351else
38352  if test -n "$ac_ct_AR"; then
38353  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38354else
38355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38356for as_dir in $PATH
38357do
38358  IFS=$as_save_IFS
38359  test -z "$as_dir" && as_dir=.
38360    for ac_exec_ext in '' $ac_executable_extensions; do
38361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38362    ac_cv_prog_ac_ct_AR="$ac_prog"
38363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38364    break 2
38365  fi
38366done
38367  done
38368IFS=$as_save_IFS
38369
38370fi
38371fi
38372ac_ct_AR=$ac_cv_prog_ac_ct_AR
38373if test -n "$ac_ct_AR"; then
38374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38375$as_echo "$ac_ct_AR" >&6; }
38376else
38377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38378$as_echo "no" >&6; }
38379fi
38380
38381
38382  test -n "$ac_ct_AR" && break
38383done
38384
38385  if test "x$ac_ct_AR" = x; then
38386    AR=""
38387  else
38388    case $cross_compiling:$ac_tool_warned in
38389yes:)
38390{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38391$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38392ac_tool_warned=yes ;;
38393esac
38394    AR=$ac_ct_AR
38395  fi
38396fi
38397
38398    else
38399      # If it succeeded, then it was overridden by the user. We will use it
38400      # for the tool.
38401
38402      # First remove it from the list of overridden variables, so we can test
38403      # for unknown variables in the end.
38404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38405
38406      # Check if we try to supply an empty value
38407      if test "x$AR" = x; then
38408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38409$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38411$as_echo_n "checking for AR... " >&6; }
38412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38413$as_echo "disabled" >&6; }
38414      else
38415        # Check if the provided tool contains a complete path.
38416        tool_specified="$AR"
38417        tool_basename="${tool_specified##*/}"
38418        if test "x$tool_basename" = "x$tool_specified"; then
38419          # A command without a complete path is provided, search $PATH.
38420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38421$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38422          # Extract the first word of "$tool_basename", so it can be a program name with args.
38423set dummy $tool_basename; ac_word=$2
38424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38425$as_echo_n "checking for $ac_word... " >&6; }
38426if ${ac_cv_path_AR+:} false; then :
38427  $as_echo_n "(cached) " >&6
38428else
38429  case $AR in
38430  [\\/]* | ?:[\\/]*)
38431  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38432  ;;
38433  *)
38434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38435for as_dir in $PATH
38436do
38437  IFS=$as_save_IFS
38438  test -z "$as_dir" && as_dir=.
38439    for ac_exec_ext in '' $ac_executable_extensions; do
38440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38441    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38443    break 2
38444  fi
38445done
38446  done
38447IFS=$as_save_IFS
38448
38449  ;;
38450esac
38451fi
38452AR=$ac_cv_path_AR
38453if test -n "$AR"; then
38454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38455$as_echo "$AR" >&6; }
38456else
38457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38458$as_echo "no" >&6; }
38459fi
38460
38461
38462          if test "x$AR" = x; then
38463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38464          fi
38465        else
38466          # Otherwise we believe it is a complete path. Use it as it is.
38467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38468$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38470$as_echo_n "checking for AR... " >&6; }
38471          if test ! -x "$tool_specified"; then
38472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38473$as_echo "not found" >&6; }
38474            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38475          fi
38476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38477$as_echo "$tool_specified" >&6; }
38478        fi
38479      fi
38480    fi
38481
38482  fi
38483
38484
38485  fi
38486
38487  # Only process if variable expands to non-empty
38488
38489  if test "x$AR" != x; then
38490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38491
38492  # First separate the path from the arguments. This will split at the first
38493  # space.
38494  complete="$AR"
38495  path="${complete%% *}"
38496  tmp="$complete EOL"
38497  arguments="${tmp#* }"
38498
38499  # Input might be given as Windows format, start by converting to
38500  # unix format.
38501  new_path=`$CYGPATH -u "$path"`
38502
38503  # Now try to locate executable using which
38504  new_path=`$WHICH "$new_path" 2> /dev/null`
38505  # bat and cmd files are not always considered executable in cygwin causing which
38506  # to not find them
38507  if test "x$new_path" = x \
38508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38510    new_path=`$CYGPATH -u "$path"`
38511  fi
38512  if test "x$new_path" = x; then
38513    # Oops. Which didn't find the executable.
38514    # The splitting of arguments from the executable at a space might have been incorrect,
38515    # since paths with space are more likely in Windows. Give it another try with the whole
38516    # argument.
38517    path="$complete"
38518    arguments="EOL"
38519    new_path=`$CYGPATH -u "$path"`
38520    new_path=`$WHICH "$new_path" 2> /dev/null`
38521    # bat and cmd files are not always considered executable in cygwin causing which
38522    # to not find them
38523    if test "x$new_path" = x \
38524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38526      new_path=`$CYGPATH -u "$path"`
38527    fi
38528    if test "x$new_path" = x; then
38529      # It's still not found. Now this is an unrecoverable error.
38530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38531$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38532      has_space=`$ECHO "$complete" | $GREP " "`
38533      if test "x$has_space" != x; then
38534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38536      fi
38537      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38538    fi
38539  fi
38540
38541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38544  # "foo.exe" is OK but "foo" is an error.
38545  #
38546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38547  # It is also a way to make sure we got the proper file name for the real test later on.
38548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38549  if test "x$test_shortpath" = x; then
38550    # Short path failed, file does not exist as specified.
38551    # Try adding .exe or .cmd
38552    if test -f "${new_path}.exe"; then
38553      input_to_shortpath="${new_path}.exe"
38554    elif test -f "${new_path}.cmd"; then
38555      input_to_shortpath="${new_path}.cmd"
38556    else
38557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38558$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38561      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38562    fi
38563  else
38564    input_to_shortpath="$new_path"
38565  fi
38566
38567  # Call helper function which possibly converts this using DOS-style short mode.
38568  # If so, the updated path is stored in $new_path.
38569  new_path="$input_to_shortpath"
38570
38571  input_path="$input_to_shortpath"
38572  # Check if we need to convert this using DOS-style short mode. If the path
38573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38574  # take no chances and rewrite it.
38575  # Note: m4 eats our [], so we need to use [ and ] instead.
38576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38577  if test "x$has_forbidden_chars" != x; then
38578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38582      # Going to short mode and back again did indeed matter. Since short mode is
38583      # case insensitive, let's make it lowercase to improve readability.
38584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38585      # Now convert it back to Unix-style (cygpath)
38586      input_path=`$CYGPATH -u "$shortmode_path"`
38587      new_path="$input_path"
38588    fi
38589  fi
38590
38591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38592  if test "x$test_cygdrive_prefix" = x; then
38593    # As a simple fix, exclude /usr/bin since it's not a real path.
38594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38596      # a path prefixed by /cygdrive for fixpath to work.
38597      new_path="$CYGWIN_ROOT_PATH$input_path"
38598    fi
38599  fi
38600
38601  # remove trailing .exe if any
38602  new_path="${new_path/%.exe/}"
38603
38604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38605
38606  # First separate the path from the arguments. This will split at the first
38607  # space.
38608  complete="$AR"
38609  path="${complete%% *}"
38610  tmp="$complete EOL"
38611  arguments="${tmp#* }"
38612
38613  # Input might be given as Windows format, start by converting to
38614  # unix format.
38615  new_path="$path"
38616
38617  windows_path="$new_path"
38618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38619    unix_path=`$CYGPATH -u "$windows_path"`
38620    new_path="$unix_path"
38621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38623    new_path="$unix_path"
38624  fi
38625
38626
38627  # Now try to locate executable using which
38628  new_path=`$WHICH "$new_path" 2> /dev/null`
38629
38630  if test "x$new_path" = x; then
38631    # Oops. Which didn't find the executable.
38632    # The splitting of arguments from the executable at a space might have been incorrect,
38633    # since paths with space are more likely in Windows. Give it another try with the whole
38634    # argument.
38635    path="$complete"
38636    arguments="EOL"
38637    new_path="$path"
38638
38639  windows_path="$new_path"
38640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38641    unix_path=`$CYGPATH -u "$windows_path"`
38642    new_path="$unix_path"
38643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38645    new_path="$unix_path"
38646  fi
38647
38648
38649    new_path=`$WHICH "$new_path" 2> /dev/null`
38650    # bat and cmd files are not always considered executable in MSYS causing which
38651    # to not find them
38652    if test "x$new_path" = x \
38653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38655      new_path="$path"
38656
38657  windows_path="$new_path"
38658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38659    unix_path=`$CYGPATH -u "$windows_path"`
38660    new_path="$unix_path"
38661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38663    new_path="$unix_path"
38664  fi
38665
38666    fi
38667
38668    if test "x$new_path" = x; then
38669      # It's still not found. Now this is an unrecoverable error.
38670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38671$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38672      has_space=`$ECHO "$complete" | $GREP " "`
38673      if test "x$has_space" != x; then
38674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38676      fi
38677      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38678    fi
38679  fi
38680
38681  # Now new_path has a complete unix path to the binary
38682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38683    # Keep paths in /bin as-is, but remove trailing .exe if any
38684    new_path="${new_path/%.exe/}"
38685    # Do not save /bin paths to all_fixpath_prefixes!
38686  else
38687    # Not in mixed or Windows style, start by that.
38688    new_path=`cmd //c echo $new_path`
38689
38690  input_path="$new_path"
38691  # Check if we need to convert this using DOS-style short mode. If the path
38692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38693  # take no chances and rewrite it.
38694  # Note: m4 eats our [], so we need to use [ and ] instead.
38695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38696  if test "x$has_forbidden_chars" != x; then
38697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38699  fi
38700
38701    # Output is in $new_path
38702
38703  windows_path="$new_path"
38704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38705    unix_path=`$CYGPATH -u "$windows_path"`
38706    new_path="$unix_path"
38707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38709    new_path="$unix_path"
38710  fi
38711
38712    # remove trailing .exe if any
38713    new_path="${new_path/%.exe/}"
38714
38715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38717  fi
38718
38719    else
38720      # We're on a unix platform. Hooray! :)
38721      # First separate the path from the arguments. This will split at the first
38722      # space.
38723      complete="$AR"
38724      path="${complete%% *}"
38725      tmp="$complete EOL"
38726      arguments="${tmp#* }"
38727
38728      # Cannot rely on the command "which" here since it doesn't always work.
38729      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38730      if test -z "$is_absolute_path"; then
38731        # Path to executable is not absolute. Find it.
38732        IFS_save="$IFS"
38733        IFS=:
38734        for p in $PATH; do
38735          if test -f "$p/$path" && test -x "$p/$path"; then
38736            new_path="$p/$path"
38737            break
38738          fi
38739        done
38740        IFS="$IFS_save"
38741      else
38742        # This is an absolute path, we can use it without further modifications.
38743        new_path="$path"
38744      fi
38745
38746      if test "x$new_path" = x; then
38747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38748$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38749        has_space=`$ECHO "$complete" | $GREP " "`
38750        if test "x$has_space" != x; then
38751          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38752$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38753        fi
38754        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38755      fi
38756    fi
38757
38758    # Now join together the path and the arguments once again
38759    if test "x$arguments" != xEOL; then
38760      new_complete="$new_path ${arguments% *}"
38761    else
38762      new_complete="$new_path"
38763    fi
38764
38765    if test "x$complete" != "x$new_complete"; then
38766      AR="$new_complete"
38767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38768$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38769    fi
38770  fi
38771
38772
38773
38774  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38775
38776
38777  # Publish this variable in the help.
38778
38779
38780  if [ -z "${LIPO+x}" ]; then
38781    # The variable is not set by user, try to locate tool using the code snippet
38782    for ac_prog in lipo
38783do
38784  # Extract the first word of "$ac_prog", so it can be a program name with args.
38785set dummy $ac_prog; ac_word=$2
38786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38787$as_echo_n "checking for $ac_word... " >&6; }
38788if ${ac_cv_path_LIPO+:} false; then :
38789  $as_echo_n "(cached) " >&6
38790else
38791  case $LIPO in
38792  [\\/]* | ?:[\\/]*)
38793  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38794  ;;
38795  *)
38796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38797for as_dir in $PATH
38798do
38799  IFS=$as_save_IFS
38800  test -z "$as_dir" && as_dir=.
38801    for ac_exec_ext in '' $ac_executable_extensions; do
38802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38803    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38805    break 2
38806  fi
38807done
38808  done
38809IFS=$as_save_IFS
38810
38811  ;;
38812esac
38813fi
38814LIPO=$ac_cv_path_LIPO
38815if test -n "$LIPO"; then
38816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38817$as_echo "$LIPO" >&6; }
38818else
38819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38820$as_echo "no" >&6; }
38821fi
38822
38823
38824  test -n "$LIPO" && break
38825done
38826
38827  else
38828    # The variable is set, but is it from the command line or the environment?
38829
38830    # Try to remove the string !LIPO! from our list.
38831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38833      # If it failed, the variable was not from the command line. Ignore it,
38834      # but warn the user (except for BASH, which is always set by the calling BASH).
38835      if test "xLIPO" != xBASH; then
38836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38837$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38838      fi
38839      # Try to locate tool using the code snippet
38840      for ac_prog in lipo
38841do
38842  # Extract the first word of "$ac_prog", so it can be a program name with args.
38843set dummy $ac_prog; ac_word=$2
38844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38845$as_echo_n "checking for $ac_word... " >&6; }
38846if ${ac_cv_path_LIPO+:} false; then :
38847  $as_echo_n "(cached) " >&6
38848else
38849  case $LIPO in
38850  [\\/]* | ?:[\\/]*)
38851  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38852  ;;
38853  *)
38854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38855for as_dir in $PATH
38856do
38857  IFS=$as_save_IFS
38858  test -z "$as_dir" && as_dir=.
38859    for ac_exec_ext in '' $ac_executable_extensions; do
38860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38861    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38863    break 2
38864  fi
38865done
38866  done
38867IFS=$as_save_IFS
38868
38869  ;;
38870esac
38871fi
38872LIPO=$ac_cv_path_LIPO
38873if test -n "$LIPO"; then
38874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38875$as_echo "$LIPO" >&6; }
38876else
38877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38878$as_echo "no" >&6; }
38879fi
38880
38881
38882  test -n "$LIPO" && break
38883done
38884
38885    else
38886      # If it succeeded, then it was overridden by the user. We will use it
38887      # for the tool.
38888
38889      # First remove it from the list of overridden variables, so we can test
38890      # for unknown variables in the end.
38891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38892
38893      # Check if we try to supply an empty value
38894      if test "x$LIPO" = x; then
38895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38896$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38898$as_echo_n "checking for LIPO... " >&6; }
38899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38900$as_echo "disabled" >&6; }
38901      else
38902        # Check if the provided tool contains a complete path.
38903        tool_specified="$LIPO"
38904        tool_basename="${tool_specified##*/}"
38905        if test "x$tool_basename" = "x$tool_specified"; then
38906          # A command without a complete path is provided, search $PATH.
38907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38908$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38909          # Extract the first word of "$tool_basename", so it can be a program name with args.
38910set dummy $tool_basename; ac_word=$2
38911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38912$as_echo_n "checking for $ac_word... " >&6; }
38913if ${ac_cv_path_LIPO+:} false; then :
38914  $as_echo_n "(cached) " >&6
38915else
38916  case $LIPO in
38917  [\\/]* | ?:[\\/]*)
38918  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38919  ;;
38920  *)
38921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38922for as_dir in $PATH
38923do
38924  IFS=$as_save_IFS
38925  test -z "$as_dir" && as_dir=.
38926    for ac_exec_ext in '' $ac_executable_extensions; do
38927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38928    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38930    break 2
38931  fi
38932done
38933  done
38934IFS=$as_save_IFS
38935
38936  ;;
38937esac
38938fi
38939LIPO=$ac_cv_path_LIPO
38940if test -n "$LIPO"; then
38941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38942$as_echo "$LIPO" >&6; }
38943else
38944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38945$as_echo "no" >&6; }
38946fi
38947
38948
38949          if test "x$LIPO" = x; then
38950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38951          fi
38952        else
38953          # Otherwise we believe it is a complete path. Use it as it is.
38954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38955$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38957$as_echo_n "checking for LIPO... " >&6; }
38958          if test ! -x "$tool_specified"; then
38959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38960$as_echo "not found" >&6; }
38961            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38962          fi
38963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38964$as_echo "$tool_specified" >&6; }
38965        fi
38966      fi
38967    fi
38968
38969  fi
38970
38971
38972
38973  # Only process if variable expands to non-empty
38974
38975  if test "x$LIPO" != x; then
38976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38977
38978  # First separate the path from the arguments. This will split at the first
38979  # space.
38980  complete="$LIPO"
38981  path="${complete%% *}"
38982  tmp="$complete EOL"
38983  arguments="${tmp#* }"
38984
38985  # Input might be given as Windows format, start by converting to
38986  # unix format.
38987  new_path=`$CYGPATH -u "$path"`
38988
38989  # Now try to locate executable using which
38990  new_path=`$WHICH "$new_path" 2> /dev/null`
38991  # bat and cmd files are not always considered executable in cygwin causing which
38992  # to not find them
38993  if test "x$new_path" = x \
38994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38996    new_path=`$CYGPATH -u "$path"`
38997  fi
38998  if test "x$new_path" = x; then
38999    # Oops. Which didn't find the executable.
39000    # The splitting of arguments from the executable at a space might have been incorrect,
39001    # since paths with space are more likely in Windows. Give it another try with the whole
39002    # argument.
39003    path="$complete"
39004    arguments="EOL"
39005    new_path=`$CYGPATH -u "$path"`
39006    new_path=`$WHICH "$new_path" 2> /dev/null`
39007    # bat and cmd files are not always considered executable in cygwin causing which
39008    # to not find them
39009    if test "x$new_path" = x \
39010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39012      new_path=`$CYGPATH -u "$path"`
39013    fi
39014    if test "x$new_path" = x; then
39015      # It's still not found. Now this is an unrecoverable error.
39016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39017$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39018      has_space=`$ECHO "$complete" | $GREP " "`
39019      if test "x$has_space" != x; then
39020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39022      fi
39023      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39024    fi
39025  fi
39026
39027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39030  # "foo.exe" is OK but "foo" is an error.
39031  #
39032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39033  # It is also a way to make sure we got the proper file name for the real test later on.
39034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39035  if test "x$test_shortpath" = x; then
39036    # Short path failed, file does not exist as specified.
39037    # Try adding .exe or .cmd
39038    if test -f "${new_path}.exe"; then
39039      input_to_shortpath="${new_path}.exe"
39040    elif test -f "${new_path}.cmd"; then
39041      input_to_shortpath="${new_path}.cmd"
39042    else
39043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39044$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39047      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39048    fi
39049  else
39050    input_to_shortpath="$new_path"
39051  fi
39052
39053  # Call helper function which possibly converts this using DOS-style short mode.
39054  # If so, the updated path is stored in $new_path.
39055  new_path="$input_to_shortpath"
39056
39057  input_path="$input_to_shortpath"
39058  # Check if we need to convert this using DOS-style short mode. If the path
39059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39060  # take no chances and rewrite it.
39061  # Note: m4 eats our [], so we need to use [ and ] instead.
39062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39063  if test "x$has_forbidden_chars" != x; then
39064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39068      # Going to short mode and back again did indeed matter. Since short mode is
39069      # case insensitive, let's make it lowercase to improve readability.
39070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39071      # Now convert it back to Unix-style (cygpath)
39072      input_path=`$CYGPATH -u "$shortmode_path"`
39073      new_path="$input_path"
39074    fi
39075  fi
39076
39077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39078  if test "x$test_cygdrive_prefix" = x; then
39079    # As a simple fix, exclude /usr/bin since it's not a real path.
39080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39082      # a path prefixed by /cygdrive for fixpath to work.
39083      new_path="$CYGWIN_ROOT_PATH$input_path"
39084    fi
39085  fi
39086
39087  # remove trailing .exe if any
39088  new_path="${new_path/%.exe/}"
39089
39090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39091
39092  # First separate the path from the arguments. This will split at the first
39093  # space.
39094  complete="$LIPO"
39095  path="${complete%% *}"
39096  tmp="$complete EOL"
39097  arguments="${tmp#* }"
39098
39099  # Input might be given as Windows format, start by converting to
39100  # unix format.
39101  new_path="$path"
39102
39103  windows_path="$new_path"
39104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39105    unix_path=`$CYGPATH -u "$windows_path"`
39106    new_path="$unix_path"
39107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39109    new_path="$unix_path"
39110  fi
39111
39112
39113  # Now try to locate executable using which
39114  new_path=`$WHICH "$new_path" 2> /dev/null`
39115
39116  if test "x$new_path" = x; then
39117    # Oops. Which didn't find the executable.
39118    # The splitting of arguments from the executable at a space might have been incorrect,
39119    # since paths with space are more likely in Windows. Give it another try with the whole
39120    # argument.
39121    path="$complete"
39122    arguments="EOL"
39123    new_path="$path"
39124
39125  windows_path="$new_path"
39126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39127    unix_path=`$CYGPATH -u "$windows_path"`
39128    new_path="$unix_path"
39129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39131    new_path="$unix_path"
39132  fi
39133
39134
39135    new_path=`$WHICH "$new_path" 2> /dev/null`
39136    # bat and cmd files are not always considered executable in MSYS causing which
39137    # to not find them
39138    if test "x$new_path" = x \
39139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39141      new_path="$path"
39142
39143  windows_path="$new_path"
39144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39145    unix_path=`$CYGPATH -u "$windows_path"`
39146    new_path="$unix_path"
39147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39149    new_path="$unix_path"
39150  fi
39151
39152    fi
39153
39154    if test "x$new_path" = x; then
39155      # It's still not found. Now this is an unrecoverable error.
39156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39157$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39158      has_space=`$ECHO "$complete" | $GREP " "`
39159      if test "x$has_space" != x; then
39160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39162      fi
39163      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39164    fi
39165  fi
39166
39167  # Now new_path has a complete unix path to the binary
39168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39169    # Keep paths in /bin as-is, but remove trailing .exe if any
39170    new_path="${new_path/%.exe/}"
39171    # Do not save /bin paths to all_fixpath_prefixes!
39172  else
39173    # Not in mixed or Windows style, start by that.
39174    new_path=`cmd //c echo $new_path`
39175
39176  input_path="$new_path"
39177  # Check if we need to convert this using DOS-style short mode. If the path
39178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39179  # take no chances and rewrite it.
39180  # Note: m4 eats our [], so we need to use [ and ] instead.
39181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39182  if test "x$has_forbidden_chars" != x; then
39183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39185  fi
39186
39187    # Output is in $new_path
39188
39189  windows_path="$new_path"
39190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39191    unix_path=`$CYGPATH -u "$windows_path"`
39192    new_path="$unix_path"
39193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39195    new_path="$unix_path"
39196  fi
39197
39198    # remove trailing .exe if any
39199    new_path="${new_path/%.exe/}"
39200
39201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39203  fi
39204
39205    else
39206      # We're on a unix platform. Hooray! :)
39207      # First separate the path from the arguments. This will split at the first
39208      # space.
39209      complete="$LIPO"
39210      path="${complete%% *}"
39211      tmp="$complete EOL"
39212      arguments="${tmp#* }"
39213
39214      # Cannot rely on the command "which" here since it doesn't always work.
39215      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39216      if test -z "$is_absolute_path"; then
39217        # Path to executable is not absolute. Find it.
39218        IFS_save="$IFS"
39219        IFS=:
39220        for p in $PATH; do
39221          if test -f "$p/$path" && test -x "$p/$path"; then
39222            new_path="$p/$path"
39223            break
39224          fi
39225        done
39226        IFS="$IFS_save"
39227      else
39228        # This is an absolute path, we can use it without further modifications.
39229        new_path="$path"
39230      fi
39231
39232      if test "x$new_path" = x; then
39233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39234$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39235        has_space=`$ECHO "$complete" | $GREP " "`
39236        if test "x$has_space" != x; then
39237          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39239        fi
39240        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39241      fi
39242    fi
39243
39244    # Now join together the path and the arguments once again
39245    if test "x$arguments" != xEOL; then
39246      new_complete="$new_path ${arguments% *}"
39247    else
39248      new_complete="$new_path"
39249    fi
39250
39251    if test "x$complete" != "x$new_complete"; then
39252      LIPO="$new_complete"
39253      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39254$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39255    fi
39256  fi
39257
39258  fi
39259
39260  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39261    # Extract the first word of "mt", so it can be a program name with args.
39262set dummy mt; ac_word=$2
39263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39264$as_echo_n "checking for $ac_word... " >&6; }
39265if ${ac_cv_prog_MT+:} false; then :
39266  $as_echo_n "(cached) " >&6
39267else
39268  if test -n "$MT"; then
39269  ac_cv_prog_MT="$MT" # Let the user override the test.
39270else
39271  ac_prog_rejected=no
39272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39273for as_dir in $PATH
39274do
39275  IFS=$as_save_IFS
39276  test -z "$as_dir" && as_dir=.
39277    for ac_exec_ext in '' $ac_executable_extensions; do
39278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39279    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39280       ac_prog_rejected=yes
39281       continue
39282     fi
39283    ac_cv_prog_MT="mt"
39284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39285    break 2
39286  fi
39287done
39288  done
39289IFS=$as_save_IFS
39290
39291if test $ac_prog_rejected = yes; then
39292  # We found a bogon in the path, so make sure we never use it.
39293  set dummy $ac_cv_prog_MT
39294  shift
39295  if test $# != 0; then
39296    # We chose a different compiler from the bogus one.
39297    # However, it has the same basename, so the bogon will be chosen
39298    # first if we set MT to just the basename; use the full file name.
39299    shift
39300    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39301  fi
39302fi
39303fi
39304fi
39305MT=$ac_cv_prog_MT
39306if test -n "$MT"; then
39307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39308$as_echo "$MT" >&6; }
39309else
39310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39311$as_echo "no" >&6; }
39312fi
39313
39314
39315
39316  # Only process if variable expands to non-empty
39317
39318  if test "x$MT" != x; then
39319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39320
39321  # First separate the path from the arguments. This will split at the first
39322  # space.
39323  complete="$MT"
39324  path="${complete%% *}"
39325  tmp="$complete EOL"
39326  arguments="${tmp#* }"
39327
39328  # Input might be given as Windows format, start by converting to
39329  # unix format.
39330  new_path=`$CYGPATH -u "$path"`
39331
39332  # Now try to locate executable using which
39333  new_path=`$WHICH "$new_path" 2> /dev/null`
39334  # bat and cmd files are not always considered executable in cygwin causing which
39335  # to not find them
39336  if test "x$new_path" = x \
39337      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39338      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39339    new_path=`$CYGPATH -u "$path"`
39340  fi
39341  if test "x$new_path" = x; then
39342    # Oops. Which didn't find the executable.
39343    # The splitting of arguments from the executable at a space might have been incorrect,
39344    # since paths with space are more likely in Windows. Give it another try with the whole
39345    # argument.
39346    path="$complete"
39347    arguments="EOL"
39348    new_path=`$CYGPATH -u "$path"`
39349    new_path=`$WHICH "$new_path" 2> /dev/null`
39350    # bat and cmd files are not always considered executable in cygwin causing which
39351    # to not find them
39352    if test "x$new_path" = x \
39353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39355      new_path=`$CYGPATH -u "$path"`
39356    fi
39357    if test "x$new_path" = x; then
39358      # It's still not found. Now this is an unrecoverable error.
39359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39360$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39361      has_space=`$ECHO "$complete" | $GREP " "`
39362      if test "x$has_space" != x; then
39363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39365      fi
39366      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39367    fi
39368  fi
39369
39370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39373  # "foo.exe" is OK but "foo" is an error.
39374  #
39375  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39376  # It is also a way to make sure we got the proper file name for the real test later on.
39377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39378  if test "x$test_shortpath" = x; then
39379    # Short path failed, file does not exist as specified.
39380    # Try adding .exe or .cmd
39381    if test -f "${new_path}.exe"; then
39382      input_to_shortpath="${new_path}.exe"
39383    elif test -f "${new_path}.cmd"; then
39384      input_to_shortpath="${new_path}.cmd"
39385    else
39386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39387$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39388      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39390      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39391    fi
39392  else
39393    input_to_shortpath="$new_path"
39394  fi
39395
39396  # Call helper function which possibly converts this using DOS-style short mode.
39397  # If so, the updated path is stored in $new_path.
39398  new_path="$input_to_shortpath"
39399
39400  input_path="$input_to_shortpath"
39401  # Check if we need to convert this using DOS-style short mode. If the path
39402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39403  # take no chances and rewrite it.
39404  # Note: m4 eats our [], so we need to use [ and ] instead.
39405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39406  if test "x$has_forbidden_chars" != x; then
39407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39411      # Going to short mode and back again did indeed matter. Since short mode is
39412      # case insensitive, let's make it lowercase to improve readability.
39413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39414      # Now convert it back to Unix-style (cygpath)
39415      input_path=`$CYGPATH -u "$shortmode_path"`
39416      new_path="$input_path"
39417    fi
39418  fi
39419
39420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39421  if test "x$test_cygdrive_prefix" = x; then
39422    # As a simple fix, exclude /usr/bin since it's not a real path.
39423    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39425      # a path prefixed by /cygdrive for fixpath to work.
39426      new_path="$CYGWIN_ROOT_PATH$input_path"
39427    fi
39428  fi
39429
39430  # remove trailing .exe if any
39431  new_path="${new_path/%.exe/}"
39432
39433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39434
39435  # First separate the path from the arguments. This will split at the first
39436  # space.
39437  complete="$MT"
39438  path="${complete%% *}"
39439  tmp="$complete EOL"
39440  arguments="${tmp#* }"
39441
39442  # Input might be given as Windows format, start by converting to
39443  # unix format.
39444  new_path="$path"
39445
39446  windows_path="$new_path"
39447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39448    unix_path=`$CYGPATH -u "$windows_path"`
39449    new_path="$unix_path"
39450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39452    new_path="$unix_path"
39453  fi
39454
39455
39456  # Now try to locate executable using which
39457  new_path=`$WHICH "$new_path" 2> /dev/null`
39458
39459  if test "x$new_path" = x; then
39460    # Oops. Which didn't find the executable.
39461    # The splitting of arguments from the executable at a space might have been incorrect,
39462    # since paths with space are more likely in Windows. Give it another try with the whole
39463    # argument.
39464    path="$complete"
39465    arguments="EOL"
39466    new_path="$path"
39467
39468  windows_path="$new_path"
39469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39470    unix_path=`$CYGPATH -u "$windows_path"`
39471    new_path="$unix_path"
39472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39474    new_path="$unix_path"
39475  fi
39476
39477
39478    new_path=`$WHICH "$new_path" 2> /dev/null`
39479    # bat and cmd files are not always considered executable in MSYS causing which
39480    # to not find them
39481    if test "x$new_path" = x \
39482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39484      new_path="$path"
39485
39486  windows_path="$new_path"
39487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39488    unix_path=`$CYGPATH -u "$windows_path"`
39489    new_path="$unix_path"
39490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39492    new_path="$unix_path"
39493  fi
39494
39495    fi
39496
39497    if test "x$new_path" = x; then
39498      # It's still not found. Now this is an unrecoverable error.
39499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39500$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39501      has_space=`$ECHO "$complete" | $GREP " "`
39502      if test "x$has_space" != x; then
39503        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39504$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39505      fi
39506      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39507    fi
39508  fi
39509
39510  # Now new_path has a complete unix path to the binary
39511  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39512    # Keep paths in /bin as-is, but remove trailing .exe if any
39513    new_path="${new_path/%.exe/}"
39514    # Do not save /bin paths to all_fixpath_prefixes!
39515  else
39516    # Not in mixed or Windows style, start by that.
39517    new_path=`cmd //c echo $new_path`
39518
39519  input_path="$new_path"
39520  # Check if we need to convert this using DOS-style short mode. If the path
39521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39522  # take no chances and rewrite it.
39523  # Note: m4 eats our [], so we need to use [ and ] instead.
39524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39525  if test "x$has_forbidden_chars" != x; then
39526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39528  fi
39529
39530    # Output is in $new_path
39531
39532  windows_path="$new_path"
39533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39534    unix_path=`$CYGPATH -u "$windows_path"`
39535    new_path="$unix_path"
39536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39538    new_path="$unix_path"
39539  fi
39540
39541    # remove trailing .exe if any
39542    new_path="${new_path/%.exe/}"
39543
39544    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39545    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39546  fi
39547
39548    else
39549      # We're on a unix platform. Hooray! :)
39550      # First separate the path from the arguments. This will split at the first
39551      # space.
39552      complete="$MT"
39553      path="${complete%% *}"
39554      tmp="$complete EOL"
39555      arguments="${tmp#* }"
39556
39557      # Cannot rely on the command "which" here since it doesn't always work.
39558      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39559      if test -z "$is_absolute_path"; then
39560        # Path to executable is not absolute. Find it.
39561        IFS_save="$IFS"
39562        IFS=:
39563        for p in $PATH; do
39564          if test -f "$p/$path" && test -x "$p/$path"; then
39565            new_path="$p/$path"
39566            break
39567          fi
39568        done
39569        IFS="$IFS_save"
39570      else
39571        # This is an absolute path, we can use it without further modifications.
39572        new_path="$path"
39573      fi
39574
39575      if test "x$new_path" = x; then
39576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39577$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39578        has_space=`$ECHO "$complete" | $GREP " "`
39579        if test "x$has_space" != x; then
39580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39582        fi
39583        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39584      fi
39585    fi
39586
39587    # Now join together the path and the arguments once again
39588    if test "x$arguments" != xEOL; then
39589      new_complete="$new_path ${arguments% *}"
39590    else
39591      new_complete="$new_path"
39592    fi
39593
39594    if test "x$complete" != "x$new_complete"; then
39595      MT="$new_complete"
39596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39597$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39598    fi
39599  fi
39600
39601    # Setup the resource compiler (RC)
39602    # Extract the first word of "rc", so it can be a program name with args.
39603set dummy rc; ac_word=$2
39604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39605$as_echo_n "checking for $ac_word... " >&6; }
39606if ${ac_cv_prog_RC+:} false; then :
39607  $as_echo_n "(cached) " >&6
39608else
39609  if test -n "$RC"; then
39610  ac_cv_prog_RC="$RC" # Let the user override the test.
39611else
39612  ac_prog_rejected=no
39613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39614for as_dir in $PATH
39615do
39616  IFS=$as_save_IFS
39617  test -z "$as_dir" && as_dir=.
39618    for ac_exec_ext in '' $ac_executable_extensions; do
39619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39620    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39621       ac_prog_rejected=yes
39622       continue
39623     fi
39624    ac_cv_prog_RC="rc"
39625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39626    break 2
39627  fi
39628done
39629  done
39630IFS=$as_save_IFS
39631
39632if test $ac_prog_rejected = yes; then
39633  # We found a bogon in the path, so make sure we never use it.
39634  set dummy $ac_cv_prog_RC
39635  shift
39636  if test $# != 0; then
39637    # We chose a different compiler from the bogus one.
39638    # However, it has the same basename, so the bogon will be chosen
39639    # first if we set RC to just the basename; use the full file name.
39640    shift
39641    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39642  fi
39643fi
39644fi
39645fi
39646RC=$ac_cv_prog_RC
39647if test -n "$RC"; then
39648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39649$as_echo "$RC" >&6; }
39650else
39651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39652$as_echo "no" >&6; }
39653fi
39654
39655
39656
39657  # Only process if variable expands to non-empty
39658
39659  if test "x$RC" != x; then
39660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39661
39662  # First separate the path from the arguments. This will split at the first
39663  # space.
39664  complete="$RC"
39665  path="${complete%% *}"
39666  tmp="$complete EOL"
39667  arguments="${tmp#* }"
39668
39669  # Input might be given as Windows format, start by converting to
39670  # unix format.
39671  new_path=`$CYGPATH -u "$path"`
39672
39673  # Now try to locate executable using which
39674  new_path=`$WHICH "$new_path" 2> /dev/null`
39675  # bat and cmd files are not always considered executable in cygwin causing which
39676  # to not find them
39677  if test "x$new_path" = x \
39678      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39679      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39680    new_path=`$CYGPATH -u "$path"`
39681  fi
39682  if test "x$new_path" = x; then
39683    # Oops. Which didn't find the executable.
39684    # The splitting of arguments from the executable at a space might have been incorrect,
39685    # since paths with space are more likely in Windows. Give it another try with the whole
39686    # argument.
39687    path="$complete"
39688    arguments="EOL"
39689    new_path=`$CYGPATH -u "$path"`
39690    new_path=`$WHICH "$new_path" 2> /dev/null`
39691    # bat and cmd files are not always considered executable in cygwin causing which
39692    # to not find them
39693    if test "x$new_path" = x \
39694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39696      new_path=`$CYGPATH -u "$path"`
39697    fi
39698    if test "x$new_path" = x; then
39699      # It's still not found. Now this is an unrecoverable error.
39700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39701$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39702      has_space=`$ECHO "$complete" | $GREP " "`
39703      if test "x$has_space" != x; then
39704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39706      fi
39707      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39708    fi
39709  fi
39710
39711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39714  # "foo.exe" is OK but "foo" is an error.
39715  #
39716  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39717  # It is also a way to make sure we got the proper file name for the real test later on.
39718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39719  if test "x$test_shortpath" = x; then
39720    # Short path failed, file does not exist as specified.
39721    # Try adding .exe or .cmd
39722    if test -f "${new_path}.exe"; then
39723      input_to_shortpath="${new_path}.exe"
39724    elif test -f "${new_path}.cmd"; then
39725      input_to_shortpath="${new_path}.cmd"
39726    else
39727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39728$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39729      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39730$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39731      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39732    fi
39733  else
39734    input_to_shortpath="$new_path"
39735  fi
39736
39737  # Call helper function which possibly converts this using DOS-style short mode.
39738  # If so, the updated path is stored in $new_path.
39739  new_path="$input_to_shortpath"
39740
39741  input_path="$input_to_shortpath"
39742  # Check if we need to convert this using DOS-style short mode. If the path
39743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39744  # take no chances and rewrite it.
39745  # Note: m4 eats our [], so we need to use [ and ] instead.
39746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39747  if test "x$has_forbidden_chars" != x; then
39748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39752      # Going to short mode and back again did indeed matter. Since short mode is
39753      # case insensitive, let's make it lowercase to improve readability.
39754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39755      # Now convert it back to Unix-style (cygpath)
39756      input_path=`$CYGPATH -u "$shortmode_path"`
39757      new_path="$input_path"
39758    fi
39759  fi
39760
39761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39762  if test "x$test_cygdrive_prefix" = x; then
39763    # As a simple fix, exclude /usr/bin since it's not a real path.
39764    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39766      # a path prefixed by /cygdrive for fixpath to work.
39767      new_path="$CYGWIN_ROOT_PATH$input_path"
39768    fi
39769  fi
39770
39771  # remove trailing .exe if any
39772  new_path="${new_path/%.exe/}"
39773
39774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39775
39776  # First separate the path from the arguments. This will split at the first
39777  # space.
39778  complete="$RC"
39779  path="${complete%% *}"
39780  tmp="$complete EOL"
39781  arguments="${tmp#* }"
39782
39783  # Input might be given as Windows format, start by converting to
39784  # unix format.
39785  new_path="$path"
39786
39787  windows_path="$new_path"
39788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39789    unix_path=`$CYGPATH -u "$windows_path"`
39790    new_path="$unix_path"
39791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39793    new_path="$unix_path"
39794  fi
39795
39796
39797  # Now try to locate executable using which
39798  new_path=`$WHICH "$new_path" 2> /dev/null`
39799
39800  if test "x$new_path" = x; then
39801    # Oops. Which didn't find the executable.
39802    # The splitting of arguments from the executable at a space might have been incorrect,
39803    # since paths with space are more likely in Windows. Give it another try with the whole
39804    # argument.
39805    path="$complete"
39806    arguments="EOL"
39807    new_path="$path"
39808
39809  windows_path="$new_path"
39810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39811    unix_path=`$CYGPATH -u "$windows_path"`
39812    new_path="$unix_path"
39813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39815    new_path="$unix_path"
39816  fi
39817
39818
39819    new_path=`$WHICH "$new_path" 2> /dev/null`
39820    # bat and cmd files are not always considered executable in MSYS causing which
39821    # to not find them
39822    if test "x$new_path" = x \
39823        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39824        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39825      new_path="$path"
39826
39827  windows_path="$new_path"
39828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39829    unix_path=`$CYGPATH -u "$windows_path"`
39830    new_path="$unix_path"
39831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39833    new_path="$unix_path"
39834  fi
39835
39836    fi
39837
39838    if test "x$new_path" = x; then
39839      # It's still not found. Now this is an unrecoverable error.
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39841$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39842      has_space=`$ECHO "$complete" | $GREP " "`
39843      if test "x$has_space" != x; then
39844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39846      fi
39847      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39848    fi
39849  fi
39850
39851  # Now new_path has a complete unix path to the binary
39852  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39853    # Keep paths in /bin as-is, but remove trailing .exe if any
39854    new_path="${new_path/%.exe/}"
39855    # Do not save /bin paths to all_fixpath_prefixes!
39856  else
39857    # Not in mixed or Windows style, start by that.
39858    new_path=`cmd //c echo $new_path`
39859
39860  input_path="$new_path"
39861  # Check if we need to convert this using DOS-style short mode. If the path
39862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39863  # take no chances and rewrite it.
39864  # Note: m4 eats our [], so we need to use [ and ] instead.
39865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39866  if test "x$has_forbidden_chars" != x; then
39867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39869  fi
39870
39871    # Output is in $new_path
39872
39873  windows_path="$new_path"
39874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39875    unix_path=`$CYGPATH -u "$windows_path"`
39876    new_path="$unix_path"
39877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39879    new_path="$unix_path"
39880  fi
39881
39882    # remove trailing .exe if any
39883    new_path="${new_path/%.exe/}"
39884
39885    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39886    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39887  fi
39888
39889    else
39890      # We're on a unix platform. Hooray! :)
39891      # First separate the path from the arguments. This will split at the first
39892      # space.
39893      complete="$RC"
39894      path="${complete%% *}"
39895      tmp="$complete EOL"
39896      arguments="${tmp#* }"
39897
39898      # Cannot rely on the command "which" here since it doesn't always work.
39899      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39900      if test -z "$is_absolute_path"; then
39901        # Path to executable is not absolute. Find it.
39902        IFS_save="$IFS"
39903        IFS=:
39904        for p in $PATH; do
39905          if test -f "$p/$path" && test -x "$p/$path"; then
39906            new_path="$p/$path"
39907            break
39908          fi
39909        done
39910        IFS="$IFS_save"
39911      else
39912        # This is an absolute path, we can use it without further modifications.
39913        new_path="$path"
39914      fi
39915
39916      if test "x$new_path" = x; then
39917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39918$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39919        has_space=`$ECHO "$complete" | $GREP " "`
39920        if test "x$has_space" != x; then
39921          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39922$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39923        fi
39924        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39925      fi
39926    fi
39927
39928    # Now join together the path and the arguments once again
39929    if test "x$arguments" != xEOL; then
39930      new_complete="$new_path ${arguments% *}"
39931    else
39932      new_complete="$new_path"
39933    fi
39934
39935    if test "x$complete" != "x$new_complete"; then
39936      RC="$new_complete"
39937      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39938$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39939    fi
39940  fi
39941
39942    # Extract the first word of "dumpbin", so it can be a program name with args.
39943set dummy dumpbin; ac_word=$2
39944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39945$as_echo_n "checking for $ac_word... " >&6; }
39946if ${ac_cv_prog_DUMPBIN+:} false; then :
39947  $as_echo_n "(cached) " >&6
39948else
39949  if test -n "$DUMPBIN"; then
39950  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39951else
39952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39953for as_dir in $PATH
39954do
39955  IFS=$as_save_IFS
39956  test -z "$as_dir" && as_dir=.
39957    for ac_exec_ext in '' $ac_executable_extensions; do
39958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39959    ac_cv_prog_DUMPBIN="dumpbin"
39960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39961    break 2
39962  fi
39963done
39964  done
39965IFS=$as_save_IFS
39966
39967fi
39968fi
39969DUMPBIN=$ac_cv_prog_DUMPBIN
39970if test -n "$DUMPBIN"; then
39971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39972$as_echo "$DUMPBIN" >&6; }
39973else
39974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39975$as_echo "no" >&6; }
39976fi
39977
39978
39979
39980  # Only process if variable expands to non-empty
39981
39982  if test "x$DUMPBIN" != x; then
39983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39984
39985  # First separate the path from the arguments. This will split at the first
39986  # space.
39987  complete="$DUMPBIN"
39988  path="${complete%% *}"
39989  tmp="$complete EOL"
39990  arguments="${tmp#* }"
39991
39992  # Input might be given as Windows format, start by converting to
39993  # unix format.
39994  new_path=`$CYGPATH -u "$path"`
39995
39996  # Now try to locate executable using which
39997  new_path=`$WHICH "$new_path" 2> /dev/null`
39998  # bat and cmd files are not always considered executable in cygwin causing which
39999  # to not find them
40000  if test "x$new_path" = x \
40001      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40002      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40003    new_path=`$CYGPATH -u "$path"`
40004  fi
40005  if test "x$new_path" = x; then
40006    # Oops. Which didn't find the executable.
40007    # The splitting of arguments from the executable at a space might have been incorrect,
40008    # since paths with space are more likely in Windows. Give it another try with the whole
40009    # argument.
40010    path="$complete"
40011    arguments="EOL"
40012    new_path=`$CYGPATH -u "$path"`
40013    new_path=`$WHICH "$new_path" 2> /dev/null`
40014    # bat and cmd files are not always considered executable in cygwin causing which
40015    # to not find them
40016    if test "x$new_path" = x \
40017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40019      new_path=`$CYGPATH -u "$path"`
40020    fi
40021    if test "x$new_path" = x; then
40022      # It's still not found. Now this is an unrecoverable error.
40023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40024$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40025      has_space=`$ECHO "$complete" | $GREP " "`
40026      if test "x$has_space" != x; then
40027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40029      fi
40030      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40031    fi
40032  fi
40033
40034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40037  # "foo.exe" is OK but "foo" is an error.
40038  #
40039  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40040  # It is also a way to make sure we got the proper file name for the real test later on.
40041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40042  if test "x$test_shortpath" = x; then
40043    # Short path failed, file does not exist as specified.
40044    # Try adding .exe or .cmd
40045    if test -f "${new_path}.exe"; then
40046      input_to_shortpath="${new_path}.exe"
40047    elif test -f "${new_path}.cmd"; then
40048      input_to_shortpath="${new_path}.cmd"
40049    else
40050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40051$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40054      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40055    fi
40056  else
40057    input_to_shortpath="$new_path"
40058  fi
40059
40060  # Call helper function which possibly converts this using DOS-style short mode.
40061  # If so, the updated path is stored in $new_path.
40062  new_path="$input_to_shortpath"
40063
40064  input_path="$input_to_shortpath"
40065  # Check if we need to convert this using DOS-style short mode. If the path
40066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40067  # take no chances and rewrite it.
40068  # Note: m4 eats our [], so we need to use [ and ] instead.
40069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40070  if test "x$has_forbidden_chars" != x; then
40071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40075      # Going to short mode and back again did indeed matter. Since short mode is
40076      # case insensitive, let's make it lowercase to improve readability.
40077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40078      # Now convert it back to Unix-style (cygpath)
40079      input_path=`$CYGPATH -u "$shortmode_path"`
40080      new_path="$input_path"
40081    fi
40082  fi
40083
40084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40085  if test "x$test_cygdrive_prefix" = x; then
40086    # As a simple fix, exclude /usr/bin since it's not a real path.
40087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40089      # a path prefixed by /cygdrive for fixpath to work.
40090      new_path="$CYGWIN_ROOT_PATH$input_path"
40091    fi
40092  fi
40093
40094  # remove trailing .exe if any
40095  new_path="${new_path/%.exe/}"
40096
40097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40098
40099  # First separate the path from the arguments. This will split at the first
40100  # space.
40101  complete="$DUMPBIN"
40102  path="${complete%% *}"
40103  tmp="$complete EOL"
40104  arguments="${tmp#* }"
40105
40106  # Input might be given as Windows format, start by converting to
40107  # unix format.
40108  new_path="$path"
40109
40110  windows_path="$new_path"
40111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40112    unix_path=`$CYGPATH -u "$windows_path"`
40113    new_path="$unix_path"
40114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40116    new_path="$unix_path"
40117  fi
40118
40119
40120  # Now try to locate executable using which
40121  new_path=`$WHICH "$new_path" 2> /dev/null`
40122
40123  if test "x$new_path" = x; then
40124    # Oops. Which didn't find the executable.
40125    # The splitting of arguments from the executable at a space might have been incorrect,
40126    # since paths with space are more likely in Windows. Give it another try with the whole
40127    # argument.
40128    path="$complete"
40129    arguments="EOL"
40130    new_path="$path"
40131
40132  windows_path="$new_path"
40133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40134    unix_path=`$CYGPATH -u "$windows_path"`
40135    new_path="$unix_path"
40136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40138    new_path="$unix_path"
40139  fi
40140
40141
40142    new_path=`$WHICH "$new_path" 2> /dev/null`
40143    # bat and cmd files are not always considered executable in MSYS causing which
40144    # to not find them
40145    if test "x$new_path" = x \
40146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40148      new_path="$path"
40149
40150  windows_path="$new_path"
40151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40152    unix_path=`$CYGPATH -u "$windows_path"`
40153    new_path="$unix_path"
40154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40156    new_path="$unix_path"
40157  fi
40158
40159    fi
40160
40161    if test "x$new_path" = x; then
40162      # It's still not found. Now this is an unrecoverable error.
40163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40164$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40165      has_space=`$ECHO "$complete" | $GREP " "`
40166      if test "x$has_space" != x; then
40167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40169      fi
40170      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40171    fi
40172  fi
40173
40174  # Now new_path has a complete unix path to the binary
40175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40176    # Keep paths in /bin as-is, but remove trailing .exe if any
40177    new_path="${new_path/%.exe/}"
40178    # Do not save /bin paths to all_fixpath_prefixes!
40179  else
40180    # Not in mixed or Windows style, start by that.
40181    new_path=`cmd //c echo $new_path`
40182
40183  input_path="$new_path"
40184  # Check if we need to convert this using DOS-style short mode. If the path
40185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40186  # take no chances and rewrite it.
40187  # Note: m4 eats our [], so we need to use [ and ] instead.
40188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40189  if test "x$has_forbidden_chars" != x; then
40190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40192  fi
40193
40194    # Output is in $new_path
40195
40196  windows_path="$new_path"
40197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40198    unix_path=`$CYGPATH -u "$windows_path"`
40199    new_path="$unix_path"
40200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40202    new_path="$unix_path"
40203  fi
40204
40205    # remove trailing .exe if any
40206    new_path="${new_path/%.exe/}"
40207
40208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40210  fi
40211
40212    else
40213      # We're on a unix platform. Hooray! :)
40214      # First separate the path from the arguments. This will split at the first
40215      # space.
40216      complete="$DUMPBIN"
40217      path="${complete%% *}"
40218      tmp="$complete EOL"
40219      arguments="${tmp#* }"
40220
40221      # Cannot rely on the command "which" here since it doesn't always work.
40222      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40223      if test -z "$is_absolute_path"; then
40224        # Path to executable is not absolute. Find it.
40225        IFS_save="$IFS"
40226        IFS=:
40227        for p in $PATH; do
40228          if test -f "$p/$path" && test -x "$p/$path"; then
40229            new_path="$p/$path"
40230            break
40231          fi
40232        done
40233        IFS="$IFS_save"
40234      else
40235        # This is an absolute path, we can use it without further modifications.
40236        new_path="$path"
40237      fi
40238
40239      if test "x$new_path" = x; then
40240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40241$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40242        has_space=`$ECHO "$complete" | $GREP " "`
40243        if test "x$has_space" != x; then
40244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40246        fi
40247        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40248      fi
40249    fi
40250
40251    # Now join together the path and the arguments once again
40252    if test "x$arguments" != xEOL; then
40253      new_complete="$new_path ${arguments% *}"
40254    else
40255      new_complete="$new_path"
40256    fi
40257
40258    if test "x$complete" != "x$new_complete"; then
40259      DUMPBIN="$new_complete"
40260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40261$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40262    fi
40263  fi
40264
40265    # We need to check for 'msbuild.exe' because at the place where we expect to
40266    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40267    # won't find the 'msbuild.exe' executable in that case (and the
40268    # 'ac_executable_extensions' is unusable due to performance reasons).
40269    # Notice that we intentionally don't fix up the path to MSBUILD because we
40270    # will call it in a DOS shell during freetype detection on Windows (see
40271    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40272    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40273set dummy msbuild.exe; ac_word=$2
40274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40275$as_echo_n "checking for $ac_word... " >&6; }
40276if ${ac_cv_prog_MSBUILD+:} false; then :
40277  $as_echo_n "(cached) " >&6
40278else
40279  if test -n "$MSBUILD"; then
40280  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40281else
40282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40283for as_dir in $PATH
40284do
40285  IFS=$as_save_IFS
40286  test -z "$as_dir" && as_dir=.
40287    for ac_exec_ext in '' $ac_executable_extensions; do
40288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40289    ac_cv_prog_MSBUILD="msbuild.exe"
40290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40291    break 2
40292  fi
40293done
40294  done
40295IFS=$as_save_IFS
40296
40297fi
40298fi
40299MSBUILD=$ac_cv_prog_MSBUILD
40300if test -n "$MSBUILD"; then
40301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40302$as_echo "$MSBUILD" >&6; }
40303else
40304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40305$as_echo "no" >&6; }
40306fi
40307
40308
40309  fi
40310
40311  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40312
40313
40314  # Publish this variable in the help.
40315
40316
40317  if [ -z "${STRIP+x}" ]; then
40318    # The variable is not set by user, try to locate tool using the code snippet
40319    for ac_prog in strip
40320do
40321  # Extract the first word of "$ac_prog", so it can be a program name with args.
40322set dummy $ac_prog; ac_word=$2
40323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40324$as_echo_n "checking for $ac_word... " >&6; }
40325if ${ac_cv_path_STRIP+:} false; then :
40326  $as_echo_n "(cached) " >&6
40327else
40328  case $STRIP in
40329  [\\/]* | ?:[\\/]*)
40330  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40331  ;;
40332  *)
40333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40334for as_dir in $PATH
40335do
40336  IFS=$as_save_IFS
40337  test -z "$as_dir" && as_dir=.
40338    for ac_exec_ext in '' $ac_executable_extensions; do
40339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40340    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40342    break 2
40343  fi
40344done
40345  done
40346IFS=$as_save_IFS
40347
40348  ;;
40349esac
40350fi
40351STRIP=$ac_cv_path_STRIP
40352if test -n "$STRIP"; then
40353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40354$as_echo "$STRIP" >&6; }
40355else
40356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40357$as_echo "no" >&6; }
40358fi
40359
40360
40361  test -n "$STRIP" && break
40362done
40363
40364  else
40365    # The variable is set, but is it from the command line or the environment?
40366
40367    # Try to remove the string !STRIP! from our list.
40368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40370      # If it failed, the variable was not from the command line. Ignore it,
40371      # but warn the user (except for BASH, which is always set by the calling BASH).
40372      if test "xSTRIP" != xBASH; then
40373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40374$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40375      fi
40376      # Try to locate tool using the code snippet
40377      for ac_prog in strip
40378do
40379  # Extract the first word of "$ac_prog", so it can be a program name with args.
40380set dummy $ac_prog; ac_word=$2
40381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40382$as_echo_n "checking for $ac_word... " >&6; }
40383if ${ac_cv_path_STRIP+:} false; then :
40384  $as_echo_n "(cached) " >&6
40385else
40386  case $STRIP in
40387  [\\/]* | ?:[\\/]*)
40388  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40389  ;;
40390  *)
40391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40392for as_dir in $PATH
40393do
40394  IFS=$as_save_IFS
40395  test -z "$as_dir" && as_dir=.
40396    for ac_exec_ext in '' $ac_executable_extensions; do
40397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40398    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40400    break 2
40401  fi
40402done
40403  done
40404IFS=$as_save_IFS
40405
40406  ;;
40407esac
40408fi
40409STRIP=$ac_cv_path_STRIP
40410if test -n "$STRIP"; then
40411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40412$as_echo "$STRIP" >&6; }
40413else
40414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40415$as_echo "no" >&6; }
40416fi
40417
40418
40419  test -n "$STRIP" && break
40420done
40421
40422    else
40423      # If it succeeded, then it was overridden by the user. We will use it
40424      # for the tool.
40425
40426      # First remove it from the list of overridden variables, so we can test
40427      # for unknown variables in the end.
40428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40429
40430      # Check if we try to supply an empty value
40431      if test "x$STRIP" = x; then
40432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40433$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40435$as_echo_n "checking for STRIP... " >&6; }
40436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40437$as_echo "disabled" >&6; }
40438      else
40439        # Check if the provided tool contains a complete path.
40440        tool_specified="$STRIP"
40441        tool_basename="${tool_specified##*/}"
40442        if test "x$tool_basename" = "x$tool_specified"; then
40443          # A command without a complete path is provided, search $PATH.
40444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40445$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40446          # Extract the first word of "$tool_basename", so it can be a program name with args.
40447set dummy $tool_basename; ac_word=$2
40448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40449$as_echo_n "checking for $ac_word... " >&6; }
40450if ${ac_cv_path_STRIP+:} false; then :
40451  $as_echo_n "(cached) " >&6
40452else
40453  case $STRIP in
40454  [\\/]* | ?:[\\/]*)
40455  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40456  ;;
40457  *)
40458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40459for as_dir in $PATH
40460do
40461  IFS=$as_save_IFS
40462  test -z "$as_dir" && as_dir=.
40463    for ac_exec_ext in '' $ac_executable_extensions; do
40464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40465    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40467    break 2
40468  fi
40469done
40470  done
40471IFS=$as_save_IFS
40472
40473  ;;
40474esac
40475fi
40476STRIP=$ac_cv_path_STRIP
40477if test -n "$STRIP"; then
40478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40479$as_echo "$STRIP" >&6; }
40480else
40481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40482$as_echo "no" >&6; }
40483fi
40484
40485
40486          if test "x$STRIP" = x; then
40487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40488          fi
40489        else
40490          # Otherwise we believe it is a complete path. Use it as it is.
40491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40492$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40494$as_echo_n "checking for STRIP... " >&6; }
40495          if test ! -x "$tool_specified"; then
40496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40497$as_echo "not found" >&6; }
40498            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40499          fi
40500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40501$as_echo "$tool_specified" >&6; }
40502        fi
40503      fi
40504    fi
40505
40506  fi
40507
40508
40509
40510  # Only process if variable expands to non-empty
40511
40512  if test "x$STRIP" != x; then
40513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40514
40515  # First separate the path from the arguments. This will split at the first
40516  # space.
40517  complete="$STRIP"
40518  path="${complete%% *}"
40519  tmp="$complete EOL"
40520  arguments="${tmp#* }"
40521
40522  # Input might be given as Windows format, start by converting to
40523  # unix format.
40524  new_path=`$CYGPATH -u "$path"`
40525
40526  # Now try to locate executable using which
40527  new_path=`$WHICH "$new_path" 2> /dev/null`
40528  # bat and cmd files are not always considered executable in cygwin causing which
40529  # to not find them
40530  if test "x$new_path" = x \
40531      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40532      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40533    new_path=`$CYGPATH -u "$path"`
40534  fi
40535  if test "x$new_path" = x; then
40536    # Oops. Which didn't find the executable.
40537    # The splitting of arguments from the executable at a space might have been incorrect,
40538    # since paths with space are more likely in Windows. Give it another try with the whole
40539    # argument.
40540    path="$complete"
40541    arguments="EOL"
40542    new_path=`$CYGPATH -u "$path"`
40543    new_path=`$WHICH "$new_path" 2> /dev/null`
40544    # bat and cmd files are not always considered executable in cygwin causing which
40545    # to not find them
40546    if test "x$new_path" = x \
40547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40549      new_path=`$CYGPATH -u "$path"`
40550    fi
40551    if test "x$new_path" = x; then
40552      # It's still not found. Now this is an unrecoverable error.
40553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40554$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40555      has_space=`$ECHO "$complete" | $GREP " "`
40556      if test "x$has_space" != x; then
40557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40559      fi
40560      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40561    fi
40562  fi
40563
40564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40567  # "foo.exe" is OK but "foo" is an error.
40568  #
40569  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40570  # It is also a way to make sure we got the proper file name for the real test later on.
40571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40572  if test "x$test_shortpath" = x; then
40573    # Short path failed, file does not exist as specified.
40574    # Try adding .exe or .cmd
40575    if test -f "${new_path}.exe"; then
40576      input_to_shortpath="${new_path}.exe"
40577    elif test -f "${new_path}.cmd"; then
40578      input_to_shortpath="${new_path}.cmd"
40579    else
40580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40581$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40582      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40583$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40584      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40585    fi
40586  else
40587    input_to_shortpath="$new_path"
40588  fi
40589
40590  # Call helper function which possibly converts this using DOS-style short mode.
40591  # If so, the updated path is stored in $new_path.
40592  new_path="$input_to_shortpath"
40593
40594  input_path="$input_to_shortpath"
40595  # Check if we need to convert this using DOS-style short mode. If the path
40596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40597  # take no chances and rewrite it.
40598  # Note: m4 eats our [], so we need to use [ and ] instead.
40599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40600  if test "x$has_forbidden_chars" != x; then
40601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40605      # Going to short mode and back again did indeed matter. Since short mode is
40606      # case insensitive, let's make it lowercase to improve readability.
40607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40608      # Now convert it back to Unix-style (cygpath)
40609      input_path=`$CYGPATH -u "$shortmode_path"`
40610      new_path="$input_path"
40611    fi
40612  fi
40613
40614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40615  if test "x$test_cygdrive_prefix" = x; then
40616    # As a simple fix, exclude /usr/bin since it's not a real path.
40617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40619      # a path prefixed by /cygdrive for fixpath to work.
40620      new_path="$CYGWIN_ROOT_PATH$input_path"
40621    fi
40622  fi
40623
40624  # remove trailing .exe if any
40625  new_path="${new_path/%.exe/}"
40626
40627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40628
40629  # First separate the path from the arguments. This will split at the first
40630  # space.
40631  complete="$STRIP"
40632  path="${complete%% *}"
40633  tmp="$complete EOL"
40634  arguments="${tmp#* }"
40635
40636  # Input might be given as Windows format, start by converting to
40637  # unix format.
40638  new_path="$path"
40639
40640  windows_path="$new_path"
40641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40642    unix_path=`$CYGPATH -u "$windows_path"`
40643    new_path="$unix_path"
40644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40646    new_path="$unix_path"
40647  fi
40648
40649
40650  # Now try to locate executable using which
40651  new_path=`$WHICH "$new_path" 2> /dev/null`
40652
40653  if test "x$new_path" = x; then
40654    # Oops. Which didn't find the executable.
40655    # The splitting of arguments from the executable at a space might have been incorrect,
40656    # since paths with space are more likely in Windows. Give it another try with the whole
40657    # argument.
40658    path="$complete"
40659    arguments="EOL"
40660    new_path="$path"
40661
40662  windows_path="$new_path"
40663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40664    unix_path=`$CYGPATH -u "$windows_path"`
40665    new_path="$unix_path"
40666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40668    new_path="$unix_path"
40669  fi
40670
40671
40672    new_path=`$WHICH "$new_path" 2> /dev/null`
40673    # bat and cmd files are not always considered executable in MSYS causing which
40674    # to not find them
40675    if test "x$new_path" = x \
40676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40678      new_path="$path"
40679
40680  windows_path="$new_path"
40681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40682    unix_path=`$CYGPATH -u "$windows_path"`
40683    new_path="$unix_path"
40684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40686    new_path="$unix_path"
40687  fi
40688
40689    fi
40690
40691    if test "x$new_path" = x; then
40692      # It's still not found. Now this is an unrecoverable error.
40693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40694$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40695      has_space=`$ECHO "$complete" | $GREP " "`
40696      if test "x$has_space" != x; then
40697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40699      fi
40700      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40701    fi
40702  fi
40703
40704  # Now new_path has a complete unix path to the binary
40705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40706    # Keep paths in /bin as-is, but remove trailing .exe if any
40707    new_path="${new_path/%.exe/}"
40708    # Do not save /bin paths to all_fixpath_prefixes!
40709  else
40710    # Not in mixed or Windows style, start by that.
40711    new_path=`cmd //c echo $new_path`
40712
40713  input_path="$new_path"
40714  # Check if we need to convert this using DOS-style short mode. If the path
40715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40716  # take no chances and rewrite it.
40717  # Note: m4 eats our [], so we need to use [ and ] instead.
40718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40719  if test "x$has_forbidden_chars" != x; then
40720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40722  fi
40723
40724    # Output is in $new_path
40725
40726  windows_path="$new_path"
40727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40728    unix_path=`$CYGPATH -u "$windows_path"`
40729    new_path="$unix_path"
40730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40732    new_path="$unix_path"
40733  fi
40734
40735    # remove trailing .exe if any
40736    new_path="${new_path/%.exe/}"
40737
40738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40740  fi
40741
40742    else
40743      # We're on a unix platform. Hooray! :)
40744      # First separate the path from the arguments. This will split at the first
40745      # space.
40746      complete="$STRIP"
40747      path="${complete%% *}"
40748      tmp="$complete EOL"
40749      arguments="${tmp#* }"
40750
40751      # Cannot rely on the command "which" here since it doesn't always work.
40752      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40753      if test -z "$is_absolute_path"; then
40754        # Path to executable is not absolute. Find it.
40755        IFS_save="$IFS"
40756        IFS=:
40757        for p in $PATH; do
40758          if test -f "$p/$path" && test -x "$p/$path"; then
40759            new_path="$p/$path"
40760            break
40761          fi
40762        done
40763        IFS="$IFS_save"
40764      else
40765        # This is an absolute path, we can use it without further modifications.
40766        new_path="$path"
40767      fi
40768
40769      if test "x$new_path" = x; then
40770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40771$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40772        has_space=`$ECHO "$complete" | $GREP " "`
40773        if test "x$has_space" != x; then
40774          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40775$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40776        fi
40777        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40778      fi
40779    fi
40780
40781    # Now join together the path and the arguments once again
40782    if test "x$arguments" != xEOL; then
40783      new_complete="$new_path ${arguments% *}"
40784    else
40785      new_complete="$new_path"
40786    fi
40787
40788    if test "x$complete" != "x$new_complete"; then
40789      STRIP="$new_complete"
40790      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40791$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40792    fi
40793  fi
40794
40795
40796
40797  # Publish this variable in the help.
40798
40799
40800  if [ -z "${NM+x}" ]; then
40801    # The variable is not set by user, try to locate tool using the code snippet
40802    for ac_prog in nm
40803do
40804  # Extract the first word of "$ac_prog", so it can be a program name with args.
40805set dummy $ac_prog; ac_word=$2
40806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40807$as_echo_n "checking for $ac_word... " >&6; }
40808if ${ac_cv_path_NM+:} false; then :
40809  $as_echo_n "(cached) " >&6
40810else
40811  case $NM in
40812  [\\/]* | ?:[\\/]*)
40813  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40814  ;;
40815  *)
40816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40817for as_dir in $PATH
40818do
40819  IFS=$as_save_IFS
40820  test -z "$as_dir" && as_dir=.
40821    for ac_exec_ext in '' $ac_executable_extensions; do
40822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40823    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40825    break 2
40826  fi
40827done
40828  done
40829IFS=$as_save_IFS
40830
40831  ;;
40832esac
40833fi
40834NM=$ac_cv_path_NM
40835if test -n "$NM"; then
40836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40837$as_echo "$NM" >&6; }
40838else
40839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40840$as_echo "no" >&6; }
40841fi
40842
40843
40844  test -n "$NM" && break
40845done
40846
40847  else
40848    # The variable is set, but is it from the command line or the environment?
40849
40850    # Try to remove the string !NM! from our list.
40851    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40852    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40853      # If it failed, the variable was not from the command line. Ignore it,
40854      # but warn the user (except for BASH, which is always set by the calling BASH).
40855      if test "xNM" != xBASH; then
40856        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40857$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40858      fi
40859      # Try to locate tool using the code snippet
40860      for ac_prog in nm
40861do
40862  # Extract the first word of "$ac_prog", so it can be a program name with args.
40863set dummy $ac_prog; ac_word=$2
40864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40865$as_echo_n "checking for $ac_word... " >&6; }
40866if ${ac_cv_path_NM+:} false; then :
40867  $as_echo_n "(cached) " >&6
40868else
40869  case $NM in
40870  [\\/]* | ?:[\\/]*)
40871  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40872  ;;
40873  *)
40874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40875for as_dir in $PATH
40876do
40877  IFS=$as_save_IFS
40878  test -z "$as_dir" && as_dir=.
40879    for ac_exec_ext in '' $ac_executable_extensions; do
40880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40881    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40883    break 2
40884  fi
40885done
40886  done
40887IFS=$as_save_IFS
40888
40889  ;;
40890esac
40891fi
40892NM=$ac_cv_path_NM
40893if test -n "$NM"; then
40894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40895$as_echo "$NM" >&6; }
40896else
40897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40898$as_echo "no" >&6; }
40899fi
40900
40901
40902  test -n "$NM" && break
40903done
40904
40905    else
40906      # If it succeeded, then it was overridden by the user. We will use it
40907      # for the tool.
40908
40909      # First remove it from the list of overridden variables, so we can test
40910      # for unknown variables in the end.
40911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40912
40913      # Check if we try to supply an empty value
40914      if test "x$NM" = x; then
40915        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40916$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40918$as_echo_n "checking for NM... " >&6; }
40919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40920$as_echo "disabled" >&6; }
40921      else
40922        # Check if the provided tool contains a complete path.
40923        tool_specified="$NM"
40924        tool_basename="${tool_specified##*/}"
40925        if test "x$tool_basename" = "x$tool_specified"; then
40926          # A command without a complete path is provided, search $PATH.
40927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40928$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40929          # Extract the first word of "$tool_basename", so it can be a program name with args.
40930set dummy $tool_basename; ac_word=$2
40931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40932$as_echo_n "checking for $ac_word... " >&6; }
40933if ${ac_cv_path_NM+:} false; then :
40934  $as_echo_n "(cached) " >&6
40935else
40936  case $NM in
40937  [\\/]* | ?:[\\/]*)
40938  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40939  ;;
40940  *)
40941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40942for as_dir in $PATH
40943do
40944  IFS=$as_save_IFS
40945  test -z "$as_dir" && as_dir=.
40946    for ac_exec_ext in '' $ac_executable_extensions; do
40947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40948    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40950    break 2
40951  fi
40952done
40953  done
40954IFS=$as_save_IFS
40955
40956  ;;
40957esac
40958fi
40959NM=$ac_cv_path_NM
40960if test -n "$NM"; then
40961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40962$as_echo "$NM" >&6; }
40963else
40964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40965$as_echo "no" >&6; }
40966fi
40967
40968
40969          if test "x$NM" = x; then
40970            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40971          fi
40972        else
40973          # Otherwise we believe it is a complete path. Use it as it is.
40974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40975$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40977$as_echo_n "checking for NM... " >&6; }
40978          if test ! -x "$tool_specified"; then
40979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40980$as_echo "not found" >&6; }
40981            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40982          fi
40983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40984$as_echo "$tool_specified" >&6; }
40985        fi
40986      fi
40987    fi
40988
40989  fi
40990
40991
40992
40993  # Only process if variable expands to non-empty
40994
40995  if test "x$NM" != x; then
40996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40997
40998  # First separate the path from the arguments. This will split at the first
40999  # space.
41000  complete="$NM"
41001  path="${complete%% *}"
41002  tmp="$complete EOL"
41003  arguments="${tmp#* }"
41004
41005  # Input might be given as Windows format, start by converting to
41006  # unix format.
41007  new_path=`$CYGPATH -u "$path"`
41008
41009  # Now try to locate executable using which
41010  new_path=`$WHICH "$new_path" 2> /dev/null`
41011  # bat and cmd files are not always considered executable in cygwin causing which
41012  # to not find them
41013  if test "x$new_path" = x \
41014      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41015      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41016    new_path=`$CYGPATH -u "$path"`
41017  fi
41018  if test "x$new_path" = x; then
41019    # Oops. Which didn't find the executable.
41020    # The splitting of arguments from the executable at a space might have been incorrect,
41021    # since paths with space are more likely in Windows. Give it another try with the whole
41022    # argument.
41023    path="$complete"
41024    arguments="EOL"
41025    new_path=`$CYGPATH -u "$path"`
41026    new_path=`$WHICH "$new_path" 2> /dev/null`
41027    # bat and cmd files are not always considered executable in cygwin causing which
41028    # to not find them
41029    if test "x$new_path" = x \
41030        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41031        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41032      new_path=`$CYGPATH -u "$path"`
41033    fi
41034    if test "x$new_path" = x; then
41035      # It's still not found. Now this is an unrecoverable error.
41036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41037$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41038      has_space=`$ECHO "$complete" | $GREP " "`
41039      if test "x$has_space" != x; then
41040        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41041$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41042      fi
41043      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41044    fi
41045  fi
41046
41047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41050  # "foo.exe" is OK but "foo" is an error.
41051  #
41052  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41053  # It is also a way to make sure we got the proper file name for the real test later on.
41054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41055  if test "x$test_shortpath" = x; then
41056    # Short path failed, file does not exist as specified.
41057    # Try adding .exe or .cmd
41058    if test -f "${new_path}.exe"; then
41059      input_to_shortpath="${new_path}.exe"
41060    elif test -f "${new_path}.cmd"; then
41061      input_to_shortpath="${new_path}.cmd"
41062    else
41063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41064$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41065      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41066$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41067      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41068    fi
41069  else
41070    input_to_shortpath="$new_path"
41071  fi
41072
41073  # Call helper function which possibly converts this using DOS-style short mode.
41074  # If so, the updated path is stored in $new_path.
41075  new_path="$input_to_shortpath"
41076
41077  input_path="$input_to_shortpath"
41078  # Check if we need to convert this using DOS-style short mode. If the path
41079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41080  # take no chances and rewrite it.
41081  # Note: m4 eats our [], so we need to use [ and ] instead.
41082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41083  if test "x$has_forbidden_chars" != x; then
41084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41088      # Going to short mode and back again did indeed matter. Since short mode is
41089      # case insensitive, let's make it lowercase to improve readability.
41090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41091      # Now convert it back to Unix-style (cygpath)
41092      input_path=`$CYGPATH -u "$shortmode_path"`
41093      new_path="$input_path"
41094    fi
41095  fi
41096
41097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41098  if test "x$test_cygdrive_prefix" = x; then
41099    # As a simple fix, exclude /usr/bin since it's not a real path.
41100    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41102      # a path prefixed by /cygdrive for fixpath to work.
41103      new_path="$CYGWIN_ROOT_PATH$input_path"
41104    fi
41105  fi
41106
41107  # remove trailing .exe if any
41108  new_path="${new_path/%.exe/}"
41109
41110    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41111
41112  # First separate the path from the arguments. This will split at the first
41113  # space.
41114  complete="$NM"
41115  path="${complete%% *}"
41116  tmp="$complete EOL"
41117  arguments="${tmp#* }"
41118
41119  # Input might be given as Windows format, start by converting to
41120  # unix format.
41121  new_path="$path"
41122
41123  windows_path="$new_path"
41124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41125    unix_path=`$CYGPATH -u "$windows_path"`
41126    new_path="$unix_path"
41127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41129    new_path="$unix_path"
41130  fi
41131
41132
41133  # Now try to locate executable using which
41134  new_path=`$WHICH "$new_path" 2> /dev/null`
41135
41136  if test "x$new_path" = x; then
41137    # Oops. Which didn't find the executable.
41138    # The splitting of arguments from the executable at a space might have been incorrect,
41139    # since paths with space are more likely in Windows. Give it another try with the whole
41140    # argument.
41141    path="$complete"
41142    arguments="EOL"
41143    new_path="$path"
41144
41145  windows_path="$new_path"
41146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41147    unix_path=`$CYGPATH -u "$windows_path"`
41148    new_path="$unix_path"
41149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41151    new_path="$unix_path"
41152  fi
41153
41154
41155    new_path=`$WHICH "$new_path" 2> /dev/null`
41156    # bat and cmd files are not always considered executable in MSYS causing which
41157    # to not find them
41158    if test "x$new_path" = x \
41159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41161      new_path="$path"
41162
41163  windows_path="$new_path"
41164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41165    unix_path=`$CYGPATH -u "$windows_path"`
41166    new_path="$unix_path"
41167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41169    new_path="$unix_path"
41170  fi
41171
41172    fi
41173
41174    if test "x$new_path" = x; then
41175      # It's still not found. Now this is an unrecoverable error.
41176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41177$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41178      has_space=`$ECHO "$complete" | $GREP " "`
41179      if test "x$has_space" != x; then
41180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41182      fi
41183      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41184    fi
41185  fi
41186
41187  # Now new_path has a complete unix path to the binary
41188  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41189    # Keep paths in /bin as-is, but remove trailing .exe if any
41190    new_path="${new_path/%.exe/}"
41191    # Do not save /bin paths to all_fixpath_prefixes!
41192  else
41193    # Not in mixed or Windows style, start by that.
41194    new_path=`cmd //c echo $new_path`
41195
41196  input_path="$new_path"
41197  # Check if we need to convert this using DOS-style short mode. If the path
41198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41199  # take no chances and rewrite it.
41200  # Note: m4 eats our [], so we need to use [ and ] instead.
41201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41202  if test "x$has_forbidden_chars" != x; then
41203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41205  fi
41206
41207    # Output is in $new_path
41208
41209  windows_path="$new_path"
41210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41211    unix_path=`$CYGPATH -u "$windows_path"`
41212    new_path="$unix_path"
41213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41215    new_path="$unix_path"
41216  fi
41217
41218    # remove trailing .exe if any
41219    new_path="${new_path/%.exe/}"
41220
41221    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41222    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41223  fi
41224
41225    else
41226      # We're on a unix platform. Hooray! :)
41227      # First separate the path from the arguments. This will split at the first
41228      # space.
41229      complete="$NM"
41230      path="${complete%% *}"
41231      tmp="$complete EOL"
41232      arguments="${tmp#* }"
41233
41234      # Cannot rely on the command "which" here since it doesn't always work.
41235      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41236      if test -z "$is_absolute_path"; then
41237        # Path to executable is not absolute. Find it.
41238        IFS_save="$IFS"
41239        IFS=:
41240        for p in $PATH; do
41241          if test -f "$p/$path" && test -x "$p/$path"; then
41242            new_path="$p/$path"
41243            break
41244          fi
41245        done
41246        IFS="$IFS_save"
41247      else
41248        # This is an absolute path, we can use it without further modifications.
41249        new_path="$path"
41250      fi
41251
41252      if test "x$new_path" = x; then
41253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41254$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41255        has_space=`$ECHO "$complete" | $GREP " "`
41256        if test "x$has_space" != x; then
41257          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41259        fi
41260        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41261      fi
41262    fi
41263
41264    # Now join together the path and the arguments once again
41265    if test "x$arguments" != xEOL; then
41266      new_complete="$new_path ${arguments% *}"
41267    else
41268      new_complete="$new_path"
41269    fi
41270
41271    if test "x$complete" != "x$new_complete"; then
41272      NM="$new_complete"
41273      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41274$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41275    fi
41276  fi
41277
41278
41279
41280  # Publish this variable in the help.
41281
41282
41283  if [ -z "${GNM+x}" ]; then
41284    # The variable is not set by user, try to locate tool using the code snippet
41285    for ac_prog in gnm
41286do
41287  # Extract the first word of "$ac_prog", so it can be a program name with args.
41288set dummy $ac_prog; ac_word=$2
41289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41290$as_echo_n "checking for $ac_word... " >&6; }
41291if ${ac_cv_path_GNM+:} false; then :
41292  $as_echo_n "(cached) " >&6
41293else
41294  case $GNM in
41295  [\\/]* | ?:[\\/]*)
41296  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41297  ;;
41298  *)
41299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41300for as_dir in $PATH
41301do
41302  IFS=$as_save_IFS
41303  test -z "$as_dir" && as_dir=.
41304    for ac_exec_ext in '' $ac_executable_extensions; do
41305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41306    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41308    break 2
41309  fi
41310done
41311  done
41312IFS=$as_save_IFS
41313
41314  ;;
41315esac
41316fi
41317GNM=$ac_cv_path_GNM
41318if test -n "$GNM"; then
41319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41320$as_echo "$GNM" >&6; }
41321else
41322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41323$as_echo "no" >&6; }
41324fi
41325
41326
41327  test -n "$GNM" && break
41328done
41329
41330  else
41331    # The variable is set, but is it from the command line or the environment?
41332
41333    # Try to remove the string !GNM! from our list.
41334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41336      # If it failed, the variable was not from the command line. Ignore it,
41337      # but warn the user (except for BASH, which is always set by the calling BASH).
41338      if test "xGNM" != xBASH; then
41339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41340$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41341      fi
41342      # Try to locate tool using the code snippet
41343      for ac_prog in gnm
41344do
41345  # Extract the first word of "$ac_prog", so it can be a program name with args.
41346set dummy $ac_prog; ac_word=$2
41347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41348$as_echo_n "checking for $ac_word... " >&6; }
41349if ${ac_cv_path_GNM+:} false; then :
41350  $as_echo_n "(cached) " >&6
41351else
41352  case $GNM in
41353  [\\/]* | ?:[\\/]*)
41354  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41355  ;;
41356  *)
41357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41358for as_dir in $PATH
41359do
41360  IFS=$as_save_IFS
41361  test -z "$as_dir" && as_dir=.
41362    for ac_exec_ext in '' $ac_executable_extensions; do
41363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41364    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41366    break 2
41367  fi
41368done
41369  done
41370IFS=$as_save_IFS
41371
41372  ;;
41373esac
41374fi
41375GNM=$ac_cv_path_GNM
41376if test -n "$GNM"; then
41377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41378$as_echo "$GNM" >&6; }
41379else
41380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41381$as_echo "no" >&6; }
41382fi
41383
41384
41385  test -n "$GNM" && break
41386done
41387
41388    else
41389      # If it succeeded, then it was overridden by the user. We will use it
41390      # for the tool.
41391
41392      # First remove it from the list of overridden variables, so we can test
41393      # for unknown variables in the end.
41394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41395
41396      # Check if we try to supply an empty value
41397      if test "x$GNM" = x; then
41398        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41399$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41401$as_echo_n "checking for GNM... " >&6; }
41402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41403$as_echo "disabled" >&6; }
41404      else
41405        # Check if the provided tool contains a complete path.
41406        tool_specified="$GNM"
41407        tool_basename="${tool_specified##*/}"
41408        if test "x$tool_basename" = "x$tool_specified"; then
41409          # A command without a complete path is provided, search $PATH.
41410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41411$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41412          # Extract the first word of "$tool_basename", so it can be a program name with args.
41413set dummy $tool_basename; ac_word=$2
41414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41415$as_echo_n "checking for $ac_word... " >&6; }
41416if ${ac_cv_path_GNM+:} false; then :
41417  $as_echo_n "(cached) " >&6
41418else
41419  case $GNM in
41420  [\\/]* | ?:[\\/]*)
41421  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41422  ;;
41423  *)
41424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41425for as_dir in $PATH
41426do
41427  IFS=$as_save_IFS
41428  test -z "$as_dir" && as_dir=.
41429    for ac_exec_ext in '' $ac_executable_extensions; do
41430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41431    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41433    break 2
41434  fi
41435done
41436  done
41437IFS=$as_save_IFS
41438
41439  ;;
41440esac
41441fi
41442GNM=$ac_cv_path_GNM
41443if test -n "$GNM"; then
41444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41445$as_echo "$GNM" >&6; }
41446else
41447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41448$as_echo "no" >&6; }
41449fi
41450
41451
41452          if test "x$GNM" = x; then
41453            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41454          fi
41455        else
41456          # Otherwise we believe it is a complete path. Use it as it is.
41457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41458$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41459          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41460$as_echo_n "checking for GNM... " >&6; }
41461          if test ! -x "$tool_specified"; then
41462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41463$as_echo "not found" >&6; }
41464            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41465          fi
41466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41467$as_echo "$tool_specified" >&6; }
41468        fi
41469      fi
41470    fi
41471
41472  fi
41473
41474
41475
41476  # Only process if variable expands to non-empty
41477
41478  if test "x$GNM" != x; then
41479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41480
41481  # First separate the path from the arguments. This will split at the first
41482  # space.
41483  complete="$GNM"
41484  path="${complete%% *}"
41485  tmp="$complete EOL"
41486  arguments="${tmp#* }"
41487
41488  # Input might be given as Windows format, start by converting to
41489  # unix format.
41490  new_path=`$CYGPATH -u "$path"`
41491
41492  # Now try to locate executable using which
41493  new_path=`$WHICH "$new_path" 2> /dev/null`
41494  # bat and cmd files are not always considered executable in cygwin causing which
41495  # to not find them
41496  if test "x$new_path" = x \
41497      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41498      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41499    new_path=`$CYGPATH -u "$path"`
41500  fi
41501  if test "x$new_path" = x; then
41502    # Oops. Which didn't find the executable.
41503    # The splitting of arguments from the executable at a space might have been incorrect,
41504    # since paths with space are more likely in Windows. Give it another try with the whole
41505    # argument.
41506    path="$complete"
41507    arguments="EOL"
41508    new_path=`$CYGPATH -u "$path"`
41509    new_path=`$WHICH "$new_path" 2> /dev/null`
41510    # bat and cmd files are not always considered executable in cygwin causing which
41511    # to not find them
41512    if test "x$new_path" = x \
41513        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41514        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41515      new_path=`$CYGPATH -u "$path"`
41516    fi
41517    if test "x$new_path" = x; then
41518      # It's still not found. Now this is an unrecoverable error.
41519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41520$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41521      has_space=`$ECHO "$complete" | $GREP " "`
41522      if test "x$has_space" != x; then
41523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41525      fi
41526      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41527    fi
41528  fi
41529
41530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41533  # "foo.exe" is OK but "foo" is an error.
41534  #
41535  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41536  # It is also a way to make sure we got the proper file name for the real test later on.
41537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41538  if test "x$test_shortpath" = x; then
41539    # Short path failed, file does not exist as specified.
41540    # Try adding .exe or .cmd
41541    if test -f "${new_path}.exe"; then
41542      input_to_shortpath="${new_path}.exe"
41543    elif test -f "${new_path}.cmd"; then
41544      input_to_shortpath="${new_path}.cmd"
41545    else
41546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41547$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41548      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41549$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41550      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41551    fi
41552  else
41553    input_to_shortpath="$new_path"
41554  fi
41555
41556  # Call helper function which possibly converts this using DOS-style short mode.
41557  # If so, the updated path is stored in $new_path.
41558  new_path="$input_to_shortpath"
41559
41560  input_path="$input_to_shortpath"
41561  # Check if we need to convert this using DOS-style short mode. If the path
41562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41563  # take no chances and rewrite it.
41564  # Note: m4 eats our [], so we need to use [ and ] instead.
41565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41566  if test "x$has_forbidden_chars" != x; then
41567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41571      # Going to short mode and back again did indeed matter. Since short mode is
41572      # case insensitive, let's make it lowercase to improve readability.
41573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41574      # Now convert it back to Unix-style (cygpath)
41575      input_path=`$CYGPATH -u "$shortmode_path"`
41576      new_path="$input_path"
41577    fi
41578  fi
41579
41580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41581  if test "x$test_cygdrive_prefix" = x; then
41582    # As a simple fix, exclude /usr/bin since it's not a real path.
41583    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41585      # a path prefixed by /cygdrive for fixpath to work.
41586      new_path="$CYGWIN_ROOT_PATH$input_path"
41587    fi
41588  fi
41589
41590  # remove trailing .exe if any
41591  new_path="${new_path/%.exe/}"
41592
41593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41594
41595  # First separate the path from the arguments. This will split at the first
41596  # space.
41597  complete="$GNM"
41598  path="${complete%% *}"
41599  tmp="$complete EOL"
41600  arguments="${tmp#* }"
41601
41602  # Input might be given as Windows format, start by converting to
41603  # unix format.
41604  new_path="$path"
41605
41606  windows_path="$new_path"
41607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41608    unix_path=`$CYGPATH -u "$windows_path"`
41609    new_path="$unix_path"
41610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41612    new_path="$unix_path"
41613  fi
41614
41615
41616  # Now try to locate executable using which
41617  new_path=`$WHICH "$new_path" 2> /dev/null`
41618
41619  if test "x$new_path" = x; then
41620    # Oops. Which didn't find the executable.
41621    # The splitting of arguments from the executable at a space might have been incorrect,
41622    # since paths with space are more likely in Windows. Give it another try with the whole
41623    # argument.
41624    path="$complete"
41625    arguments="EOL"
41626    new_path="$path"
41627
41628  windows_path="$new_path"
41629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41630    unix_path=`$CYGPATH -u "$windows_path"`
41631    new_path="$unix_path"
41632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41634    new_path="$unix_path"
41635  fi
41636
41637
41638    new_path=`$WHICH "$new_path" 2> /dev/null`
41639    # bat and cmd files are not always considered executable in MSYS causing which
41640    # to not find them
41641    if test "x$new_path" = x \
41642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41644      new_path="$path"
41645
41646  windows_path="$new_path"
41647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41648    unix_path=`$CYGPATH -u "$windows_path"`
41649    new_path="$unix_path"
41650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41652    new_path="$unix_path"
41653  fi
41654
41655    fi
41656
41657    if test "x$new_path" = x; then
41658      # It's still not found. Now this is an unrecoverable error.
41659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41660$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41661      has_space=`$ECHO "$complete" | $GREP " "`
41662      if test "x$has_space" != x; then
41663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41665      fi
41666      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41667    fi
41668  fi
41669
41670  # Now new_path has a complete unix path to the binary
41671  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41672    # Keep paths in /bin as-is, but remove trailing .exe if any
41673    new_path="${new_path/%.exe/}"
41674    # Do not save /bin paths to all_fixpath_prefixes!
41675  else
41676    # Not in mixed or Windows style, start by that.
41677    new_path=`cmd //c echo $new_path`
41678
41679  input_path="$new_path"
41680  # Check if we need to convert this using DOS-style short mode. If the path
41681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41682  # take no chances and rewrite it.
41683  # Note: m4 eats our [], so we need to use [ and ] instead.
41684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41685  if test "x$has_forbidden_chars" != x; then
41686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41688  fi
41689
41690    # Output is in $new_path
41691
41692  windows_path="$new_path"
41693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41694    unix_path=`$CYGPATH -u "$windows_path"`
41695    new_path="$unix_path"
41696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41698    new_path="$unix_path"
41699  fi
41700
41701    # remove trailing .exe if any
41702    new_path="${new_path/%.exe/}"
41703
41704    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41705    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41706  fi
41707
41708    else
41709      # We're on a unix platform. Hooray! :)
41710      # First separate the path from the arguments. This will split at the first
41711      # space.
41712      complete="$GNM"
41713      path="${complete%% *}"
41714      tmp="$complete EOL"
41715      arguments="${tmp#* }"
41716
41717      # Cannot rely on the command "which" here since it doesn't always work.
41718      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41719      if test -z "$is_absolute_path"; then
41720        # Path to executable is not absolute. Find it.
41721        IFS_save="$IFS"
41722        IFS=:
41723        for p in $PATH; do
41724          if test -f "$p/$path" && test -x "$p/$path"; then
41725            new_path="$p/$path"
41726            break
41727          fi
41728        done
41729        IFS="$IFS_save"
41730      else
41731        # This is an absolute path, we can use it without further modifications.
41732        new_path="$path"
41733      fi
41734
41735      if test "x$new_path" = x; then
41736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41737$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41738        has_space=`$ECHO "$complete" | $GREP " "`
41739        if test "x$has_space" != x; then
41740          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41741$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41742        fi
41743        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41744      fi
41745    fi
41746
41747    # Now join together the path and the arguments once again
41748    if test "x$arguments" != xEOL; then
41749      new_complete="$new_path ${arguments% *}"
41750    else
41751      new_complete="$new_path"
41752    fi
41753
41754    if test "x$complete" != "x$new_complete"; then
41755      GNM="$new_complete"
41756      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41757$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41758    fi
41759  fi
41760
41761  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41762    # FIXME: we should unify this with the solaris case above.
41763
41764
41765  # Publish this variable in the help.
41766
41767
41768  if [ -z "${STRIP+x}" ]; then
41769    # The variable is not set by user, try to locate tool using the code snippet
41770    if test -n "$ac_tool_prefix"; then
41771  for ac_prog in strip
41772  do
41773    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41774set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41776$as_echo_n "checking for $ac_word... " >&6; }
41777if ${ac_cv_prog_STRIP+:} false; then :
41778  $as_echo_n "(cached) " >&6
41779else
41780  if test -n "$STRIP"; then
41781  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41782else
41783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41784for as_dir in $PATH
41785do
41786  IFS=$as_save_IFS
41787  test -z "$as_dir" && as_dir=.
41788    for ac_exec_ext in '' $ac_executable_extensions; do
41789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41790    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41792    break 2
41793  fi
41794done
41795  done
41796IFS=$as_save_IFS
41797
41798fi
41799fi
41800STRIP=$ac_cv_prog_STRIP
41801if test -n "$STRIP"; then
41802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41803$as_echo "$STRIP" >&6; }
41804else
41805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41806$as_echo "no" >&6; }
41807fi
41808
41809
41810    test -n "$STRIP" && break
41811  done
41812fi
41813if test -z "$STRIP"; then
41814  ac_ct_STRIP=$STRIP
41815  for ac_prog in strip
41816do
41817  # Extract the first word of "$ac_prog", so it can be a program name with args.
41818set dummy $ac_prog; ac_word=$2
41819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41820$as_echo_n "checking for $ac_word... " >&6; }
41821if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41822  $as_echo_n "(cached) " >&6
41823else
41824  if test -n "$ac_ct_STRIP"; then
41825  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41826else
41827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41828for as_dir in $PATH
41829do
41830  IFS=$as_save_IFS
41831  test -z "$as_dir" && as_dir=.
41832    for ac_exec_ext in '' $ac_executable_extensions; do
41833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41834    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41836    break 2
41837  fi
41838done
41839  done
41840IFS=$as_save_IFS
41841
41842fi
41843fi
41844ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41845if test -n "$ac_ct_STRIP"; then
41846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41847$as_echo "$ac_ct_STRIP" >&6; }
41848else
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41850$as_echo "no" >&6; }
41851fi
41852
41853
41854  test -n "$ac_ct_STRIP" && break
41855done
41856
41857  if test "x$ac_ct_STRIP" = x; then
41858    STRIP=""
41859  else
41860    case $cross_compiling:$ac_tool_warned in
41861yes:)
41862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41864ac_tool_warned=yes ;;
41865esac
41866    STRIP=$ac_ct_STRIP
41867  fi
41868fi
41869
41870  else
41871    # The variable is set, but is it from the command line or the environment?
41872
41873    # Try to remove the string !STRIP! from our list.
41874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41876      # If it failed, the variable was not from the command line. Ignore it,
41877      # but warn the user (except for BASH, which is always set by the calling BASH).
41878      if test "xSTRIP" != xBASH; then
41879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41880$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41881      fi
41882      # Try to locate tool using the code snippet
41883      if test -n "$ac_tool_prefix"; then
41884  for ac_prog in strip
41885  do
41886    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41887set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41889$as_echo_n "checking for $ac_word... " >&6; }
41890if ${ac_cv_prog_STRIP+:} false; then :
41891  $as_echo_n "(cached) " >&6
41892else
41893  if test -n "$STRIP"; then
41894  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41895else
41896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41897for as_dir in $PATH
41898do
41899  IFS=$as_save_IFS
41900  test -z "$as_dir" && as_dir=.
41901    for ac_exec_ext in '' $ac_executable_extensions; do
41902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41903    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41905    break 2
41906  fi
41907done
41908  done
41909IFS=$as_save_IFS
41910
41911fi
41912fi
41913STRIP=$ac_cv_prog_STRIP
41914if test -n "$STRIP"; then
41915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41916$as_echo "$STRIP" >&6; }
41917else
41918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41919$as_echo "no" >&6; }
41920fi
41921
41922
41923    test -n "$STRIP" && break
41924  done
41925fi
41926if test -z "$STRIP"; then
41927  ac_ct_STRIP=$STRIP
41928  for ac_prog in strip
41929do
41930  # Extract the first word of "$ac_prog", so it can be a program name with args.
41931set dummy $ac_prog; ac_word=$2
41932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41933$as_echo_n "checking for $ac_word... " >&6; }
41934if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41935  $as_echo_n "(cached) " >&6
41936else
41937  if test -n "$ac_ct_STRIP"; then
41938  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41939else
41940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41941for as_dir in $PATH
41942do
41943  IFS=$as_save_IFS
41944  test -z "$as_dir" && as_dir=.
41945    for ac_exec_ext in '' $ac_executable_extensions; do
41946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41947    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41949    break 2
41950  fi
41951done
41952  done
41953IFS=$as_save_IFS
41954
41955fi
41956fi
41957ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41958if test -n "$ac_ct_STRIP"; then
41959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41960$as_echo "$ac_ct_STRIP" >&6; }
41961else
41962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41963$as_echo "no" >&6; }
41964fi
41965
41966
41967  test -n "$ac_ct_STRIP" && break
41968done
41969
41970  if test "x$ac_ct_STRIP" = x; then
41971    STRIP=""
41972  else
41973    case $cross_compiling:$ac_tool_warned in
41974yes:)
41975{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41976$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41977ac_tool_warned=yes ;;
41978esac
41979    STRIP=$ac_ct_STRIP
41980  fi
41981fi
41982
41983    else
41984      # If it succeeded, then it was overridden by the user. We will use it
41985      # for the tool.
41986
41987      # First remove it from the list of overridden variables, so we can test
41988      # for unknown variables in the end.
41989      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41990
41991      # Check if we try to supply an empty value
41992      if test "x$STRIP" = x; then
41993        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41994$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41996$as_echo_n "checking for STRIP... " >&6; }
41997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41998$as_echo "disabled" >&6; }
41999      else
42000        # Check if the provided tool contains a complete path.
42001        tool_specified="$STRIP"
42002        tool_basename="${tool_specified##*/}"
42003        if test "x$tool_basename" = "x$tool_specified"; then
42004          # A command without a complete path is provided, search $PATH.
42005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42006$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42007          # Extract the first word of "$tool_basename", so it can be a program name with args.
42008set dummy $tool_basename; ac_word=$2
42009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42010$as_echo_n "checking for $ac_word... " >&6; }
42011if ${ac_cv_path_STRIP+:} false; then :
42012  $as_echo_n "(cached) " >&6
42013else
42014  case $STRIP in
42015  [\\/]* | ?:[\\/]*)
42016  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42017  ;;
42018  *)
42019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42020for as_dir in $PATH
42021do
42022  IFS=$as_save_IFS
42023  test -z "$as_dir" && as_dir=.
42024    for ac_exec_ext in '' $ac_executable_extensions; do
42025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42026    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42028    break 2
42029  fi
42030done
42031  done
42032IFS=$as_save_IFS
42033
42034  ;;
42035esac
42036fi
42037STRIP=$ac_cv_path_STRIP
42038if test -n "$STRIP"; then
42039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42040$as_echo "$STRIP" >&6; }
42041else
42042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42043$as_echo "no" >&6; }
42044fi
42045
42046
42047          if test "x$STRIP" = x; then
42048            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42049          fi
42050        else
42051          # Otherwise we believe it is a complete path. Use it as it is.
42052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42053$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42054          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42055$as_echo_n "checking for STRIP... " >&6; }
42056          if test ! -x "$tool_specified"; then
42057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42058$as_echo "not found" >&6; }
42059            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42060          fi
42061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42062$as_echo "$tool_specified" >&6; }
42063        fi
42064      fi
42065    fi
42066
42067  fi
42068
42069
42070
42071  # Only process if variable expands to non-empty
42072
42073  if test "x$STRIP" != x; then
42074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42075
42076  # First separate the path from the arguments. This will split at the first
42077  # space.
42078  complete="$STRIP"
42079  path="${complete%% *}"
42080  tmp="$complete EOL"
42081  arguments="${tmp#* }"
42082
42083  # Input might be given as Windows format, start by converting to
42084  # unix format.
42085  new_path=`$CYGPATH -u "$path"`
42086
42087  # Now try to locate executable using which
42088  new_path=`$WHICH "$new_path" 2> /dev/null`
42089  # bat and cmd files are not always considered executable in cygwin causing which
42090  # to not find them
42091  if test "x$new_path" = x \
42092      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42093      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42094    new_path=`$CYGPATH -u "$path"`
42095  fi
42096  if test "x$new_path" = x; then
42097    # Oops. Which didn't find the executable.
42098    # The splitting of arguments from the executable at a space might have been incorrect,
42099    # since paths with space are more likely in Windows. Give it another try with the whole
42100    # argument.
42101    path="$complete"
42102    arguments="EOL"
42103    new_path=`$CYGPATH -u "$path"`
42104    new_path=`$WHICH "$new_path" 2> /dev/null`
42105    # bat and cmd files are not always considered executable in cygwin causing which
42106    # to not find them
42107    if test "x$new_path" = x \
42108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42110      new_path=`$CYGPATH -u "$path"`
42111    fi
42112    if test "x$new_path" = x; then
42113      # It's still not found. Now this is an unrecoverable error.
42114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42115$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42116      has_space=`$ECHO "$complete" | $GREP " "`
42117      if test "x$has_space" != x; then
42118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42120      fi
42121      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42122    fi
42123  fi
42124
42125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42128  # "foo.exe" is OK but "foo" is an error.
42129  #
42130  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42131  # It is also a way to make sure we got the proper file name for the real test later on.
42132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42133  if test "x$test_shortpath" = x; then
42134    # Short path failed, file does not exist as specified.
42135    # Try adding .exe or .cmd
42136    if test -f "${new_path}.exe"; then
42137      input_to_shortpath="${new_path}.exe"
42138    elif test -f "${new_path}.cmd"; then
42139      input_to_shortpath="${new_path}.cmd"
42140    else
42141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42142$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42143      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42144$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42145      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42146    fi
42147  else
42148    input_to_shortpath="$new_path"
42149  fi
42150
42151  # Call helper function which possibly converts this using DOS-style short mode.
42152  # If so, the updated path is stored in $new_path.
42153  new_path="$input_to_shortpath"
42154
42155  input_path="$input_to_shortpath"
42156  # Check if we need to convert this using DOS-style short mode. If the path
42157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42158  # take no chances and rewrite it.
42159  # Note: m4 eats our [], so we need to use [ and ] instead.
42160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42161  if test "x$has_forbidden_chars" != x; then
42162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42166      # Going to short mode and back again did indeed matter. Since short mode is
42167      # case insensitive, let's make it lowercase to improve readability.
42168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42169      # Now convert it back to Unix-style (cygpath)
42170      input_path=`$CYGPATH -u "$shortmode_path"`
42171      new_path="$input_path"
42172    fi
42173  fi
42174
42175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42176  if test "x$test_cygdrive_prefix" = x; then
42177    # As a simple fix, exclude /usr/bin since it's not a real path.
42178    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42180      # a path prefixed by /cygdrive for fixpath to work.
42181      new_path="$CYGWIN_ROOT_PATH$input_path"
42182    fi
42183  fi
42184
42185  # remove trailing .exe if any
42186  new_path="${new_path/%.exe/}"
42187
42188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42189
42190  # First separate the path from the arguments. This will split at the first
42191  # space.
42192  complete="$STRIP"
42193  path="${complete%% *}"
42194  tmp="$complete EOL"
42195  arguments="${tmp#* }"
42196
42197  # Input might be given as Windows format, start by converting to
42198  # unix format.
42199  new_path="$path"
42200
42201  windows_path="$new_path"
42202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42203    unix_path=`$CYGPATH -u "$windows_path"`
42204    new_path="$unix_path"
42205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42207    new_path="$unix_path"
42208  fi
42209
42210
42211  # Now try to locate executable using which
42212  new_path=`$WHICH "$new_path" 2> /dev/null`
42213
42214  if test "x$new_path" = x; then
42215    # Oops. Which didn't find the executable.
42216    # The splitting of arguments from the executable at a space might have been incorrect,
42217    # since paths with space are more likely in Windows. Give it another try with the whole
42218    # argument.
42219    path="$complete"
42220    arguments="EOL"
42221    new_path="$path"
42222
42223  windows_path="$new_path"
42224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42225    unix_path=`$CYGPATH -u "$windows_path"`
42226    new_path="$unix_path"
42227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42229    new_path="$unix_path"
42230  fi
42231
42232
42233    new_path=`$WHICH "$new_path" 2> /dev/null`
42234    # bat and cmd files are not always considered executable in MSYS causing which
42235    # to not find them
42236    if test "x$new_path" = x \
42237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42239      new_path="$path"
42240
42241  windows_path="$new_path"
42242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42243    unix_path=`$CYGPATH -u "$windows_path"`
42244    new_path="$unix_path"
42245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42247    new_path="$unix_path"
42248  fi
42249
42250    fi
42251
42252    if test "x$new_path" = x; then
42253      # It's still not found. Now this is an unrecoverable error.
42254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42255$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42256      has_space=`$ECHO "$complete" | $GREP " "`
42257      if test "x$has_space" != x; then
42258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42260      fi
42261      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42262    fi
42263  fi
42264
42265  # Now new_path has a complete unix path to the binary
42266  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42267    # Keep paths in /bin as-is, but remove trailing .exe if any
42268    new_path="${new_path/%.exe/}"
42269    # Do not save /bin paths to all_fixpath_prefixes!
42270  else
42271    # Not in mixed or Windows style, start by that.
42272    new_path=`cmd //c echo $new_path`
42273
42274  input_path="$new_path"
42275  # Check if we need to convert this using DOS-style short mode. If the path
42276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42277  # take no chances and rewrite it.
42278  # Note: m4 eats our [], so we need to use [ and ] instead.
42279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42280  if test "x$has_forbidden_chars" != x; then
42281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42283  fi
42284
42285    # Output is in $new_path
42286
42287  windows_path="$new_path"
42288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42289    unix_path=`$CYGPATH -u "$windows_path"`
42290    new_path="$unix_path"
42291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42293    new_path="$unix_path"
42294  fi
42295
42296    # remove trailing .exe if any
42297    new_path="${new_path/%.exe/}"
42298
42299    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42300    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42301  fi
42302
42303    else
42304      # We're on a unix platform. Hooray! :)
42305      # First separate the path from the arguments. This will split at the first
42306      # space.
42307      complete="$STRIP"
42308      path="${complete%% *}"
42309      tmp="$complete EOL"
42310      arguments="${tmp#* }"
42311
42312      # Cannot rely on the command "which" here since it doesn't always work.
42313      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42314      if test -z "$is_absolute_path"; then
42315        # Path to executable is not absolute. Find it.
42316        IFS_save="$IFS"
42317        IFS=:
42318        for p in $PATH; do
42319          if test -f "$p/$path" && test -x "$p/$path"; then
42320            new_path="$p/$path"
42321            break
42322          fi
42323        done
42324        IFS="$IFS_save"
42325      else
42326        # This is an absolute path, we can use it without further modifications.
42327        new_path="$path"
42328      fi
42329
42330      if test "x$new_path" = x; then
42331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42332$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42333        has_space=`$ECHO "$complete" | $GREP " "`
42334        if test "x$has_space" != x; then
42335          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42336$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42337        fi
42338        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42339      fi
42340    fi
42341
42342    # Now join together the path and the arguments once again
42343    if test "x$arguments" != xEOL; then
42344      new_complete="$new_path ${arguments% *}"
42345    else
42346      new_complete="$new_path"
42347    fi
42348
42349    if test "x$complete" != "x$new_complete"; then
42350      STRIP="$new_complete"
42351      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42352$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42353    fi
42354  fi
42355
42356    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42357
42358
42359  # Publish this variable in the help.
42360
42361
42362  if [ -z "${NM+x}" ]; then
42363    # The variable is not set by user, try to locate tool using the code snippet
42364    if test -n "$ac_tool_prefix"; then
42365  for ac_prog in nm gcc-nm
42366  do
42367    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42368set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42370$as_echo_n "checking for $ac_word... " >&6; }
42371if ${ac_cv_prog_NM+:} false; then :
42372  $as_echo_n "(cached) " >&6
42373else
42374  if test -n "$NM"; then
42375  ac_cv_prog_NM="$NM" # Let the user override the test.
42376else
42377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42378for as_dir in $PATH
42379do
42380  IFS=$as_save_IFS
42381  test -z "$as_dir" && as_dir=.
42382    for ac_exec_ext in '' $ac_executable_extensions; do
42383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42384    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42386    break 2
42387  fi
42388done
42389  done
42390IFS=$as_save_IFS
42391
42392fi
42393fi
42394NM=$ac_cv_prog_NM
42395if test -n "$NM"; then
42396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42397$as_echo "$NM" >&6; }
42398else
42399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42400$as_echo "no" >&6; }
42401fi
42402
42403
42404    test -n "$NM" && break
42405  done
42406fi
42407if test -z "$NM"; then
42408  ac_ct_NM=$NM
42409  for ac_prog in nm gcc-nm
42410do
42411  # Extract the first word of "$ac_prog", so it can be a program name with args.
42412set dummy $ac_prog; ac_word=$2
42413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42414$as_echo_n "checking for $ac_word... " >&6; }
42415if ${ac_cv_prog_ac_ct_NM+:} false; then :
42416  $as_echo_n "(cached) " >&6
42417else
42418  if test -n "$ac_ct_NM"; then
42419  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42420else
42421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42422for as_dir in $PATH
42423do
42424  IFS=$as_save_IFS
42425  test -z "$as_dir" && as_dir=.
42426    for ac_exec_ext in '' $ac_executable_extensions; do
42427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42428    ac_cv_prog_ac_ct_NM="$ac_prog"
42429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42430    break 2
42431  fi
42432done
42433  done
42434IFS=$as_save_IFS
42435
42436fi
42437fi
42438ac_ct_NM=$ac_cv_prog_ac_ct_NM
42439if test -n "$ac_ct_NM"; then
42440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42441$as_echo "$ac_ct_NM" >&6; }
42442else
42443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42444$as_echo "no" >&6; }
42445fi
42446
42447
42448  test -n "$ac_ct_NM" && break
42449done
42450
42451  if test "x$ac_ct_NM" = x; then
42452    NM=""
42453  else
42454    case $cross_compiling:$ac_tool_warned in
42455yes:)
42456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42458ac_tool_warned=yes ;;
42459esac
42460    NM=$ac_ct_NM
42461  fi
42462fi
42463
42464  else
42465    # The variable is set, but is it from the command line or the environment?
42466
42467    # Try to remove the string !NM! from our list.
42468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42470      # If it failed, the variable was not from the command line. Ignore it,
42471      # but warn the user (except for BASH, which is always set by the calling BASH).
42472      if test "xNM" != xBASH; then
42473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42474$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42475      fi
42476      # Try to locate tool using the code snippet
42477      if test -n "$ac_tool_prefix"; then
42478  for ac_prog in nm gcc-nm
42479  do
42480    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42481set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42483$as_echo_n "checking for $ac_word... " >&6; }
42484if ${ac_cv_prog_NM+:} false; then :
42485  $as_echo_n "(cached) " >&6
42486else
42487  if test -n "$NM"; then
42488  ac_cv_prog_NM="$NM" # Let the user override the test.
42489else
42490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42491for as_dir in $PATH
42492do
42493  IFS=$as_save_IFS
42494  test -z "$as_dir" && as_dir=.
42495    for ac_exec_ext in '' $ac_executable_extensions; do
42496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42497    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42499    break 2
42500  fi
42501done
42502  done
42503IFS=$as_save_IFS
42504
42505fi
42506fi
42507NM=$ac_cv_prog_NM
42508if test -n "$NM"; then
42509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42510$as_echo "$NM" >&6; }
42511else
42512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42513$as_echo "no" >&6; }
42514fi
42515
42516
42517    test -n "$NM" && break
42518  done
42519fi
42520if test -z "$NM"; then
42521  ac_ct_NM=$NM
42522  for ac_prog in nm gcc-nm
42523do
42524  # Extract the first word of "$ac_prog", so it can be a program name with args.
42525set dummy $ac_prog; ac_word=$2
42526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42527$as_echo_n "checking for $ac_word... " >&6; }
42528if ${ac_cv_prog_ac_ct_NM+:} false; then :
42529  $as_echo_n "(cached) " >&6
42530else
42531  if test -n "$ac_ct_NM"; then
42532  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42533else
42534as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42535for as_dir in $PATH
42536do
42537  IFS=$as_save_IFS
42538  test -z "$as_dir" && as_dir=.
42539    for ac_exec_ext in '' $ac_executable_extensions; do
42540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42541    ac_cv_prog_ac_ct_NM="$ac_prog"
42542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42543    break 2
42544  fi
42545done
42546  done
42547IFS=$as_save_IFS
42548
42549fi
42550fi
42551ac_ct_NM=$ac_cv_prog_ac_ct_NM
42552if test -n "$ac_ct_NM"; then
42553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42554$as_echo "$ac_ct_NM" >&6; }
42555else
42556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42557$as_echo "no" >&6; }
42558fi
42559
42560
42561  test -n "$ac_ct_NM" && break
42562done
42563
42564  if test "x$ac_ct_NM" = x; then
42565    NM=""
42566  else
42567    case $cross_compiling:$ac_tool_warned in
42568yes:)
42569{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42570$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42571ac_tool_warned=yes ;;
42572esac
42573    NM=$ac_ct_NM
42574  fi
42575fi
42576
42577    else
42578      # If it succeeded, then it was overridden by the user. We will use it
42579      # for the tool.
42580
42581      # First remove it from the list of overridden variables, so we can test
42582      # for unknown variables in the end.
42583      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42584
42585      # Check if we try to supply an empty value
42586      if test "x$NM" = x; then
42587        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42588$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42590$as_echo_n "checking for NM... " >&6; }
42591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42592$as_echo "disabled" >&6; }
42593      else
42594        # Check if the provided tool contains a complete path.
42595        tool_specified="$NM"
42596        tool_basename="${tool_specified##*/}"
42597        if test "x$tool_basename" = "x$tool_specified"; then
42598          # A command without a complete path is provided, search $PATH.
42599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42600$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42601          # Extract the first word of "$tool_basename", so it can be a program name with args.
42602set dummy $tool_basename; ac_word=$2
42603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42604$as_echo_n "checking for $ac_word... " >&6; }
42605if ${ac_cv_path_NM+:} false; then :
42606  $as_echo_n "(cached) " >&6
42607else
42608  case $NM in
42609  [\\/]* | ?:[\\/]*)
42610  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42611  ;;
42612  *)
42613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42614for as_dir in $PATH
42615do
42616  IFS=$as_save_IFS
42617  test -z "$as_dir" && as_dir=.
42618    for ac_exec_ext in '' $ac_executable_extensions; do
42619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42620    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42622    break 2
42623  fi
42624done
42625  done
42626IFS=$as_save_IFS
42627
42628  ;;
42629esac
42630fi
42631NM=$ac_cv_path_NM
42632if test -n "$NM"; then
42633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42634$as_echo "$NM" >&6; }
42635else
42636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42637$as_echo "no" >&6; }
42638fi
42639
42640
42641          if test "x$NM" = x; then
42642            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42643          fi
42644        else
42645          # Otherwise we believe it is a complete path. Use it as it is.
42646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42647$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42648          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42649$as_echo_n "checking for NM... " >&6; }
42650          if test ! -x "$tool_specified"; then
42651            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42652$as_echo "not found" >&6; }
42653            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42654          fi
42655          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42656$as_echo "$tool_specified" >&6; }
42657        fi
42658      fi
42659    fi
42660
42661  fi
42662
42663
42664    else
42665
42666
42667  # Publish this variable in the help.
42668
42669
42670  if [ -z "${NM+x}" ]; then
42671    # The variable is not set by user, try to locate tool using the code snippet
42672    if test -n "$ac_tool_prefix"; then
42673  for ac_prog in nm
42674  do
42675    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42676set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42678$as_echo_n "checking for $ac_word... " >&6; }
42679if ${ac_cv_prog_NM+:} false; then :
42680  $as_echo_n "(cached) " >&6
42681else
42682  if test -n "$NM"; then
42683  ac_cv_prog_NM="$NM" # Let the user override the test.
42684else
42685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42686for as_dir in $PATH
42687do
42688  IFS=$as_save_IFS
42689  test -z "$as_dir" && as_dir=.
42690    for ac_exec_ext in '' $ac_executable_extensions; do
42691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42692    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42694    break 2
42695  fi
42696done
42697  done
42698IFS=$as_save_IFS
42699
42700fi
42701fi
42702NM=$ac_cv_prog_NM
42703if test -n "$NM"; then
42704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42705$as_echo "$NM" >&6; }
42706else
42707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42708$as_echo "no" >&6; }
42709fi
42710
42711
42712    test -n "$NM" && break
42713  done
42714fi
42715if test -z "$NM"; then
42716  ac_ct_NM=$NM
42717  for ac_prog in nm
42718do
42719  # Extract the first word of "$ac_prog", so it can be a program name with args.
42720set dummy $ac_prog; ac_word=$2
42721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42722$as_echo_n "checking for $ac_word... " >&6; }
42723if ${ac_cv_prog_ac_ct_NM+:} false; then :
42724  $as_echo_n "(cached) " >&6
42725else
42726  if test -n "$ac_ct_NM"; then
42727  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42728else
42729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42730for as_dir in $PATH
42731do
42732  IFS=$as_save_IFS
42733  test -z "$as_dir" && as_dir=.
42734    for ac_exec_ext in '' $ac_executable_extensions; do
42735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42736    ac_cv_prog_ac_ct_NM="$ac_prog"
42737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42738    break 2
42739  fi
42740done
42741  done
42742IFS=$as_save_IFS
42743
42744fi
42745fi
42746ac_ct_NM=$ac_cv_prog_ac_ct_NM
42747if test -n "$ac_ct_NM"; then
42748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42749$as_echo "$ac_ct_NM" >&6; }
42750else
42751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42752$as_echo "no" >&6; }
42753fi
42754
42755
42756  test -n "$ac_ct_NM" && break
42757done
42758
42759  if test "x$ac_ct_NM" = x; then
42760    NM=""
42761  else
42762    case $cross_compiling:$ac_tool_warned in
42763yes:)
42764{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42765$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42766ac_tool_warned=yes ;;
42767esac
42768    NM=$ac_ct_NM
42769  fi
42770fi
42771
42772  else
42773    # The variable is set, but is it from the command line or the environment?
42774
42775    # Try to remove the string !NM! from our list.
42776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42778      # If it failed, the variable was not from the command line. Ignore it,
42779      # but warn the user (except for BASH, which is always set by the calling BASH).
42780      if test "xNM" != xBASH; then
42781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42782$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42783      fi
42784      # Try to locate tool using the code snippet
42785      if test -n "$ac_tool_prefix"; then
42786  for ac_prog in nm
42787  do
42788    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42791$as_echo_n "checking for $ac_word... " >&6; }
42792if ${ac_cv_prog_NM+:} false; then :
42793  $as_echo_n "(cached) " >&6
42794else
42795  if test -n "$NM"; then
42796  ac_cv_prog_NM="$NM" # Let the user override the test.
42797else
42798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42799for as_dir in $PATH
42800do
42801  IFS=$as_save_IFS
42802  test -z "$as_dir" && as_dir=.
42803    for ac_exec_ext in '' $ac_executable_extensions; do
42804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42805    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42807    break 2
42808  fi
42809done
42810  done
42811IFS=$as_save_IFS
42812
42813fi
42814fi
42815NM=$ac_cv_prog_NM
42816if test -n "$NM"; then
42817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42818$as_echo "$NM" >&6; }
42819else
42820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42821$as_echo "no" >&6; }
42822fi
42823
42824
42825    test -n "$NM" && break
42826  done
42827fi
42828if test -z "$NM"; then
42829  ac_ct_NM=$NM
42830  for ac_prog in nm
42831do
42832  # Extract the first word of "$ac_prog", so it can be a program name with args.
42833set dummy $ac_prog; ac_word=$2
42834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42835$as_echo_n "checking for $ac_word... " >&6; }
42836if ${ac_cv_prog_ac_ct_NM+:} false; then :
42837  $as_echo_n "(cached) " >&6
42838else
42839  if test -n "$ac_ct_NM"; then
42840  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42841else
42842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42843for as_dir in $PATH
42844do
42845  IFS=$as_save_IFS
42846  test -z "$as_dir" && as_dir=.
42847    for ac_exec_ext in '' $ac_executable_extensions; do
42848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42849    ac_cv_prog_ac_ct_NM="$ac_prog"
42850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42851    break 2
42852  fi
42853done
42854  done
42855IFS=$as_save_IFS
42856
42857fi
42858fi
42859ac_ct_NM=$ac_cv_prog_ac_ct_NM
42860if test -n "$ac_ct_NM"; then
42861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42862$as_echo "$ac_ct_NM" >&6; }
42863else
42864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42865$as_echo "no" >&6; }
42866fi
42867
42868
42869  test -n "$ac_ct_NM" && break
42870done
42871
42872  if test "x$ac_ct_NM" = x; then
42873    NM=""
42874  else
42875    case $cross_compiling:$ac_tool_warned in
42876yes:)
42877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42879ac_tool_warned=yes ;;
42880esac
42881    NM=$ac_ct_NM
42882  fi
42883fi
42884
42885    else
42886      # If it succeeded, then it was overridden by the user. We will use it
42887      # for the tool.
42888
42889      # First remove it from the list of overridden variables, so we can test
42890      # for unknown variables in the end.
42891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42892
42893      # Check if we try to supply an empty value
42894      if test "x$NM" = x; then
42895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42896$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42898$as_echo_n "checking for NM... " >&6; }
42899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42900$as_echo "disabled" >&6; }
42901      else
42902        # Check if the provided tool contains a complete path.
42903        tool_specified="$NM"
42904        tool_basename="${tool_specified##*/}"
42905        if test "x$tool_basename" = "x$tool_specified"; then
42906          # A command without a complete path is provided, search $PATH.
42907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42908$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42909          # Extract the first word of "$tool_basename", so it can be a program name with args.
42910set dummy $tool_basename; ac_word=$2
42911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42912$as_echo_n "checking for $ac_word... " >&6; }
42913if ${ac_cv_path_NM+:} false; then :
42914  $as_echo_n "(cached) " >&6
42915else
42916  case $NM in
42917  [\\/]* | ?:[\\/]*)
42918  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42919  ;;
42920  *)
42921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42922for as_dir in $PATH
42923do
42924  IFS=$as_save_IFS
42925  test -z "$as_dir" && as_dir=.
42926    for ac_exec_ext in '' $ac_executable_extensions; do
42927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42928    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42930    break 2
42931  fi
42932done
42933  done
42934IFS=$as_save_IFS
42935
42936  ;;
42937esac
42938fi
42939NM=$ac_cv_path_NM
42940if test -n "$NM"; then
42941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42942$as_echo "$NM" >&6; }
42943else
42944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42945$as_echo "no" >&6; }
42946fi
42947
42948
42949          if test "x$NM" = x; then
42950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42951          fi
42952        else
42953          # Otherwise we believe it is a complete path. Use it as it is.
42954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42955$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42957$as_echo_n "checking for NM... " >&6; }
42958          if test ! -x "$tool_specified"; then
42959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42960$as_echo "not found" >&6; }
42961            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42962          fi
42963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42964$as_echo "$tool_specified" >&6; }
42965        fi
42966      fi
42967    fi
42968
42969  fi
42970
42971
42972    fi
42973
42974  # Only process if variable expands to non-empty
42975
42976  if test "x$NM" != x; then
42977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42978
42979  # First separate the path from the arguments. This will split at the first
42980  # space.
42981  complete="$NM"
42982  path="${complete%% *}"
42983  tmp="$complete EOL"
42984  arguments="${tmp#* }"
42985
42986  # Input might be given as Windows format, start by converting to
42987  # unix format.
42988  new_path=`$CYGPATH -u "$path"`
42989
42990  # Now try to locate executable using which
42991  new_path=`$WHICH "$new_path" 2> /dev/null`
42992  # bat and cmd files are not always considered executable in cygwin causing which
42993  # to not find them
42994  if test "x$new_path" = x \
42995      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42996      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42997    new_path=`$CYGPATH -u "$path"`
42998  fi
42999  if test "x$new_path" = x; then
43000    # Oops. Which didn't find the executable.
43001    # The splitting of arguments from the executable at a space might have been incorrect,
43002    # since paths with space are more likely in Windows. Give it another try with the whole
43003    # argument.
43004    path="$complete"
43005    arguments="EOL"
43006    new_path=`$CYGPATH -u "$path"`
43007    new_path=`$WHICH "$new_path" 2> /dev/null`
43008    # bat and cmd files are not always considered executable in cygwin causing which
43009    # to not find them
43010    if test "x$new_path" = x \
43011        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43012        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43013      new_path=`$CYGPATH -u "$path"`
43014    fi
43015    if test "x$new_path" = x; then
43016      # It's still not found. Now this is an unrecoverable error.
43017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43018$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43019      has_space=`$ECHO "$complete" | $GREP " "`
43020      if test "x$has_space" != x; then
43021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43023      fi
43024      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43025    fi
43026  fi
43027
43028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43031  # "foo.exe" is OK but "foo" is an error.
43032  #
43033  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43034  # It is also a way to make sure we got the proper file name for the real test later on.
43035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43036  if test "x$test_shortpath" = x; then
43037    # Short path failed, file does not exist as specified.
43038    # Try adding .exe or .cmd
43039    if test -f "${new_path}.exe"; then
43040      input_to_shortpath="${new_path}.exe"
43041    elif test -f "${new_path}.cmd"; then
43042      input_to_shortpath="${new_path}.cmd"
43043    else
43044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43045$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43046      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43047$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43048      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43049    fi
43050  else
43051    input_to_shortpath="$new_path"
43052  fi
43053
43054  # Call helper function which possibly converts this using DOS-style short mode.
43055  # If so, the updated path is stored in $new_path.
43056  new_path="$input_to_shortpath"
43057
43058  input_path="$input_to_shortpath"
43059  # Check if we need to convert this using DOS-style short mode. If the path
43060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43061  # take no chances and rewrite it.
43062  # Note: m4 eats our [], so we need to use [ and ] instead.
43063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43064  if test "x$has_forbidden_chars" != x; then
43065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43069      # Going to short mode and back again did indeed matter. Since short mode is
43070      # case insensitive, let's make it lowercase to improve readability.
43071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43072      # Now convert it back to Unix-style (cygpath)
43073      input_path=`$CYGPATH -u "$shortmode_path"`
43074      new_path="$input_path"
43075    fi
43076  fi
43077
43078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43079  if test "x$test_cygdrive_prefix" = x; then
43080    # As a simple fix, exclude /usr/bin since it's not a real path.
43081    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43083      # a path prefixed by /cygdrive for fixpath to work.
43084      new_path="$CYGWIN_ROOT_PATH$input_path"
43085    fi
43086  fi
43087
43088  # remove trailing .exe if any
43089  new_path="${new_path/%.exe/}"
43090
43091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43092
43093  # First separate the path from the arguments. This will split at the first
43094  # space.
43095  complete="$NM"
43096  path="${complete%% *}"
43097  tmp="$complete EOL"
43098  arguments="${tmp#* }"
43099
43100  # Input might be given as Windows format, start by converting to
43101  # unix format.
43102  new_path="$path"
43103
43104  windows_path="$new_path"
43105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43106    unix_path=`$CYGPATH -u "$windows_path"`
43107    new_path="$unix_path"
43108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43110    new_path="$unix_path"
43111  fi
43112
43113
43114  # Now try to locate executable using which
43115  new_path=`$WHICH "$new_path" 2> /dev/null`
43116
43117  if test "x$new_path" = x; then
43118    # Oops. Which didn't find the executable.
43119    # The splitting of arguments from the executable at a space might have been incorrect,
43120    # since paths with space are more likely in Windows. Give it another try with the whole
43121    # argument.
43122    path="$complete"
43123    arguments="EOL"
43124    new_path="$path"
43125
43126  windows_path="$new_path"
43127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43128    unix_path=`$CYGPATH -u "$windows_path"`
43129    new_path="$unix_path"
43130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43132    new_path="$unix_path"
43133  fi
43134
43135
43136    new_path=`$WHICH "$new_path" 2> /dev/null`
43137    # bat and cmd files are not always considered executable in MSYS causing which
43138    # to not find them
43139    if test "x$new_path" = x \
43140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43142      new_path="$path"
43143
43144  windows_path="$new_path"
43145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43146    unix_path=`$CYGPATH -u "$windows_path"`
43147    new_path="$unix_path"
43148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43150    new_path="$unix_path"
43151  fi
43152
43153    fi
43154
43155    if test "x$new_path" = x; then
43156      # It's still not found. Now this is an unrecoverable error.
43157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43158$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43159      has_space=`$ECHO "$complete" | $GREP " "`
43160      if test "x$has_space" != x; then
43161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43163      fi
43164      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43165    fi
43166  fi
43167
43168  # Now new_path has a complete unix path to the binary
43169  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43170    # Keep paths in /bin as-is, but remove trailing .exe if any
43171    new_path="${new_path/%.exe/}"
43172    # Do not save /bin paths to all_fixpath_prefixes!
43173  else
43174    # Not in mixed or Windows style, start by that.
43175    new_path=`cmd //c echo $new_path`
43176
43177  input_path="$new_path"
43178  # Check if we need to convert this using DOS-style short mode. If the path
43179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43180  # take no chances and rewrite it.
43181  # Note: m4 eats our [], so we need to use [ and ] instead.
43182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43183  if test "x$has_forbidden_chars" != x; then
43184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43186  fi
43187
43188    # Output is in $new_path
43189
43190  windows_path="$new_path"
43191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43192    unix_path=`$CYGPATH -u "$windows_path"`
43193    new_path="$unix_path"
43194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43196    new_path="$unix_path"
43197  fi
43198
43199    # remove trailing .exe if any
43200    new_path="${new_path/%.exe/}"
43201
43202    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43203    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43204  fi
43205
43206    else
43207      # We're on a unix platform. Hooray! :)
43208      # First separate the path from the arguments. This will split at the first
43209      # space.
43210      complete="$NM"
43211      path="${complete%% *}"
43212      tmp="$complete EOL"
43213      arguments="${tmp#* }"
43214
43215      # Cannot rely on the command "which" here since it doesn't always work.
43216      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43217      if test -z "$is_absolute_path"; then
43218        # Path to executable is not absolute. Find it.
43219        IFS_save="$IFS"
43220        IFS=:
43221        for p in $PATH; do
43222          if test -f "$p/$path" && test -x "$p/$path"; then
43223            new_path="$p/$path"
43224            break
43225          fi
43226        done
43227        IFS="$IFS_save"
43228      else
43229        # This is an absolute path, we can use it without further modifications.
43230        new_path="$path"
43231      fi
43232
43233      if test "x$new_path" = x; then
43234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43235$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43236        has_space=`$ECHO "$complete" | $GREP " "`
43237        if test "x$has_space" != x; then
43238          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43239$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43240        fi
43241        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43242      fi
43243    fi
43244
43245    # Now join together the path and the arguments once again
43246    if test "x$arguments" != xEOL; then
43247      new_complete="$new_path ${arguments% *}"
43248    else
43249      new_complete="$new_path"
43250    fi
43251
43252    if test "x$complete" != "x$new_complete"; then
43253      NM="$new_complete"
43254      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43255$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43256    fi
43257  fi
43258
43259    GNM="$NM"
43260
43261  fi
43262
43263  # objcopy is used for moving debug symbols to separate files when
43264  # full debug symbols are enabled.
43265  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43266
43267
43268  # Publish this variable in the help.
43269
43270
43271  if [ -z "${OBJCOPY+x}" ]; then
43272    # The variable is not set by user, try to locate tool using the code snippet
43273    if test -n "$ac_tool_prefix"; then
43274  for ac_prog in gobjcopy objcopy
43275  do
43276    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43279$as_echo_n "checking for $ac_word... " >&6; }
43280if ${ac_cv_prog_OBJCOPY+:} false; then :
43281  $as_echo_n "(cached) " >&6
43282else
43283  if test -n "$OBJCOPY"; then
43284  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43285else
43286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43287for as_dir in $PATH
43288do
43289  IFS=$as_save_IFS
43290  test -z "$as_dir" && as_dir=.
43291    for ac_exec_ext in '' $ac_executable_extensions; do
43292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43293    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43295    break 2
43296  fi
43297done
43298  done
43299IFS=$as_save_IFS
43300
43301fi
43302fi
43303OBJCOPY=$ac_cv_prog_OBJCOPY
43304if test -n "$OBJCOPY"; then
43305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43306$as_echo "$OBJCOPY" >&6; }
43307else
43308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43309$as_echo "no" >&6; }
43310fi
43311
43312
43313    test -n "$OBJCOPY" && break
43314  done
43315fi
43316if test -z "$OBJCOPY"; then
43317  ac_ct_OBJCOPY=$OBJCOPY
43318  for ac_prog in gobjcopy objcopy
43319do
43320  # Extract the first word of "$ac_prog", so it can be a program name with args.
43321set dummy $ac_prog; ac_word=$2
43322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43323$as_echo_n "checking for $ac_word... " >&6; }
43324if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43325  $as_echo_n "(cached) " >&6
43326else
43327  if test -n "$ac_ct_OBJCOPY"; then
43328  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43329else
43330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43331for as_dir in $PATH
43332do
43333  IFS=$as_save_IFS
43334  test -z "$as_dir" && as_dir=.
43335    for ac_exec_ext in '' $ac_executable_extensions; do
43336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43337    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43339    break 2
43340  fi
43341done
43342  done
43343IFS=$as_save_IFS
43344
43345fi
43346fi
43347ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43348if test -n "$ac_ct_OBJCOPY"; then
43349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43350$as_echo "$ac_ct_OBJCOPY" >&6; }
43351else
43352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43353$as_echo "no" >&6; }
43354fi
43355
43356
43357  test -n "$ac_ct_OBJCOPY" && break
43358done
43359
43360  if test "x$ac_ct_OBJCOPY" = x; then
43361    OBJCOPY=""
43362  else
43363    case $cross_compiling:$ac_tool_warned in
43364yes:)
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43367ac_tool_warned=yes ;;
43368esac
43369    OBJCOPY=$ac_ct_OBJCOPY
43370  fi
43371fi
43372
43373  else
43374    # The variable is set, but is it from the command line or the environment?
43375
43376    # Try to remove the string !OBJCOPY! from our list.
43377    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43378    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43379      # If it failed, the variable was not from the command line. Ignore it,
43380      # but warn the user (except for BASH, which is always set by the calling BASH).
43381      if test "xOBJCOPY" != xBASH; then
43382        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43383$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43384      fi
43385      # Try to locate tool using the code snippet
43386      if test -n "$ac_tool_prefix"; then
43387  for ac_prog in gobjcopy objcopy
43388  do
43389    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43390set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43392$as_echo_n "checking for $ac_word... " >&6; }
43393if ${ac_cv_prog_OBJCOPY+:} false; then :
43394  $as_echo_n "(cached) " >&6
43395else
43396  if test -n "$OBJCOPY"; then
43397  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43398else
43399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43400for as_dir in $PATH
43401do
43402  IFS=$as_save_IFS
43403  test -z "$as_dir" && as_dir=.
43404    for ac_exec_ext in '' $ac_executable_extensions; do
43405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43406    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43408    break 2
43409  fi
43410done
43411  done
43412IFS=$as_save_IFS
43413
43414fi
43415fi
43416OBJCOPY=$ac_cv_prog_OBJCOPY
43417if test -n "$OBJCOPY"; then
43418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43419$as_echo "$OBJCOPY" >&6; }
43420else
43421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43422$as_echo "no" >&6; }
43423fi
43424
43425
43426    test -n "$OBJCOPY" && break
43427  done
43428fi
43429if test -z "$OBJCOPY"; then
43430  ac_ct_OBJCOPY=$OBJCOPY
43431  for ac_prog in gobjcopy objcopy
43432do
43433  # Extract the first word of "$ac_prog", so it can be a program name with args.
43434set dummy $ac_prog; ac_word=$2
43435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43436$as_echo_n "checking for $ac_word... " >&6; }
43437if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43438  $as_echo_n "(cached) " >&6
43439else
43440  if test -n "$ac_ct_OBJCOPY"; then
43441  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43442else
43443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43444for as_dir in $PATH
43445do
43446  IFS=$as_save_IFS
43447  test -z "$as_dir" && as_dir=.
43448    for ac_exec_ext in '' $ac_executable_extensions; do
43449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43450    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43452    break 2
43453  fi
43454done
43455  done
43456IFS=$as_save_IFS
43457
43458fi
43459fi
43460ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43461if test -n "$ac_ct_OBJCOPY"; then
43462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43463$as_echo "$ac_ct_OBJCOPY" >&6; }
43464else
43465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43466$as_echo "no" >&6; }
43467fi
43468
43469
43470  test -n "$ac_ct_OBJCOPY" && break
43471done
43472
43473  if test "x$ac_ct_OBJCOPY" = x; then
43474    OBJCOPY=""
43475  else
43476    case $cross_compiling:$ac_tool_warned in
43477yes:)
43478{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43479$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43480ac_tool_warned=yes ;;
43481esac
43482    OBJCOPY=$ac_ct_OBJCOPY
43483  fi
43484fi
43485
43486    else
43487      # If it succeeded, then it was overridden by the user. We will use it
43488      # for the tool.
43489
43490      # First remove it from the list of overridden variables, so we can test
43491      # for unknown variables in the end.
43492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43493
43494      # Check if we try to supply an empty value
43495      if test "x$OBJCOPY" = x; then
43496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43497$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43499$as_echo_n "checking for OBJCOPY... " >&6; }
43500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43501$as_echo "disabled" >&6; }
43502      else
43503        # Check if the provided tool contains a complete path.
43504        tool_specified="$OBJCOPY"
43505        tool_basename="${tool_specified##*/}"
43506        if test "x$tool_basename" = "x$tool_specified"; then
43507          # A command without a complete path is provided, search $PATH.
43508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43509$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43510          # Extract the first word of "$tool_basename", so it can be a program name with args.
43511set dummy $tool_basename; ac_word=$2
43512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43513$as_echo_n "checking for $ac_word... " >&6; }
43514if ${ac_cv_path_OBJCOPY+:} false; then :
43515  $as_echo_n "(cached) " >&6
43516else
43517  case $OBJCOPY in
43518  [\\/]* | ?:[\\/]*)
43519  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43520  ;;
43521  *)
43522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43523for as_dir in $PATH
43524do
43525  IFS=$as_save_IFS
43526  test -z "$as_dir" && as_dir=.
43527    for ac_exec_ext in '' $ac_executable_extensions; do
43528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43529    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43531    break 2
43532  fi
43533done
43534  done
43535IFS=$as_save_IFS
43536
43537  ;;
43538esac
43539fi
43540OBJCOPY=$ac_cv_path_OBJCOPY
43541if test -n "$OBJCOPY"; then
43542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43543$as_echo "$OBJCOPY" >&6; }
43544else
43545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43546$as_echo "no" >&6; }
43547fi
43548
43549
43550          if test "x$OBJCOPY" = x; then
43551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43552          fi
43553        else
43554          # Otherwise we believe it is a complete path. Use it as it is.
43555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43556$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43558$as_echo_n "checking for OBJCOPY... " >&6; }
43559          if test ! -x "$tool_specified"; then
43560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43561$as_echo "not found" >&6; }
43562            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43563          fi
43564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43565$as_echo "$tool_specified" >&6; }
43566        fi
43567      fi
43568    fi
43569
43570  fi
43571
43572
43573    # Only call fixup if objcopy was found.
43574    if test -n "$OBJCOPY"; then
43575
43576  # Only process if variable expands to non-empty
43577
43578  if test "x$OBJCOPY" != x; then
43579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43580
43581  # First separate the path from the arguments. This will split at the first
43582  # space.
43583  complete="$OBJCOPY"
43584  path="${complete%% *}"
43585  tmp="$complete EOL"
43586  arguments="${tmp#* }"
43587
43588  # Input might be given as Windows format, start by converting to
43589  # unix format.
43590  new_path=`$CYGPATH -u "$path"`
43591
43592  # Now try to locate executable using which
43593  new_path=`$WHICH "$new_path" 2> /dev/null`
43594  # bat and cmd files are not always considered executable in cygwin causing which
43595  # to not find them
43596  if test "x$new_path" = x \
43597      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43598      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43599    new_path=`$CYGPATH -u "$path"`
43600  fi
43601  if test "x$new_path" = x; then
43602    # Oops. Which didn't find the executable.
43603    # The splitting of arguments from the executable at a space might have been incorrect,
43604    # since paths with space are more likely in Windows. Give it another try with the whole
43605    # argument.
43606    path="$complete"
43607    arguments="EOL"
43608    new_path=`$CYGPATH -u "$path"`
43609    new_path=`$WHICH "$new_path" 2> /dev/null`
43610    # bat and cmd files are not always considered executable in cygwin causing which
43611    # to not find them
43612    if test "x$new_path" = x \
43613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43615      new_path=`$CYGPATH -u "$path"`
43616    fi
43617    if test "x$new_path" = x; then
43618      # It's still not found. Now this is an unrecoverable error.
43619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43620$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43621      has_space=`$ECHO "$complete" | $GREP " "`
43622      if test "x$has_space" != x; then
43623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43625      fi
43626      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43627    fi
43628  fi
43629
43630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43633  # "foo.exe" is OK but "foo" is an error.
43634  #
43635  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43636  # It is also a way to make sure we got the proper file name for the real test later on.
43637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43638  if test "x$test_shortpath" = x; then
43639    # Short path failed, file does not exist as specified.
43640    # Try adding .exe or .cmd
43641    if test -f "${new_path}.exe"; then
43642      input_to_shortpath="${new_path}.exe"
43643    elif test -f "${new_path}.cmd"; then
43644      input_to_shortpath="${new_path}.cmd"
43645    else
43646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43647$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43648      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43649$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43650      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43651    fi
43652  else
43653    input_to_shortpath="$new_path"
43654  fi
43655
43656  # Call helper function which possibly converts this using DOS-style short mode.
43657  # If so, the updated path is stored in $new_path.
43658  new_path="$input_to_shortpath"
43659
43660  input_path="$input_to_shortpath"
43661  # Check if we need to convert this using DOS-style short mode. If the path
43662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43663  # take no chances and rewrite it.
43664  # Note: m4 eats our [], so we need to use [ and ] instead.
43665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43666  if test "x$has_forbidden_chars" != x; then
43667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43671      # Going to short mode and back again did indeed matter. Since short mode is
43672      # case insensitive, let's make it lowercase to improve readability.
43673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43674      # Now convert it back to Unix-style (cygpath)
43675      input_path=`$CYGPATH -u "$shortmode_path"`
43676      new_path="$input_path"
43677    fi
43678  fi
43679
43680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43681  if test "x$test_cygdrive_prefix" = x; then
43682    # As a simple fix, exclude /usr/bin since it's not a real path.
43683    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43685      # a path prefixed by /cygdrive for fixpath to work.
43686      new_path="$CYGWIN_ROOT_PATH$input_path"
43687    fi
43688  fi
43689
43690  # remove trailing .exe if any
43691  new_path="${new_path/%.exe/}"
43692
43693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43694
43695  # First separate the path from the arguments. This will split at the first
43696  # space.
43697  complete="$OBJCOPY"
43698  path="${complete%% *}"
43699  tmp="$complete EOL"
43700  arguments="${tmp#* }"
43701
43702  # Input might be given as Windows format, start by converting to
43703  # unix format.
43704  new_path="$path"
43705
43706  windows_path="$new_path"
43707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43708    unix_path=`$CYGPATH -u "$windows_path"`
43709    new_path="$unix_path"
43710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43712    new_path="$unix_path"
43713  fi
43714
43715
43716  # Now try to locate executable using which
43717  new_path=`$WHICH "$new_path" 2> /dev/null`
43718
43719  if test "x$new_path" = x; then
43720    # Oops. Which didn't find the executable.
43721    # The splitting of arguments from the executable at a space might have been incorrect,
43722    # since paths with space are more likely in Windows. Give it another try with the whole
43723    # argument.
43724    path="$complete"
43725    arguments="EOL"
43726    new_path="$path"
43727
43728  windows_path="$new_path"
43729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43730    unix_path=`$CYGPATH -u "$windows_path"`
43731    new_path="$unix_path"
43732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43734    new_path="$unix_path"
43735  fi
43736
43737
43738    new_path=`$WHICH "$new_path" 2> /dev/null`
43739    # bat and cmd files are not always considered executable in MSYS causing which
43740    # to not find them
43741    if test "x$new_path" = x \
43742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43744      new_path="$path"
43745
43746  windows_path="$new_path"
43747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43748    unix_path=`$CYGPATH -u "$windows_path"`
43749    new_path="$unix_path"
43750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43752    new_path="$unix_path"
43753  fi
43754
43755    fi
43756
43757    if test "x$new_path" = x; then
43758      # It's still not found. Now this is an unrecoverable error.
43759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43760$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43761      has_space=`$ECHO "$complete" | $GREP " "`
43762      if test "x$has_space" != x; then
43763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43765      fi
43766      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43767    fi
43768  fi
43769
43770  # Now new_path has a complete unix path to the binary
43771  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43772    # Keep paths in /bin as-is, but remove trailing .exe if any
43773    new_path="${new_path/%.exe/}"
43774    # Do not save /bin paths to all_fixpath_prefixes!
43775  else
43776    # Not in mixed or Windows style, start by that.
43777    new_path=`cmd //c echo $new_path`
43778
43779  input_path="$new_path"
43780  # Check if we need to convert this using DOS-style short mode. If the path
43781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43782  # take no chances and rewrite it.
43783  # Note: m4 eats our [], so we need to use [ and ] instead.
43784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43785  if test "x$has_forbidden_chars" != x; then
43786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43788  fi
43789
43790    # Output is in $new_path
43791
43792  windows_path="$new_path"
43793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43794    unix_path=`$CYGPATH -u "$windows_path"`
43795    new_path="$unix_path"
43796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43798    new_path="$unix_path"
43799  fi
43800
43801    # remove trailing .exe if any
43802    new_path="${new_path/%.exe/}"
43803
43804    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43805    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43806  fi
43807
43808    else
43809      # We're on a unix platform. Hooray! :)
43810      # First separate the path from the arguments. This will split at the first
43811      # space.
43812      complete="$OBJCOPY"
43813      path="${complete%% *}"
43814      tmp="$complete EOL"
43815      arguments="${tmp#* }"
43816
43817      # Cannot rely on the command "which" here since it doesn't always work.
43818      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43819      if test -z "$is_absolute_path"; then
43820        # Path to executable is not absolute. Find it.
43821        IFS_save="$IFS"
43822        IFS=:
43823        for p in $PATH; do
43824          if test -f "$p/$path" && test -x "$p/$path"; then
43825            new_path="$p/$path"
43826            break
43827          fi
43828        done
43829        IFS="$IFS_save"
43830      else
43831        # This is an absolute path, we can use it without further modifications.
43832        new_path="$path"
43833      fi
43834
43835      if test "x$new_path" = x; then
43836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43837$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43838        has_space=`$ECHO "$complete" | $GREP " "`
43839        if test "x$has_space" != x; then
43840          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43841$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43842        fi
43843        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43844      fi
43845    fi
43846
43847    # Now join together the path and the arguments once again
43848    if test "x$arguments" != xEOL; then
43849      new_complete="$new_path ${arguments% *}"
43850    else
43851      new_complete="$new_path"
43852    fi
43853
43854    if test "x$complete" != "x$new_complete"; then
43855      OBJCOPY="$new_complete"
43856      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43857$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43858    fi
43859  fi
43860
43861      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43862        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43863        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43864        # - version number is last blank separate word on first line
43865        # - version number formats that have been seen:
43866        #   - <major>.<minor>
43867        #   - <major>.<minor>.<micro>
43868        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43869        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43870         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43871              -e 's/.* //' \
43872              -e '/^[01]\./b bad' \
43873              -e '/^2\./{' \
43874              -e '  s/^2\.//' \
43875              -e '  /^[0-9]$/b bad' \
43876              -e '  /^[0-9]\./b bad' \
43877              -e '  /^1[0-9]$/b bad' \
43878              -e '  /^1[0-9]\./b bad' \
43879              -e '  /^20\./b bad' \
43880              -e '  /^21\.0$/b bad' \
43881              -e '  /^21\.0\./b bad' \
43882              -e '}' \
43883              -e ':good' \
43884              -e 's/.*/VALID_VERSION/p' \
43885              -e 'q' \
43886              -e ':bad' \
43887              -e 's/.*/BAD_VERSION/p' \
43888              -e 'q'`
43889        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43890          OBJCOPY=
43891          { $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
43892$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43893          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43894$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43895          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43896$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43897          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43898$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43899          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43900$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43901        fi
43902      fi
43903    fi
43904  fi
43905
43906
43907
43908  # Publish this variable in the help.
43909
43910
43911  if [ -z "${OBJDUMP+x}" ]; then
43912    # The variable is not set by user, try to locate tool using the code snippet
43913    if test -n "$ac_tool_prefix"; then
43914  for ac_prog in gobjdump objdump
43915  do
43916    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43917set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43919$as_echo_n "checking for $ac_word... " >&6; }
43920if ${ac_cv_prog_OBJDUMP+:} false; then :
43921  $as_echo_n "(cached) " >&6
43922else
43923  if test -n "$OBJDUMP"; then
43924  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43925else
43926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43927for as_dir in $PATH
43928do
43929  IFS=$as_save_IFS
43930  test -z "$as_dir" && as_dir=.
43931    for ac_exec_ext in '' $ac_executable_extensions; do
43932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43933    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43935    break 2
43936  fi
43937done
43938  done
43939IFS=$as_save_IFS
43940
43941fi
43942fi
43943OBJDUMP=$ac_cv_prog_OBJDUMP
43944if test -n "$OBJDUMP"; then
43945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43946$as_echo "$OBJDUMP" >&6; }
43947else
43948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43949$as_echo "no" >&6; }
43950fi
43951
43952
43953    test -n "$OBJDUMP" && break
43954  done
43955fi
43956if test -z "$OBJDUMP"; then
43957  ac_ct_OBJDUMP=$OBJDUMP
43958  for ac_prog in gobjdump objdump
43959do
43960  # Extract the first word of "$ac_prog", so it can be a program name with args.
43961set dummy $ac_prog; ac_word=$2
43962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43963$as_echo_n "checking for $ac_word... " >&6; }
43964if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43965  $as_echo_n "(cached) " >&6
43966else
43967  if test -n "$ac_ct_OBJDUMP"; then
43968  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43969else
43970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43971for as_dir in $PATH
43972do
43973  IFS=$as_save_IFS
43974  test -z "$as_dir" && as_dir=.
43975    for ac_exec_ext in '' $ac_executable_extensions; do
43976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43977    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43979    break 2
43980  fi
43981done
43982  done
43983IFS=$as_save_IFS
43984
43985fi
43986fi
43987ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43988if test -n "$ac_ct_OBJDUMP"; then
43989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43990$as_echo "$ac_ct_OBJDUMP" >&6; }
43991else
43992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43993$as_echo "no" >&6; }
43994fi
43995
43996
43997  test -n "$ac_ct_OBJDUMP" && break
43998done
43999
44000  if test "x$ac_ct_OBJDUMP" = x; then
44001    OBJDUMP=""
44002  else
44003    case $cross_compiling:$ac_tool_warned in
44004yes:)
44005{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44006$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44007ac_tool_warned=yes ;;
44008esac
44009    OBJDUMP=$ac_ct_OBJDUMP
44010  fi
44011fi
44012
44013  else
44014    # The variable is set, but is it from the command line or the environment?
44015
44016    # Try to remove the string !OBJDUMP! from our list.
44017    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44018    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44019      # If it failed, the variable was not from the command line. Ignore it,
44020      # but warn the user (except for BASH, which is always set by the calling BASH).
44021      if test "xOBJDUMP" != xBASH; then
44022        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44023$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44024      fi
44025      # Try to locate tool using the code snippet
44026      if test -n "$ac_tool_prefix"; then
44027  for ac_prog in gobjdump objdump
44028  do
44029    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44032$as_echo_n "checking for $ac_word... " >&6; }
44033if ${ac_cv_prog_OBJDUMP+:} false; then :
44034  $as_echo_n "(cached) " >&6
44035else
44036  if test -n "$OBJDUMP"; then
44037  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44038else
44039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44040for as_dir in $PATH
44041do
44042  IFS=$as_save_IFS
44043  test -z "$as_dir" && as_dir=.
44044    for ac_exec_ext in '' $ac_executable_extensions; do
44045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44046    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44048    break 2
44049  fi
44050done
44051  done
44052IFS=$as_save_IFS
44053
44054fi
44055fi
44056OBJDUMP=$ac_cv_prog_OBJDUMP
44057if test -n "$OBJDUMP"; then
44058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44059$as_echo "$OBJDUMP" >&6; }
44060else
44061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44062$as_echo "no" >&6; }
44063fi
44064
44065
44066    test -n "$OBJDUMP" && break
44067  done
44068fi
44069if test -z "$OBJDUMP"; then
44070  ac_ct_OBJDUMP=$OBJDUMP
44071  for ac_prog in gobjdump objdump
44072do
44073  # Extract the first word of "$ac_prog", so it can be a program name with args.
44074set dummy $ac_prog; ac_word=$2
44075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44076$as_echo_n "checking for $ac_word... " >&6; }
44077if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44078  $as_echo_n "(cached) " >&6
44079else
44080  if test -n "$ac_ct_OBJDUMP"; then
44081  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44082else
44083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44084for as_dir in $PATH
44085do
44086  IFS=$as_save_IFS
44087  test -z "$as_dir" && as_dir=.
44088    for ac_exec_ext in '' $ac_executable_extensions; do
44089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44090    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44092    break 2
44093  fi
44094done
44095  done
44096IFS=$as_save_IFS
44097
44098fi
44099fi
44100ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44101if test -n "$ac_ct_OBJDUMP"; then
44102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44103$as_echo "$ac_ct_OBJDUMP" >&6; }
44104else
44105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44106$as_echo "no" >&6; }
44107fi
44108
44109
44110  test -n "$ac_ct_OBJDUMP" && break
44111done
44112
44113  if test "x$ac_ct_OBJDUMP" = x; then
44114    OBJDUMP=""
44115  else
44116    case $cross_compiling:$ac_tool_warned in
44117yes:)
44118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44120ac_tool_warned=yes ;;
44121esac
44122    OBJDUMP=$ac_ct_OBJDUMP
44123  fi
44124fi
44125
44126    else
44127      # If it succeeded, then it was overridden by the user. We will use it
44128      # for the tool.
44129
44130      # First remove it from the list of overridden variables, so we can test
44131      # for unknown variables in the end.
44132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44133
44134      # Check if we try to supply an empty value
44135      if test "x$OBJDUMP" = x; then
44136        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44137$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44139$as_echo_n "checking for OBJDUMP... " >&6; }
44140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44141$as_echo "disabled" >&6; }
44142      else
44143        # Check if the provided tool contains a complete path.
44144        tool_specified="$OBJDUMP"
44145        tool_basename="${tool_specified##*/}"
44146        if test "x$tool_basename" = "x$tool_specified"; then
44147          # A command without a complete path is provided, search $PATH.
44148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44149$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44150          # Extract the first word of "$tool_basename", so it can be a program name with args.
44151set dummy $tool_basename; ac_word=$2
44152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44153$as_echo_n "checking for $ac_word... " >&6; }
44154if ${ac_cv_path_OBJDUMP+:} false; then :
44155  $as_echo_n "(cached) " >&6
44156else
44157  case $OBJDUMP in
44158  [\\/]* | ?:[\\/]*)
44159  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44160  ;;
44161  *)
44162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44163for as_dir in $PATH
44164do
44165  IFS=$as_save_IFS
44166  test -z "$as_dir" && as_dir=.
44167    for ac_exec_ext in '' $ac_executable_extensions; do
44168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44169    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44171    break 2
44172  fi
44173done
44174  done
44175IFS=$as_save_IFS
44176
44177  ;;
44178esac
44179fi
44180OBJDUMP=$ac_cv_path_OBJDUMP
44181if test -n "$OBJDUMP"; then
44182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44183$as_echo "$OBJDUMP" >&6; }
44184else
44185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44186$as_echo "no" >&6; }
44187fi
44188
44189
44190          if test "x$OBJDUMP" = x; then
44191            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44192          fi
44193        else
44194          # Otherwise we believe it is a complete path. Use it as it is.
44195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44196$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44198$as_echo_n "checking for OBJDUMP... " >&6; }
44199          if test ! -x "$tool_specified"; then
44200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44201$as_echo "not found" >&6; }
44202            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44203          fi
44204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44205$as_echo "$tool_specified" >&6; }
44206        fi
44207      fi
44208    fi
44209
44210  fi
44211
44212
44213  if test "x$OBJDUMP" != x; then
44214    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44215    # bails if argument is missing.
44216
44217  # Only process if variable expands to non-empty
44218
44219  if test "x$OBJDUMP" != x; then
44220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44221
44222  # First separate the path from the arguments. This will split at the first
44223  # space.
44224  complete="$OBJDUMP"
44225  path="${complete%% *}"
44226  tmp="$complete EOL"
44227  arguments="${tmp#* }"
44228
44229  # Input might be given as Windows format, start by converting to
44230  # unix format.
44231  new_path=`$CYGPATH -u "$path"`
44232
44233  # Now try to locate executable using which
44234  new_path=`$WHICH "$new_path" 2> /dev/null`
44235  # bat and cmd files are not always considered executable in cygwin causing which
44236  # to not find them
44237  if test "x$new_path" = x \
44238      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44239      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44240    new_path=`$CYGPATH -u "$path"`
44241  fi
44242  if test "x$new_path" = x; then
44243    # Oops. Which didn't find the executable.
44244    # The splitting of arguments from the executable at a space might have been incorrect,
44245    # since paths with space are more likely in Windows. Give it another try with the whole
44246    # argument.
44247    path="$complete"
44248    arguments="EOL"
44249    new_path=`$CYGPATH -u "$path"`
44250    new_path=`$WHICH "$new_path" 2> /dev/null`
44251    # bat and cmd files are not always considered executable in cygwin causing which
44252    # to not find them
44253    if test "x$new_path" = x \
44254        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44255        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44256      new_path=`$CYGPATH -u "$path"`
44257    fi
44258    if test "x$new_path" = x; then
44259      # It's still not found. Now this is an unrecoverable error.
44260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44261$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44262      has_space=`$ECHO "$complete" | $GREP " "`
44263      if test "x$has_space" != x; then
44264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44266      fi
44267      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44268    fi
44269  fi
44270
44271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44274  # "foo.exe" is OK but "foo" is an error.
44275  #
44276  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44277  # It is also a way to make sure we got the proper file name for the real test later on.
44278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44279  if test "x$test_shortpath" = x; then
44280    # Short path failed, file does not exist as specified.
44281    # Try adding .exe or .cmd
44282    if test -f "${new_path}.exe"; then
44283      input_to_shortpath="${new_path}.exe"
44284    elif test -f "${new_path}.cmd"; then
44285      input_to_shortpath="${new_path}.cmd"
44286    else
44287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44288$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44291      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44292    fi
44293  else
44294    input_to_shortpath="$new_path"
44295  fi
44296
44297  # Call helper function which possibly converts this using DOS-style short mode.
44298  # If so, the updated path is stored in $new_path.
44299  new_path="$input_to_shortpath"
44300
44301  input_path="$input_to_shortpath"
44302  # Check if we need to convert this using DOS-style short mode. If the path
44303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44304  # take no chances and rewrite it.
44305  # Note: m4 eats our [], so we need to use [ and ] instead.
44306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44307  if test "x$has_forbidden_chars" != x; then
44308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44312      # Going to short mode and back again did indeed matter. Since short mode is
44313      # case insensitive, let's make it lowercase to improve readability.
44314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44315      # Now convert it back to Unix-style (cygpath)
44316      input_path=`$CYGPATH -u "$shortmode_path"`
44317      new_path="$input_path"
44318    fi
44319  fi
44320
44321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44322  if test "x$test_cygdrive_prefix" = x; then
44323    # As a simple fix, exclude /usr/bin since it's not a real path.
44324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44326      # a path prefixed by /cygdrive for fixpath to work.
44327      new_path="$CYGWIN_ROOT_PATH$input_path"
44328    fi
44329  fi
44330
44331  # remove trailing .exe if any
44332  new_path="${new_path/%.exe/}"
44333
44334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44335
44336  # First separate the path from the arguments. This will split at the first
44337  # space.
44338  complete="$OBJDUMP"
44339  path="${complete%% *}"
44340  tmp="$complete EOL"
44341  arguments="${tmp#* }"
44342
44343  # Input might be given as Windows format, start by converting to
44344  # unix format.
44345  new_path="$path"
44346
44347  windows_path="$new_path"
44348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44349    unix_path=`$CYGPATH -u "$windows_path"`
44350    new_path="$unix_path"
44351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44353    new_path="$unix_path"
44354  fi
44355
44356
44357  # Now try to locate executable using which
44358  new_path=`$WHICH "$new_path" 2> /dev/null`
44359
44360  if test "x$new_path" = x; then
44361    # Oops. Which didn't find the executable.
44362    # The splitting of arguments from the executable at a space might have been incorrect,
44363    # since paths with space are more likely in Windows. Give it another try with the whole
44364    # argument.
44365    path="$complete"
44366    arguments="EOL"
44367    new_path="$path"
44368
44369  windows_path="$new_path"
44370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44371    unix_path=`$CYGPATH -u "$windows_path"`
44372    new_path="$unix_path"
44373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44375    new_path="$unix_path"
44376  fi
44377
44378
44379    new_path=`$WHICH "$new_path" 2> /dev/null`
44380    # bat and cmd files are not always considered executable in MSYS causing which
44381    # to not find them
44382    if test "x$new_path" = x \
44383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44385      new_path="$path"
44386
44387  windows_path="$new_path"
44388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44389    unix_path=`$CYGPATH -u "$windows_path"`
44390    new_path="$unix_path"
44391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44393    new_path="$unix_path"
44394  fi
44395
44396    fi
44397
44398    if test "x$new_path" = x; then
44399      # It's still not found. Now this is an unrecoverable error.
44400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44401$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44402      has_space=`$ECHO "$complete" | $GREP " "`
44403      if test "x$has_space" != x; then
44404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44406      fi
44407      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44408    fi
44409  fi
44410
44411  # Now new_path has a complete unix path to the binary
44412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44413    # Keep paths in /bin as-is, but remove trailing .exe if any
44414    new_path="${new_path/%.exe/}"
44415    # Do not save /bin paths to all_fixpath_prefixes!
44416  else
44417    # Not in mixed or Windows style, start by that.
44418    new_path=`cmd //c echo $new_path`
44419
44420  input_path="$new_path"
44421  # Check if we need to convert this using DOS-style short mode. If the path
44422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44423  # take no chances and rewrite it.
44424  # Note: m4 eats our [], so we need to use [ and ] instead.
44425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44426  if test "x$has_forbidden_chars" != x; then
44427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44429  fi
44430
44431    # Output is in $new_path
44432
44433  windows_path="$new_path"
44434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435    unix_path=`$CYGPATH -u "$windows_path"`
44436    new_path="$unix_path"
44437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44439    new_path="$unix_path"
44440  fi
44441
44442    # remove trailing .exe if any
44443    new_path="${new_path/%.exe/}"
44444
44445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44447  fi
44448
44449    else
44450      # We're on a unix platform. Hooray! :)
44451      # First separate the path from the arguments. This will split at the first
44452      # space.
44453      complete="$OBJDUMP"
44454      path="${complete%% *}"
44455      tmp="$complete EOL"
44456      arguments="${tmp#* }"
44457
44458      # Cannot rely on the command "which" here since it doesn't always work.
44459      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44460      if test -z "$is_absolute_path"; then
44461        # Path to executable is not absolute. Find it.
44462        IFS_save="$IFS"
44463        IFS=:
44464        for p in $PATH; do
44465          if test -f "$p/$path" && test -x "$p/$path"; then
44466            new_path="$p/$path"
44467            break
44468          fi
44469        done
44470        IFS="$IFS_save"
44471      else
44472        # This is an absolute path, we can use it without further modifications.
44473        new_path="$path"
44474      fi
44475
44476      if test "x$new_path" = x; then
44477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44478$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44479        has_space=`$ECHO "$complete" | $GREP " "`
44480        if test "x$has_space" != x; then
44481          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44483        fi
44484        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44485      fi
44486    fi
44487
44488    # Now join together the path and the arguments once again
44489    if test "x$arguments" != xEOL; then
44490      new_complete="$new_path ${arguments% *}"
44491    else
44492      new_complete="$new_path"
44493    fi
44494
44495    if test "x$complete" != "x$new_complete"; then
44496      OBJDUMP="$new_complete"
44497      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44498$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44499    fi
44500  fi
44501
44502  fi
44503
44504
44505  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44506  # to remain in place. Otherwise the compiler will not work in some siutations
44507  # in later configure checks.
44508  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44509    PATH="$OLD_PATH"
44510  fi
44511
44512  # Restore the flags to the user specified values.
44513  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44514  CFLAGS="$ORG_CFLAGS"
44515  CXXFLAGS="$ORG_CXXFLAGS"
44516
44517
44518# Finally do some processing after the detection phase
44519
44520  if test "x$COMPILE_TYPE" = "xcross"; then
44521    # Now we need to find a C/C++ compiler that can build executables for the
44522    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44523    # used once. Also, we need to do this without adding a tools dir to the
44524    # path, otherwise we might pick up cross-compilers which don't use standard
44525    # naming.
44526
44527    OLDPATH="$PATH"
44528
44529
44530# Check whether --with-build-devkit was given.
44531if test "${with_build_devkit+set}" = set; then :
44532  withval=$with_build_devkit;
44533fi
44534
44535    if test "x$with_build_devkit" = "xyes"; then
44536      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44537    elif test -n "$with_build_devkit"; then
44538      if test ! -d "$with_build_devkit"; then
44539        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44540      else
44541
44542  # Only process if variable expands to non-empty
44543
44544  if test "x$with_build_devkit" != x; then
44545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44546
44547  # Input might be given as Windows format, start by converting to
44548  # unix format.
44549  path="$with_build_devkit"
44550  new_path=`$CYGPATH -u "$path"`
44551
44552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44555  # "foo.exe" is OK but "foo" is an error.
44556  #
44557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44558  # It is also a way to make sure we got the proper file name for the real test later on.
44559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44560  if test "x$test_shortpath" = x; then
44561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44562$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44563    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44564  fi
44565
44566  # Call helper function which possibly converts this using DOS-style short mode.
44567  # If so, the updated path is stored in $new_path.
44568
44569  input_path="$new_path"
44570  # Check if we need to convert this using DOS-style short mode. If the path
44571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44572  # take no chances and rewrite it.
44573  # Note: m4 eats our [], so we need to use [ and ] instead.
44574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44575  if test "x$has_forbidden_chars" != x; then
44576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44580      # Going to short mode and back again did indeed matter. Since short mode is
44581      # case insensitive, let's make it lowercase to improve readability.
44582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44583      # Now convert it back to Unix-style (cygpath)
44584      input_path=`$CYGPATH -u "$shortmode_path"`
44585      new_path="$input_path"
44586    fi
44587  fi
44588
44589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44590  if test "x$test_cygdrive_prefix" = x; then
44591    # As a simple fix, exclude /usr/bin since it's not a real path.
44592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44594      # a path prefixed by /cygdrive for fixpath to work.
44595      new_path="$CYGWIN_ROOT_PATH$input_path"
44596    fi
44597  fi
44598
44599
44600  if test "x$path" != "x$new_path"; then
44601    with_build_devkit="$new_path"
44602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44603$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44604  fi
44605
44606    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44607
44608  path="$with_build_devkit"
44609  has_colon=`$ECHO $path | $GREP ^.:`
44610  new_path="$path"
44611  if test "x$has_colon" = x; then
44612    # Not in mixed or Windows style, start by that.
44613    new_path=`cmd //c echo $path`
44614  fi
44615
44616
44617  input_path="$new_path"
44618  # Check if we need to convert this using DOS-style short mode. If the path
44619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44620  # take no chances and rewrite it.
44621  # Note: m4 eats our [], so we need to use [ and ] instead.
44622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44623  if test "x$has_forbidden_chars" != x; then
44624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44626  fi
44627
44628
44629  windows_path="$new_path"
44630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44631    unix_path=`$CYGPATH -u "$windows_path"`
44632    new_path="$unix_path"
44633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44635    new_path="$unix_path"
44636  fi
44637
44638  if test "x$path" != "x$new_path"; then
44639    with_build_devkit="$new_path"
44640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44641$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44642  fi
44643
44644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44646
44647    else
44648      # We're on a unix platform. Hooray! :)
44649      path="$with_build_devkit"
44650      has_space=`$ECHO "$path" | $GREP " "`
44651      if test "x$has_space" != x; then
44652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44653$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44654        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44655      fi
44656
44657      # Use eval to expand a potential ~
44658      eval path="$path"
44659      if test ! -f "$path" && test ! -d "$path"; then
44660        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44661      fi
44662
44663      if test -d "$path"; then
44664        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44665      else
44666        dir="`$DIRNAME "$path"`"
44667        base="`$BASENAME "$path"`"
44668        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44669      fi
44670    fi
44671  fi
44672
44673        BUILD_DEVKIT_ROOT="$with_build_devkit"
44674        # Check for a meta data info file in the root of the devkit
44675        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44676          # Process devkit.info so that existing devkit variables are not
44677          # modified by this
44678          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44679              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44680              -e "s/\$host/\$build/g" \
44681              $BUILD_DEVKIT_ROOT/devkit.info \
44682              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44683          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44684          # This potentially sets the following:
44685          # A descriptive name of the devkit
44686
44687  if test "x$BUILD_DEVKIT_NAME" = x; then
44688    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44689  fi
44690
44691          # Corresponds to --with-extra-path
44692
44693  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44694    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44695  fi
44696
44697          # Corresponds to --with-toolchain-path
44698
44699  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44700    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44701  fi
44702
44703          # Corresponds to --with-sysroot
44704
44705  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44706    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44707  fi
44708
44709          # Skip the Window specific parts
44710        fi
44711
44712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44713$as_echo_n "checking for build platform devkit... " >&6; }
44714        if test "x$BUILD_DEVKIT_NAME" != x; then
44715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44716$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44717        else
44718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44719$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44720        fi
44721
44722        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44723
44724  if test "x$BUILD_SYSROOT" != "x"; then
44725    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44726      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44727        # Solaris Studio does not have a concept of sysroot. Instead we must
44728        # make sure the default include and lib dirs are appended to each
44729        # compile and link command line. Must also add -I-xbuiltin to enable
44730        # inlining of system functions and intrinsics.
44731        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44732        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44733            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44734      fi
44735    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44736      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44737      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44738    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44739      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44740      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44741    fi
44742    # The global CFLAGS and LDFLAGS variables need these for configure to function
44743    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44744    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44745    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44746    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44747  fi
44748
44749  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44750    # We also need -iframework<path>/System/Library/Frameworks
44751    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44752    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44753    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44754    # set this here so it doesn't have to be peppered throughout the forest
44755    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44756    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44757  fi
44758
44759
44760
44761
44762
44763         # Fallback default of just /bin if DEVKIT_PATH is not defined
44764        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44765          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44766        fi
44767        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44768      fi
44769    fi
44770
44771    # FIXME: we should list the discovered compilers as an exclude pattern!
44772    # If we do that, we can do this detection before POST_DETECTION, and still
44773    # find the build compilers in the tools dir, if needed.
44774
44775
44776
44777  # Publish this variable in the help.
44778
44779
44780  if [ -z "${BUILD_CC+x}" ]; then
44781    # The variable is not set by user, try to locate tool using the code snippet
44782    for ac_prog in cl cc gcc
44783do
44784  # Extract the first word of "$ac_prog", so it can be a program name with args.
44785set dummy $ac_prog; ac_word=$2
44786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44787$as_echo_n "checking for $ac_word... " >&6; }
44788if ${ac_cv_path_BUILD_CC+:} false; then :
44789  $as_echo_n "(cached) " >&6
44790else
44791  case $BUILD_CC in
44792  [\\/]* | ?:[\\/]*)
44793  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44794  ;;
44795  *)
44796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44797for as_dir in $PATH
44798do
44799  IFS=$as_save_IFS
44800  test -z "$as_dir" && as_dir=.
44801    for ac_exec_ext in '' $ac_executable_extensions; do
44802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44803    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44805    break 2
44806  fi
44807done
44808  done
44809IFS=$as_save_IFS
44810
44811  ;;
44812esac
44813fi
44814BUILD_CC=$ac_cv_path_BUILD_CC
44815if test -n "$BUILD_CC"; then
44816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44817$as_echo "$BUILD_CC" >&6; }
44818else
44819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44820$as_echo "no" >&6; }
44821fi
44822
44823
44824  test -n "$BUILD_CC" && break
44825done
44826
44827  else
44828    # The variable is set, but is it from the command line or the environment?
44829
44830    # Try to remove the string !BUILD_CC! from our list.
44831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44833      # If it failed, the variable was not from the command line. Ignore it,
44834      # but warn the user (except for BASH, which is always set by the calling BASH).
44835      if test "xBUILD_CC" != xBASH; then
44836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44837$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44838      fi
44839      # Try to locate tool using the code snippet
44840      for ac_prog in cl cc gcc
44841do
44842  # Extract the first word of "$ac_prog", so it can be a program name with args.
44843set dummy $ac_prog; ac_word=$2
44844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44845$as_echo_n "checking for $ac_word... " >&6; }
44846if ${ac_cv_path_BUILD_CC+:} false; then :
44847  $as_echo_n "(cached) " >&6
44848else
44849  case $BUILD_CC in
44850  [\\/]* | ?:[\\/]*)
44851  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44852  ;;
44853  *)
44854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44855for as_dir in $PATH
44856do
44857  IFS=$as_save_IFS
44858  test -z "$as_dir" && as_dir=.
44859    for ac_exec_ext in '' $ac_executable_extensions; do
44860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44861    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44863    break 2
44864  fi
44865done
44866  done
44867IFS=$as_save_IFS
44868
44869  ;;
44870esac
44871fi
44872BUILD_CC=$ac_cv_path_BUILD_CC
44873if test -n "$BUILD_CC"; then
44874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44875$as_echo "$BUILD_CC" >&6; }
44876else
44877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44878$as_echo "no" >&6; }
44879fi
44880
44881
44882  test -n "$BUILD_CC" && break
44883done
44884
44885    else
44886      # If it succeeded, then it was overridden by the user. We will use it
44887      # for the tool.
44888
44889      # First remove it from the list of overridden variables, so we can test
44890      # for unknown variables in the end.
44891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44892
44893      # Check if we try to supply an empty value
44894      if test "x$BUILD_CC" = x; then
44895        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44896$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44897        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44898$as_echo_n "checking for BUILD_CC... " >&6; }
44899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44900$as_echo "disabled" >&6; }
44901      else
44902        # Check if the provided tool contains a complete path.
44903        tool_specified="$BUILD_CC"
44904        tool_basename="${tool_specified##*/}"
44905        if test "x$tool_basename" = "x$tool_specified"; then
44906          # A command without a complete path is provided, search $PATH.
44907          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44908$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44909          # Extract the first word of "$tool_basename", so it can be a program name with args.
44910set dummy $tool_basename; ac_word=$2
44911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44912$as_echo_n "checking for $ac_word... " >&6; }
44913if ${ac_cv_path_BUILD_CC+:} false; then :
44914  $as_echo_n "(cached) " >&6
44915else
44916  case $BUILD_CC in
44917  [\\/]* | ?:[\\/]*)
44918  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44919  ;;
44920  *)
44921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44922for as_dir in $PATH
44923do
44924  IFS=$as_save_IFS
44925  test -z "$as_dir" && as_dir=.
44926    for ac_exec_ext in '' $ac_executable_extensions; do
44927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44928    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44930    break 2
44931  fi
44932done
44933  done
44934IFS=$as_save_IFS
44935
44936  ;;
44937esac
44938fi
44939BUILD_CC=$ac_cv_path_BUILD_CC
44940if test -n "$BUILD_CC"; then
44941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44942$as_echo "$BUILD_CC" >&6; }
44943else
44944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44945$as_echo "no" >&6; }
44946fi
44947
44948
44949          if test "x$BUILD_CC" = x; then
44950            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44951          fi
44952        else
44953          # Otherwise we believe it is a complete path. Use it as it is.
44954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44955$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44956          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44957$as_echo_n "checking for BUILD_CC... " >&6; }
44958          if test ! -x "$tool_specified"; then
44959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44960$as_echo "not found" >&6; }
44961            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44962          fi
44963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44964$as_echo "$tool_specified" >&6; }
44965        fi
44966      fi
44967    fi
44968
44969  fi
44970
44971
44972
44973  if test "x$BUILD_CC" = x; then
44974    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44975  fi
44976
44977
44978
44979  # Only process if variable expands to non-empty
44980
44981  if test "x$BUILD_CC" != x; then
44982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44983
44984  # First separate the path from the arguments. This will split at the first
44985  # space.
44986  complete="$BUILD_CC"
44987  path="${complete%% *}"
44988  tmp="$complete EOL"
44989  arguments="${tmp#* }"
44990
44991  # Input might be given as Windows format, start by converting to
44992  # unix format.
44993  new_path=`$CYGPATH -u "$path"`
44994
44995  # Now try to locate executable using which
44996  new_path=`$WHICH "$new_path" 2> /dev/null`
44997  # bat and cmd files are not always considered executable in cygwin causing which
44998  # to not find them
44999  if test "x$new_path" = x \
45000      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45001      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45002    new_path=`$CYGPATH -u "$path"`
45003  fi
45004  if test "x$new_path" = x; then
45005    # Oops. Which didn't find the executable.
45006    # The splitting of arguments from the executable at a space might have been incorrect,
45007    # since paths with space are more likely in Windows. Give it another try with the whole
45008    # argument.
45009    path="$complete"
45010    arguments="EOL"
45011    new_path=`$CYGPATH -u "$path"`
45012    new_path=`$WHICH "$new_path" 2> /dev/null`
45013    # bat and cmd files are not always considered executable in cygwin causing which
45014    # to not find them
45015    if test "x$new_path" = x \
45016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45018      new_path=`$CYGPATH -u "$path"`
45019    fi
45020    if test "x$new_path" = x; then
45021      # It's still not found. Now this is an unrecoverable error.
45022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45023$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45024      has_space=`$ECHO "$complete" | $GREP " "`
45025      if test "x$has_space" != x; then
45026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45028      fi
45029      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45030    fi
45031  fi
45032
45033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45036  # "foo.exe" is OK but "foo" is an error.
45037  #
45038  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45039  # It is also a way to make sure we got the proper file name for the real test later on.
45040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45041  if test "x$test_shortpath" = x; then
45042    # Short path failed, file does not exist as specified.
45043    # Try adding .exe or .cmd
45044    if test -f "${new_path}.exe"; then
45045      input_to_shortpath="${new_path}.exe"
45046    elif test -f "${new_path}.cmd"; then
45047      input_to_shortpath="${new_path}.cmd"
45048    else
45049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45050$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45053      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45054    fi
45055  else
45056    input_to_shortpath="$new_path"
45057  fi
45058
45059  # Call helper function which possibly converts this using DOS-style short mode.
45060  # If so, the updated path is stored in $new_path.
45061  new_path="$input_to_shortpath"
45062
45063  input_path="$input_to_shortpath"
45064  # Check if we need to convert this using DOS-style short mode. If the path
45065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45066  # take no chances and rewrite it.
45067  # Note: m4 eats our [], so we need to use [ and ] instead.
45068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45069  if test "x$has_forbidden_chars" != x; then
45070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45074      # Going to short mode and back again did indeed matter. Since short mode is
45075      # case insensitive, let's make it lowercase to improve readability.
45076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45077      # Now convert it back to Unix-style (cygpath)
45078      input_path=`$CYGPATH -u "$shortmode_path"`
45079      new_path="$input_path"
45080    fi
45081  fi
45082
45083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45084  if test "x$test_cygdrive_prefix" = x; then
45085    # As a simple fix, exclude /usr/bin since it's not a real path.
45086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45088      # a path prefixed by /cygdrive for fixpath to work.
45089      new_path="$CYGWIN_ROOT_PATH$input_path"
45090    fi
45091  fi
45092
45093  # remove trailing .exe if any
45094  new_path="${new_path/%.exe/}"
45095
45096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45097
45098  # First separate the path from the arguments. This will split at the first
45099  # space.
45100  complete="$BUILD_CC"
45101  path="${complete%% *}"
45102  tmp="$complete EOL"
45103  arguments="${tmp#* }"
45104
45105  # Input might be given as Windows format, start by converting to
45106  # unix format.
45107  new_path="$path"
45108
45109  windows_path="$new_path"
45110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45111    unix_path=`$CYGPATH -u "$windows_path"`
45112    new_path="$unix_path"
45113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45115    new_path="$unix_path"
45116  fi
45117
45118
45119  # Now try to locate executable using which
45120  new_path=`$WHICH "$new_path" 2> /dev/null`
45121
45122  if test "x$new_path" = x; then
45123    # Oops. Which didn't find the executable.
45124    # The splitting of arguments from the executable at a space might have been incorrect,
45125    # since paths with space are more likely in Windows. Give it another try with the whole
45126    # argument.
45127    path="$complete"
45128    arguments="EOL"
45129    new_path="$path"
45130
45131  windows_path="$new_path"
45132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45133    unix_path=`$CYGPATH -u "$windows_path"`
45134    new_path="$unix_path"
45135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45137    new_path="$unix_path"
45138  fi
45139
45140
45141    new_path=`$WHICH "$new_path" 2> /dev/null`
45142    # bat and cmd files are not always considered executable in MSYS causing which
45143    # to not find them
45144    if test "x$new_path" = x \
45145        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45146        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45147      new_path="$path"
45148
45149  windows_path="$new_path"
45150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45151    unix_path=`$CYGPATH -u "$windows_path"`
45152    new_path="$unix_path"
45153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45155    new_path="$unix_path"
45156  fi
45157
45158    fi
45159
45160    if test "x$new_path" = x; then
45161      # It's still not found. Now this is an unrecoverable error.
45162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45163$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45164      has_space=`$ECHO "$complete" | $GREP " "`
45165      if test "x$has_space" != x; then
45166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45168      fi
45169      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45170    fi
45171  fi
45172
45173  # Now new_path has a complete unix path to the binary
45174  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45175    # Keep paths in /bin as-is, but remove trailing .exe if any
45176    new_path="${new_path/%.exe/}"
45177    # Do not save /bin paths to all_fixpath_prefixes!
45178  else
45179    # Not in mixed or Windows style, start by that.
45180    new_path=`cmd //c echo $new_path`
45181
45182  input_path="$new_path"
45183  # Check if we need to convert this using DOS-style short mode. If the path
45184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45185  # take no chances and rewrite it.
45186  # Note: m4 eats our [], so we need to use [ and ] instead.
45187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45188  if test "x$has_forbidden_chars" != x; then
45189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45191  fi
45192
45193    # Output is in $new_path
45194
45195  windows_path="$new_path"
45196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45197    unix_path=`$CYGPATH -u "$windows_path"`
45198    new_path="$unix_path"
45199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45201    new_path="$unix_path"
45202  fi
45203
45204    # remove trailing .exe if any
45205    new_path="${new_path/%.exe/}"
45206
45207    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45208    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45209  fi
45210
45211    else
45212      # We're on a unix platform. Hooray! :)
45213      # First separate the path from the arguments. This will split at the first
45214      # space.
45215      complete="$BUILD_CC"
45216      path="${complete%% *}"
45217      tmp="$complete EOL"
45218      arguments="${tmp#* }"
45219
45220      # Cannot rely on the command "which" here since it doesn't always work.
45221      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45222      if test -z "$is_absolute_path"; then
45223        # Path to executable is not absolute. Find it.
45224        IFS_save="$IFS"
45225        IFS=:
45226        for p in $PATH; do
45227          if test -f "$p/$path" && test -x "$p/$path"; then
45228            new_path="$p/$path"
45229            break
45230          fi
45231        done
45232        IFS="$IFS_save"
45233      else
45234        # This is an absolute path, we can use it without further modifications.
45235        new_path="$path"
45236      fi
45237
45238      if test "x$new_path" = x; then
45239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45240$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45241        has_space=`$ECHO "$complete" | $GREP " "`
45242        if test "x$has_space" != x; then
45243          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45244$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45245        fi
45246        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45247      fi
45248    fi
45249
45250    # Now join together the path and the arguments once again
45251    if test "x$arguments" != xEOL; then
45252      new_complete="$new_path ${arguments% *}"
45253    else
45254      new_complete="$new_path"
45255    fi
45256
45257    if test "x$complete" != "x$new_complete"; then
45258      BUILD_CC="$new_complete"
45259      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45260$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45261    fi
45262  fi
45263
45264
45265
45266
45267  # Publish this variable in the help.
45268
45269
45270  if [ -z "${BUILD_CXX+x}" ]; then
45271    # The variable is not set by user, try to locate tool using the code snippet
45272    for ac_prog in cl CC g++
45273do
45274  # Extract the first word of "$ac_prog", so it can be a program name with args.
45275set dummy $ac_prog; ac_word=$2
45276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45277$as_echo_n "checking for $ac_word... " >&6; }
45278if ${ac_cv_path_BUILD_CXX+:} false; then :
45279  $as_echo_n "(cached) " >&6
45280else
45281  case $BUILD_CXX in
45282  [\\/]* | ?:[\\/]*)
45283  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45284  ;;
45285  *)
45286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45287for as_dir in $PATH
45288do
45289  IFS=$as_save_IFS
45290  test -z "$as_dir" && as_dir=.
45291    for ac_exec_ext in '' $ac_executable_extensions; do
45292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45293    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45295    break 2
45296  fi
45297done
45298  done
45299IFS=$as_save_IFS
45300
45301  ;;
45302esac
45303fi
45304BUILD_CXX=$ac_cv_path_BUILD_CXX
45305if test -n "$BUILD_CXX"; then
45306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45307$as_echo "$BUILD_CXX" >&6; }
45308else
45309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45310$as_echo "no" >&6; }
45311fi
45312
45313
45314  test -n "$BUILD_CXX" && break
45315done
45316
45317  else
45318    # The variable is set, but is it from the command line or the environment?
45319
45320    # Try to remove the string !BUILD_CXX! from our list.
45321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45323      # If it failed, the variable was not from the command line. Ignore it,
45324      # but warn the user (except for BASH, which is always set by the calling BASH).
45325      if test "xBUILD_CXX" != xBASH; then
45326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45327$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45328      fi
45329      # Try to locate tool using the code snippet
45330      for ac_prog in cl CC g++
45331do
45332  # Extract the first word of "$ac_prog", so it can be a program name with args.
45333set dummy $ac_prog; ac_word=$2
45334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45335$as_echo_n "checking for $ac_word... " >&6; }
45336if ${ac_cv_path_BUILD_CXX+:} false; then :
45337  $as_echo_n "(cached) " >&6
45338else
45339  case $BUILD_CXX in
45340  [\\/]* | ?:[\\/]*)
45341  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45342  ;;
45343  *)
45344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45345for as_dir in $PATH
45346do
45347  IFS=$as_save_IFS
45348  test -z "$as_dir" && as_dir=.
45349    for ac_exec_ext in '' $ac_executable_extensions; do
45350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45351    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45353    break 2
45354  fi
45355done
45356  done
45357IFS=$as_save_IFS
45358
45359  ;;
45360esac
45361fi
45362BUILD_CXX=$ac_cv_path_BUILD_CXX
45363if test -n "$BUILD_CXX"; then
45364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45365$as_echo "$BUILD_CXX" >&6; }
45366else
45367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45368$as_echo "no" >&6; }
45369fi
45370
45371
45372  test -n "$BUILD_CXX" && break
45373done
45374
45375    else
45376      # If it succeeded, then it was overridden by the user. We will use it
45377      # for the tool.
45378
45379      # First remove it from the list of overridden variables, so we can test
45380      # for unknown variables in the end.
45381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45382
45383      # Check if we try to supply an empty value
45384      if test "x$BUILD_CXX" = x; then
45385        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45386$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45388$as_echo_n "checking for BUILD_CXX... " >&6; }
45389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45390$as_echo "disabled" >&6; }
45391      else
45392        # Check if the provided tool contains a complete path.
45393        tool_specified="$BUILD_CXX"
45394        tool_basename="${tool_specified##*/}"
45395        if test "x$tool_basename" = "x$tool_specified"; then
45396          # A command without a complete path is provided, search $PATH.
45397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45398$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45399          # Extract the first word of "$tool_basename", so it can be a program name with args.
45400set dummy $tool_basename; ac_word=$2
45401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45402$as_echo_n "checking for $ac_word... " >&6; }
45403if ${ac_cv_path_BUILD_CXX+:} false; then :
45404  $as_echo_n "(cached) " >&6
45405else
45406  case $BUILD_CXX in
45407  [\\/]* | ?:[\\/]*)
45408  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45409  ;;
45410  *)
45411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45412for as_dir in $PATH
45413do
45414  IFS=$as_save_IFS
45415  test -z "$as_dir" && as_dir=.
45416    for ac_exec_ext in '' $ac_executable_extensions; do
45417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45418    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45420    break 2
45421  fi
45422done
45423  done
45424IFS=$as_save_IFS
45425
45426  ;;
45427esac
45428fi
45429BUILD_CXX=$ac_cv_path_BUILD_CXX
45430if test -n "$BUILD_CXX"; then
45431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45432$as_echo "$BUILD_CXX" >&6; }
45433else
45434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45435$as_echo "no" >&6; }
45436fi
45437
45438
45439          if test "x$BUILD_CXX" = x; then
45440            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45441          fi
45442        else
45443          # Otherwise we believe it is a complete path. Use it as it is.
45444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45445$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45446          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45447$as_echo_n "checking for BUILD_CXX... " >&6; }
45448          if test ! -x "$tool_specified"; then
45449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45450$as_echo "not found" >&6; }
45451            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45452          fi
45453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45454$as_echo "$tool_specified" >&6; }
45455        fi
45456      fi
45457    fi
45458
45459  fi
45460
45461
45462
45463  if test "x$BUILD_CXX" = x; then
45464    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45465  fi
45466
45467
45468
45469  # Only process if variable expands to non-empty
45470
45471  if test "x$BUILD_CXX" != x; then
45472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45473
45474  # First separate the path from the arguments. This will split at the first
45475  # space.
45476  complete="$BUILD_CXX"
45477  path="${complete%% *}"
45478  tmp="$complete EOL"
45479  arguments="${tmp#* }"
45480
45481  # Input might be given as Windows format, start by converting to
45482  # unix format.
45483  new_path=`$CYGPATH -u "$path"`
45484
45485  # Now try to locate executable using which
45486  new_path=`$WHICH "$new_path" 2> /dev/null`
45487  # bat and cmd files are not always considered executable in cygwin causing which
45488  # to not find them
45489  if test "x$new_path" = x \
45490      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45491      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45492    new_path=`$CYGPATH -u "$path"`
45493  fi
45494  if test "x$new_path" = x; then
45495    # Oops. Which didn't find the executable.
45496    # The splitting of arguments from the executable at a space might have been incorrect,
45497    # since paths with space are more likely in Windows. Give it another try with the whole
45498    # argument.
45499    path="$complete"
45500    arguments="EOL"
45501    new_path=`$CYGPATH -u "$path"`
45502    new_path=`$WHICH "$new_path" 2> /dev/null`
45503    # bat and cmd files are not always considered executable in cygwin causing which
45504    # to not find them
45505    if test "x$new_path" = x \
45506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45508      new_path=`$CYGPATH -u "$path"`
45509    fi
45510    if test "x$new_path" = x; then
45511      # It's still not found. Now this is an unrecoverable error.
45512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45513$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45514      has_space=`$ECHO "$complete" | $GREP " "`
45515      if test "x$has_space" != x; then
45516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45518      fi
45519      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45520    fi
45521  fi
45522
45523  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45524  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45525  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45526  # "foo.exe" is OK but "foo" is an error.
45527  #
45528  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45529  # It is also a way to make sure we got the proper file name for the real test later on.
45530  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45531  if test "x$test_shortpath" = x; then
45532    # Short path failed, file does not exist as specified.
45533    # Try adding .exe or .cmd
45534    if test -f "${new_path}.exe"; then
45535      input_to_shortpath="${new_path}.exe"
45536    elif test -f "${new_path}.cmd"; then
45537      input_to_shortpath="${new_path}.cmd"
45538    else
45539      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45540$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45541      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45542$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45543      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45544    fi
45545  else
45546    input_to_shortpath="$new_path"
45547  fi
45548
45549  # Call helper function which possibly converts this using DOS-style short mode.
45550  # If so, the updated path is stored in $new_path.
45551  new_path="$input_to_shortpath"
45552
45553  input_path="$input_to_shortpath"
45554  # Check if we need to convert this using DOS-style short mode. If the path
45555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45556  # take no chances and rewrite it.
45557  # Note: m4 eats our [], so we need to use [ and ] instead.
45558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45559  if test "x$has_forbidden_chars" != x; then
45560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45564      # Going to short mode and back again did indeed matter. Since short mode is
45565      # case insensitive, let's make it lowercase to improve readability.
45566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45567      # Now convert it back to Unix-style (cygpath)
45568      input_path=`$CYGPATH -u "$shortmode_path"`
45569      new_path="$input_path"
45570    fi
45571  fi
45572
45573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45574  if test "x$test_cygdrive_prefix" = x; then
45575    # As a simple fix, exclude /usr/bin since it's not a real path.
45576    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45578      # a path prefixed by /cygdrive for fixpath to work.
45579      new_path="$CYGWIN_ROOT_PATH$input_path"
45580    fi
45581  fi
45582
45583  # remove trailing .exe if any
45584  new_path="${new_path/%.exe/}"
45585
45586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45587
45588  # First separate the path from the arguments. This will split at the first
45589  # space.
45590  complete="$BUILD_CXX"
45591  path="${complete%% *}"
45592  tmp="$complete EOL"
45593  arguments="${tmp#* }"
45594
45595  # Input might be given as Windows format, start by converting to
45596  # unix format.
45597  new_path="$path"
45598
45599  windows_path="$new_path"
45600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45601    unix_path=`$CYGPATH -u "$windows_path"`
45602    new_path="$unix_path"
45603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45605    new_path="$unix_path"
45606  fi
45607
45608
45609  # Now try to locate executable using which
45610  new_path=`$WHICH "$new_path" 2> /dev/null`
45611
45612  if test "x$new_path" = x; then
45613    # Oops. Which didn't find the executable.
45614    # The splitting of arguments from the executable at a space might have been incorrect,
45615    # since paths with space are more likely in Windows. Give it another try with the whole
45616    # argument.
45617    path="$complete"
45618    arguments="EOL"
45619    new_path="$path"
45620
45621  windows_path="$new_path"
45622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45623    unix_path=`$CYGPATH -u "$windows_path"`
45624    new_path="$unix_path"
45625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45627    new_path="$unix_path"
45628  fi
45629
45630
45631    new_path=`$WHICH "$new_path" 2> /dev/null`
45632    # bat and cmd files are not always considered executable in MSYS causing which
45633    # to not find them
45634    if test "x$new_path" = x \
45635        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45636        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45637      new_path="$path"
45638
45639  windows_path="$new_path"
45640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45641    unix_path=`$CYGPATH -u "$windows_path"`
45642    new_path="$unix_path"
45643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45645    new_path="$unix_path"
45646  fi
45647
45648    fi
45649
45650    if test "x$new_path" = x; then
45651      # It's still not found. Now this is an unrecoverable error.
45652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45653$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45654      has_space=`$ECHO "$complete" | $GREP " "`
45655      if test "x$has_space" != x; then
45656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45658      fi
45659      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45660    fi
45661  fi
45662
45663  # Now new_path has a complete unix path to the binary
45664  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45665    # Keep paths in /bin as-is, but remove trailing .exe if any
45666    new_path="${new_path/%.exe/}"
45667    # Do not save /bin paths to all_fixpath_prefixes!
45668  else
45669    # Not in mixed or Windows style, start by that.
45670    new_path=`cmd //c echo $new_path`
45671
45672  input_path="$new_path"
45673  # Check if we need to convert this using DOS-style short mode. If the path
45674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45675  # take no chances and rewrite it.
45676  # Note: m4 eats our [], so we need to use [ and ] instead.
45677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45678  if test "x$has_forbidden_chars" != x; then
45679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45681  fi
45682
45683    # Output is in $new_path
45684
45685  windows_path="$new_path"
45686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45687    unix_path=`$CYGPATH -u "$windows_path"`
45688    new_path="$unix_path"
45689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45691    new_path="$unix_path"
45692  fi
45693
45694    # remove trailing .exe if any
45695    new_path="${new_path/%.exe/}"
45696
45697    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45698    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45699  fi
45700
45701    else
45702      # We're on a unix platform. Hooray! :)
45703      # First separate the path from the arguments. This will split at the first
45704      # space.
45705      complete="$BUILD_CXX"
45706      path="${complete%% *}"
45707      tmp="$complete EOL"
45708      arguments="${tmp#* }"
45709
45710      # Cannot rely on the command "which" here since it doesn't always work.
45711      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45712      if test -z "$is_absolute_path"; then
45713        # Path to executable is not absolute. Find it.
45714        IFS_save="$IFS"
45715        IFS=:
45716        for p in $PATH; do
45717          if test -f "$p/$path" && test -x "$p/$path"; then
45718            new_path="$p/$path"
45719            break
45720          fi
45721        done
45722        IFS="$IFS_save"
45723      else
45724        # This is an absolute path, we can use it without further modifications.
45725        new_path="$path"
45726      fi
45727
45728      if test "x$new_path" = x; then
45729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45730$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45731        has_space=`$ECHO "$complete" | $GREP " "`
45732        if test "x$has_space" != x; then
45733          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45734$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45735        fi
45736        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45737      fi
45738    fi
45739
45740    # Now join together the path and the arguments once again
45741    if test "x$arguments" != xEOL; then
45742      new_complete="$new_path ${arguments% *}"
45743    else
45744      new_complete="$new_path"
45745    fi
45746
45747    if test "x$complete" != "x$new_complete"; then
45748      BUILD_CXX="$new_complete"
45749      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45750$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45751    fi
45752  fi
45753
45754
45755
45756  # Publish this variable in the help.
45757
45758
45759  if [ -z "${BUILD_NM+x}" ]; then
45760    # The variable is not set by user, try to locate tool using the code snippet
45761    for ac_prog in nm gcc-nm
45762do
45763  # Extract the first word of "$ac_prog", so it can be a program name with args.
45764set dummy $ac_prog; ac_word=$2
45765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45766$as_echo_n "checking for $ac_word... " >&6; }
45767if ${ac_cv_path_BUILD_NM+:} false; then :
45768  $as_echo_n "(cached) " >&6
45769else
45770  case $BUILD_NM in
45771  [\\/]* | ?:[\\/]*)
45772  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45773  ;;
45774  *)
45775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45776for as_dir in $PATH
45777do
45778  IFS=$as_save_IFS
45779  test -z "$as_dir" && as_dir=.
45780    for ac_exec_ext in '' $ac_executable_extensions; do
45781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45782    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45784    break 2
45785  fi
45786done
45787  done
45788IFS=$as_save_IFS
45789
45790  ;;
45791esac
45792fi
45793BUILD_NM=$ac_cv_path_BUILD_NM
45794if test -n "$BUILD_NM"; then
45795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45796$as_echo "$BUILD_NM" >&6; }
45797else
45798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45799$as_echo "no" >&6; }
45800fi
45801
45802
45803  test -n "$BUILD_NM" && break
45804done
45805
45806  else
45807    # The variable is set, but is it from the command line or the environment?
45808
45809    # Try to remove the string !BUILD_NM! from our list.
45810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45812      # If it failed, the variable was not from the command line. Ignore it,
45813      # but warn the user (except for BASH, which is always set by the calling BASH).
45814      if test "xBUILD_NM" != xBASH; then
45815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45816$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45817      fi
45818      # Try to locate tool using the code snippet
45819      for ac_prog in nm gcc-nm
45820do
45821  # Extract the first word of "$ac_prog", so it can be a program name with args.
45822set dummy $ac_prog; ac_word=$2
45823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45824$as_echo_n "checking for $ac_word... " >&6; }
45825if ${ac_cv_path_BUILD_NM+:} false; then :
45826  $as_echo_n "(cached) " >&6
45827else
45828  case $BUILD_NM in
45829  [\\/]* | ?:[\\/]*)
45830  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45831  ;;
45832  *)
45833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45834for as_dir in $PATH
45835do
45836  IFS=$as_save_IFS
45837  test -z "$as_dir" && as_dir=.
45838    for ac_exec_ext in '' $ac_executable_extensions; do
45839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45840    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45842    break 2
45843  fi
45844done
45845  done
45846IFS=$as_save_IFS
45847
45848  ;;
45849esac
45850fi
45851BUILD_NM=$ac_cv_path_BUILD_NM
45852if test -n "$BUILD_NM"; then
45853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45854$as_echo "$BUILD_NM" >&6; }
45855else
45856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45857$as_echo "no" >&6; }
45858fi
45859
45860
45861  test -n "$BUILD_NM" && break
45862done
45863
45864    else
45865      # If it succeeded, then it was overridden by the user. We will use it
45866      # for the tool.
45867
45868      # First remove it from the list of overridden variables, so we can test
45869      # for unknown variables in the end.
45870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45871
45872      # Check if we try to supply an empty value
45873      if test "x$BUILD_NM" = x; then
45874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45875$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45877$as_echo_n "checking for BUILD_NM... " >&6; }
45878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45879$as_echo "disabled" >&6; }
45880      else
45881        # Check if the provided tool contains a complete path.
45882        tool_specified="$BUILD_NM"
45883        tool_basename="${tool_specified##*/}"
45884        if test "x$tool_basename" = "x$tool_specified"; then
45885          # A command without a complete path is provided, search $PATH.
45886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45887$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45888          # Extract the first word of "$tool_basename", so it can be a program name with args.
45889set dummy $tool_basename; ac_word=$2
45890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45891$as_echo_n "checking for $ac_word... " >&6; }
45892if ${ac_cv_path_BUILD_NM+:} false; then :
45893  $as_echo_n "(cached) " >&6
45894else
45895  case $BUILD_NM in
45896  [\\/]* | ?:[\\/]*)
45897  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45898  ;;
45899  *)
45900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45901for as_dir in $PATH
45902do
45903  IFS=$as_save_IFS
45904  test -z "$as_dir" && as_dir=.
45905    for ac_exec_ext in '' $ac_executable_extensions; do
45906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45907    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45909    break 2
45910  fi
45911done
45912  done
45913IFS=$as_save_IFS
45914
45915  ;;
45916esac
45917fi
45918BUILD_NM=$ac_cv_path_BUILD_NM
45919if test -n "$BUILD_NM"; then
45920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45921$as_echo "$BUILD_NM" >&6; }
45922else
45923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45924$as_echo "no" >&6; }
45925fi
45926
45927
45928          if test "x$BUILD_NM" = x; then
45929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45930          fi
45931        else
45932          # Otherwise we believe it is a complete path. Use it as it is.
45933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45934$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45936$as_echo_n "checking for BUILD_NM... " >&6; }
45937          if test ! -x "$tool_specified"; then
45938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45939$as_echo "not found" >&6; }
45940            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45941          fi
45942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45943$as_echo "$tool_specified" >&6; }
45944        fi
45945      fi
45946    fi
45947
45948  fi
45949
45950
45951
45952  # Only process if variable expands to non-empty
45953
45954  if test "x$BUILD_NM" != x; then
45955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45956
45957  # First separate the path from the arguments. This will split at the first
45958  # space.
45959  complete="$BUILD_NM"
45960  path="${complete%% *}"
45961  tmp="$complete EOL"
45962  arguments="${tmp#* }"
45963
45964  # Input might be given as Windows format, start by converting to
45965  # unix format.
45966  new_path=`$CYGPATH -u "$path"`
45967
45968  # Now try to locate executable using which
45969  new_path=`$WHICH "$new_path" 2> /dev/null`
45970  # bat and cmd files are not always considered executable in cygwin causing which
45971  # to not find them
45972  if test "x$new_path" = x \
45973      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45974      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45975    new_path=`$CYGPATH -u "$path"`
45976  fi
45977  if test "x$new_path" = x; then
45978    # Oops. Which didn't find the executable.
45979    # The splitting of arguments from the executable at a space might have been incorrect,
45980    # since paths with space are more likely in Windows. Give it another try with the whole
45981    # argument.
45982    path="$complete"
45983    arguments="EOL"
45984    new_path=`$CYGPATH -u "$path"`
45985    new_path=`$WHICH "$new_path" 2> /dev/null`
45986    # bat and cmd files are not always considered executable in cygwin causing which
45987    # to not find them
45988    if test "x$new_path" = x \
45989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45991      new_path=`$CYGPATH -u "$path"`
45992    fi
45993    if test "x$new_path" = x; then
45994      # It's still not found. Now this is an unrecoverable error.
45995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45996$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45997      has_space=`$ECHO "$complete" | $GREP " "`
45998      if test "x$has_space" != x; then
45999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46001      fi
46002      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46003    fi
46004  fi
46005
46006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46009  # "foo.exe" is OK but "foo" is an error.
46010  #
46011  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46012  # It is also a way to make sure we got the proper file name for the real test later on.
46013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46014  if test "x$test_shortpath" = x; then
46015    # Short path failed, file does not exist as specified.
46016    # Try adding .exe or .cmd
46017    if test -f "${new_path}.exe"; then
46018      input_to_shortpath="${new_path}.exe"
46019    elif test -f "${new_path}.cmd"; then
46020      input_to_shortpath="${new_path}.cmd"
46021    else
46022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46023$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46024      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46025$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46026      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46027    fi
46028  else
46029    input_to_shortpath="$new_path"
46030  fi
46031
46032  # Call helper function which possibly converts this using DOS-style short mode.
46033  # If so, the updated path is stored in $new_path.
46034  new_path="$input_to_shortpath"
46035
46036  input_path="$input_to_shortpath"
46037  # Check if we need to convert this using DOS-style short mode. If the path
46038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46039  # take no chances and rewrite it.
46040  # Note: m4 eats our [], so we need to use [ and ] instead.
46041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46042  if test "x$has_forbidden_chars" != x; then
46043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46047      # Going to short mode and back again did indeed matter. Since short mode is
46048      # case insensitive, let's make it lowercase to improve readability.
46049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46050      # Now convert it back to Unix-style (cygpath)
46051      input_path=`$CYGPATH -u "$shortmode_path"`
46052      new_path="$input_path"
46053    fi
46054  fi
46055
46056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46057  if test "x$test_cygdrive_prefix" = x; then
46058    # As a simple fix, exclude /usr/bin since it's not a real path.
46059    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46061      # a path prefixed by /cygdrive for fixpath to work.
46062      new_path="$CYGWIN_ROOT_PATH$input_path"
46063    fi
46064  fi
46065
46066  # remove trailing .exe if any
46067  new_path="${new_path/%.exe/}"
46068
46069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46070
46071  # First separate the path from the arguments. This will split at the first
46072  # space.
46073  complete="$BUILD_NM"
46074  path="${complete%% *}"
46075  tmp="$complete EOL"
46076  arguments="${tmp#* }"
46077
46078  # Input might be given as Windows format, start by converting to
46079  # unix format.
46080  new_path="$path"
46081
46082  windows_path="$new_path"
46083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46084    unix_path=`$CYGPATH -u "$windows_path"`
46085    new_path="$unix_path"
46086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46088    new_path="$unix_path"
46089  fi
46090
46091
46092  # Now try to locate executable using which
46093  new_path=`$WHICH "$new_path" 2> /dev/null`
46094
46095  if test "x$new_path" = x; then
46096    # Oops. Which didn't find the executable.
46097    # The splitting of arguments from the executable at a space might have been incorrect,
46098    # since paths with space are more likely in Windows. Give it another try with the whole
46099    # argument.
46100    path="$complete"
46101    arguments="EOL"
46102    new_path="$path"
46103
46104  windows_path="$new_path"
46105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46106    unix_path=`$CYGPATH -u "$windows_path"`
46107    new_path="$unix_path"
46108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46110    new_path="$unix_path"
46111  fi
46112
46113
46114    new_path=`$WHICH "$new_path" 2> /dev/null`
46115    # bat and cmd files are not always considered executable in MSYS causing which
46116    # to not find them
46117    if test "x$new_path" = x \
46118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46120      new_path="$path"
46121
46122  windows_path="$new_path"
46123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46124    unix_path=`$CYGPATH -u "$windows_path"`
46125    new_path="$unix_path"
46126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46128    new_path="$unix_path"
46129  fi
46130
46131    fi
46132
46133    if test "x$new_path" = x; then
46134      # It's still not found. Now this is an unrecoverable error.
46135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46136$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46137      has_space=`$ECHO "$complete" | $GREP " "`
46138      if test "x$has_space" != x; then
46139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46141      fi
46142      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46143    fi
46144  fi
46145
46146  # Now new_path has a complete unix path to the binary
46147  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46148    # Keep paths in /bin as-is, but remove trailing .exe if any
46149    new_path="${new_path/%.exe/}"
46150    # Do not save /bin paths to all_fixpath_prefixes!
46151  else
46152    # Not in mixed or Windows style, start by that.
46153    new_path=`cmd //c echo $new_path`
46154
46155  input_path="$new_path"
46156  # Check if we need to convert this using DOS-style short mode. If the path
46157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46158  # take no chances and rewrite it.
46159  # Note: m4 eats our [], so we need to use [ and ] instead.
46160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46161  if test "x$has_forbidden_chars" != x; then
46162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46164  fi
46165
46166    # Output is in $new_path
46167
46168  windows_path="$new_path"
46169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46170    unix_path=`$CYGPATH -u "$windows_path"`
46171    new_path="$unix_path"
46172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46174    new_path="$unix_path"
46175  fi
46176
46177    # remove trailing .exe if any
46178    new_path="${new_path/%.exe/}"
46179
46180    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46181    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46182  fi
46183
46184    else
46185      # We're on a unix platform. Hooray! :)
46186      # First separate the path from the arguments. This will split at the first
46187      # space.
46188      complete="$BUILD_NM"
46189      path="${complete%% *}"
46190      tmp="$complete EOL"
46191      arguments="${tmp#* }"
46192
46193      # Cannot rely on the command "which" here since it doesn't always work.
46194      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46195      if test -z "$is_absolute_path"; then
46196        # Path to executable is not absolute. Find it.
46197        IFS_save="$IFS"
46198        IFS=:
46199        for p in $PATH; do
46200          if test -f "$p/$path" && test -x "$p/$path"; then
46201            new_path="$p/$path"
46202            break
46203          fi
46204        done
46205        IFS="$IFS_save"
46206      else
46207        # This is an absolute path, we can use it without further modifications.
46208        new_path="$path"
46209      fi
46210
46211      if test "x$new_path" = x; then
46212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46213$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46214        has_space=`$ECHO "$complete" | $GREP " "`
46215        if test "x$has_space" != x; then
46216          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46217$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46218        fi
46219        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46220      fi
46221    fi
46222
46223    # Now join together the path and the arguments once again
46224    if test "x$arguments" != xEOL; then
46225      new_complete="$new_path ${arguments% *}"
46226    else
46227      new_complete="$new_path"
46228    fi
46229
46230    if test "x$complete" != "x$new_complete"; then
46231      BUILD_NM="$new_complete"
46232      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46233$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46234    fi
46235  fi
46236
46237
46238
46239  # Publish this variable in the help.
46240
46241
46242  if [ -z "${BUILD_AR+x}" ]; then
46243    # The variable is not set by user, try to locate tool using the code snippet
46244    for ac_prog in ar gcc-ar
46245do
46246  # Extract the first word of "$ac_prog", so it can be a program name with args.
46247set dummy $ac_prog; ac_word=$2
46248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46249$as_echo_n "checking for $ac_word... " >&6; }
46250if ${ac_cv_path_BUILD_AR+:} false; then :
46251  $as_echo_n "(cached) " >&6
46252else
46253  case $BUILD_AR in
46254  [\\/]* | ?:[\\/]*)
46255  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46256  ;;
46257  *)
46258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46259for as_dir in $PATH
46260do
46261  IFS=$as_save_IFS
46262  test -z "$as_dir" && as_dir=.
46263    for ac_exec_ext in '' $ac_executable_extensions; do
46264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46265    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46267    break 2
46268  fi
46269done
46270  done
46271IFS=$as_save_IFS
46272
46273  ;;
46274esac
46275fi
46276BUILD_AR=$ac_cv_path_BUILD_AR
46277if test -n "$BUILD_AR"; then
46278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46279$as_echo "$BUILD_AR" >&6; }
46280else
46281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46282$as_echo "no" >&6; }
46283fi
46284
46285
46286  test -n "$BUILD_AR" && break
46287done
46288
46289  else
46290    # The variable is set, but is it from the command line or the environment?
46291
46292    # Try to remove the string !BUILD_AR! from our list.
46293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46295      # If it failed, the variable was not from the command line. Ignore it,
46296      # but warn the user (except for BASH, which is always set by the calling BASH).
46297      if test "xBUILD_AR" != xBASH; then
46298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46299$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46300      fi
46301      # Try to locate tool using the code snippet
46302      for ac_prog in ar gcc-ar
46303do
46304  # Extract the first word of "$ac_prog", so it can be a program name with args.
46305set dummy $ac_prog; ac_word=$2
46306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46307$as_echo_n "checking for $ac_word... " >&6; }
46308if ${ac_cv_path_BUILD_AR+:} false; then :
46309  $as_echo_n "(cached) " >&6
46310else
46311  case $BUILD_AR in
46312  [\\/]* | ?:[\\/]*)
46313  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46314  ;;
46315  *)
46316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46317for as_dir in $PATH
46318do
46319  IFS=$as_save_IFS
46320  test -z "$as_dir" && as_dir=.
46321    for ac_exec_ext in '' $ac_executable_extensions; do
46322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46323    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46325    break 2
46326  fi
46327done
46328  done
46329IFS=$as_save_IFS
46330
46331  ;;
46332esac
46333fi
46334BUILD_AR=$ac_cv_path_BUILD_AR
46335if test -n "$BUILD_AR"; then
46336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46337$as_echo "$BUILD_AR" >&6; }
46338else
46339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46340$as_echo "no" >&6; }
46341fi
46342
46343
46344  test -n "$BUILD_AR" && break
46345done
46346
46347    else
46348      # If it succeeded, then it was overridden by the user. We will use it
46349      # for the tool.
46350
46351      # First remove it from the list of overridden variables, so we can test
46352      # for unknown variables in the end.
46353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46354
46355      # Check if we try to supply an empty value
46356      if test "x$BUILD_AR" = x; then
46357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46358$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46360$as_echo_n "checking for BUILD_AR... " >&6; }
46361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46362$as_echo "disabled" >&6; }
46363      else
46364        # Check if the provided tool contains a complete path.
46365        tool_specified="$BUILD_AR"
46366        tool_basename="${tool_specified##*/}"
46367        if test "x$tool_basename" = "x$tool_specified"; then
46368          # A command without a complete path is provided, search $PATH.
46369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46370$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46371          # Extract the first word of "$tool_basename", so it can be a program name with args.
46372set dummy $tool_basename; ac_word=$2
46373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46374$as_echo_n "checking for $ac_word... " >&6; }
46375if ${ac_cv_path_BUILD_AR+:} false; then :
46376  $as_echo_n "(cached) " >&6
46377else
46378  case $BUILD_AR in
46379  [\\/]* | ?:[\\/]*)
46380  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46381  ;;
46382  *)
46383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46384for as_dir in $PATH
46385do
46386  IFS=$as_save_IFS
46387  test -z "$as_dir" && as_dir=.
46388    for ac_exec_ext in '' $ac_executable_extensions; do
46389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46390    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46392    break 2
46393  fi
46394done
46395  done
46396IFS=$as_save_IFS
46397
46398  ;;
46399esac
46400fi
46401BUILD_AR=$ac_cv_path_BUILD_AR
46402if test -n "$BUILD_AR"; then
46403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46404$as_echo "$BUILD_AR" >&6; }
46405else
46406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46407$as_echo "no" >&6; }
46408fi
46409
46410
46411          if test "x$BUILD_AR" = x; then
46412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46413          fi
46414        else
46415          # Otherwise we believe it is a complete path. Use it as it is.
46416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46417$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46419$as_echo_n "checking for BUILD_AR... " >&6; }
46420          if test ! -x "$tool_specified"; then
46421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46422$as_echo "not found" >&6; }
46423            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46424          fi
46425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46426$as_echo "$tool_specified" >&6; }
46427        fi
46428      fi
46429    fi
46430
46431  fi
46432
46433
46434
46435  # Only process if variable expands to non-empty
46436
46437  if test "x$BUILD_AR" != x; then
46438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46439
46440  # First separate the path from the arguments. This will split at the first
46441  # space.
46442  complete="$BUILD_AR"
46443  path="${complete%% *}"
46444  tmp="$complete EOL"
46445  arguments="${tmp#* }"
46446
46447  # Input might be given as Windows format, start by converting to
46448  # unix format.
46449  new_path=`$CYGPATH -u "$path"`
46450
46451  # Now try to locate executable using which
46452  new_path=`$WHICH "$new_path" 2> /dev/null`
46453  # bat and cmd files are not always considered executable in cygwin causing which
46454  # to not find them
46455  if test "x$new_path" = x \
46456      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46457      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46458    new_path=`$CYGPATH -u "$path"`
46459  fi
46460  if test "x$new_path" = x; then
46461    # Oops. Which didn't find the executable.
46462    # The splitting of arguments from the executable at a space might have been incorrect,
46463    # since paths with space are more likely in Windows. Give it another try with the whole
46464    # argument.
46465    path="$complete"
46466    arguments="EOL"
46467    new_path=`$CYGPATH -u "$path"`
46468    new_path=`$WHICH "$new_path" 2> /dev/null`
46469    # bat and cmd files are not always considered executable in cygwin causing which
46470    # to not find them
46471    if test "x$new_path" = x \
46472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46474      new_path=`$CYGPATH -u "$path"`
46475    fi
46476    if test "x$new_path" = x; then
46477      # It's still not found. Now this is an unrecoverable error.
46478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46479$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46480      has_space=`$ECHO "$complete" | $GREP " "`
46481      if test "x$has_space" != x; then
46482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46484      fi
46485      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46486    fi
46487  fi
46488
46489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46492  # "foo.exe" is OK but "foo" is an error.
46493  #
46494  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46495  # It is also a way to make sure we got the proper file name for the real test later on.
46496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46497  if test "x$test_shortpath" = x; then
46498    # Short path failed, file does not exist as specified.
46499    # Try adding .exe or .cmd
46500    if test -f "${new_path}.exe"; then
46501      input_to_shortpath="${new_path}.exe"
46502    elif test -f "${new_path}.cmd"; then
46503      input_to_shortpath="${new_path}.cmd"
46504    else
46505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46506$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46509      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46510    fi
46511  else
46512    input_to_shortpath="$new_path"
46513  fi
46514
46515  # Call helper function which possibly converts this using DOS-style short mode.
46516  # If so, the updated path is stored in $new_path.
46517  new_path="$input_to_shortpath"
46518
46519  input_path="$input_to_shortpath"
46520  # Check if we need to convert this using DOS-style short mode. If the path
46521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46522  # take no chances and rewrite it.
46523  # Note: m4 eats our [], so we need to use [ and ] instead.
46524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46525  if test "x$has_forbidden_chars" != x; then
46526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46530      # Going to short mode and back again did indeed matter. Since short mode is
46531      # case insensitive, let's make it lowercase to improve readability.
46532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46533      # Now convert it back to Unix-style (cygpath)
46534      input_path=`$CYGPATH -u "$shortmode_path"`
46535      new_path="$input_path"
46536    fi
46537  fi
46538
46539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46540  if test "x$test_cygdrive_prefix" = x; then
46541    # As a simple fix, exclude /usr/bin since it's not a real path.
46542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46544      # a path prefixed by /cygdrive for fixpath to work.
46545      new_path="$CYGWIN_ROOT_PATH$input_path"
46546    fi
46547  fi
46548
46549  # remove trailing .exe if any
46550  new_path="${new_path/%.exe/}"
46551
46552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46553
46554  # First separate the path from the arguments. This will split at the first
46555  # space.
46556  complete="$BUILD_AR"
46557  path="${complete%% *}"
46558  tmp="$complete EOL"
46559  arguments="${tmp#* }"
46560
46561  # Input might be given as Windows format, start by converting to
46562  # unix format.
46563  new_path="$path"
46564
46565  windows_path="$new_path"
46566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46567    unix_path=`$CYGPATH -u "$windows_path"`
46568    new_path="$unix_path"
46569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46571    new_path="$unix_path"
46572  fi
46573
46574
46575  # Now try to locate executable using which
46576  new_path=`$WHICH "$new_path" 2> /dev/null`
46577
46578  if test "x$new_path" = x; then
46579    # Oops. Which didn't find the executable.
46580    # The splitting of arguments from the executable at a space might have been incorrect,
46581    # since paths with space are more likely in Windows. Give it another try with the whole
46582    # argument.
46583    path="$complete"
46584    arguments="EOL"
46585    new_path="$path"
46586
46587  windows_path="$new_path"
46588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46589    unix_path=`$CYGPATH -u "$windows_path"`
46590    new_path="$unix_path"
46591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46593    new_path="$unix_path"
46594  fi
46595
46596
46597    new_path=`$WHICH "$new_path" 2> /dev/null`
46598    # bat and cmd files are not always considered executable in MSYS causing which
46599    # to not find them
46600    if test "x$new_path" = x \
46601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46603      new_path="$path"
46604
46605  windows_path="$new_path"
46606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46607    unix_path=`$CYGPATH -u "$windows_path"`
46608    new_path="$unix_path"
46609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46611    new_path="$unix_path"
46612  fi
46613
46614    fi
46615
46616    if test "x$new_path" = x; then
46617      # It's still not found. Now this is an unrecoverable error.
46618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46619$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46620      has_space=`$ECHO "$complete" | $GREP " "`
46621      if test "x$has_space" != x; then
46622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46624      fi
46625      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46626    fi
46627  fi
46628
46629  # Now new_path has a complete unix path to the binary
46630  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46631    # Keep paths in /bin as-is, but remove trailing .exe if any
46632    new_path="${new_path/%.exe/}"
46633    # Do not save /bin paths to all_fixpath_prefixes!
46634  else
46635    # Not in mixed or Windows style, start by that.
46636    new_path=`cmd //c echo $new_path`
46637
46638  input_path="$new_path"
46639  # Check if we need to convert this using DOS-style short mode. If the path
46640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46641  # take no chances and rewrite it.
46642  # Note: m4 eats our [], so we need to use [ and ] instead.
46643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46644  if test "x$has_forbidden_chars" != x; then
46645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46647  fi
46648
46649    # Output is in $new_path
46650
46651  windows_path="$new_path"
46652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46653    unix_path=`$CYGPATH -u "$windows_path"`
46654    new_path="$unix_path"
46655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46657    new_path="$unix_path"
46658  fi
46659
46660    # remove trailing .exe if any
46661    new_path="${new_path/%.exe/}"
46662
46663    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46664    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46665  fi
46666
46667    else
46668      # We're on a unix platform. Hooray! :)
46669      # First separate the path from the arguments. This will split at the first
46670      # space.
46671      complete="$BUILD_AR"
46672      path="${complete%% *}"
46673      tmp="$complete EOL"
46674      arguments="${tmp#* }"
46675
46676      # Cannot rely on the command "which" here since it doesn't always work.
46677      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46678      if test -z "$is_absolute_path"; then
46679        # Path to executable is not absolute. Find it.
46680        IFS_save="$IFS"
46681        IFS=:
46682        for p in $PATH; do
46683          if test -f "$p/$path" && test -x "$p/$path"; then
46684            new_path="$p/$path"
46685            break
46686          fi
46687        done
46688        IFS="$IFS_save"
46689      else
46690        # This is an absolute path, we can use it without further modifications.
46691        new_path="$path"
46692      fi
46693
46694      if test "x$new_path" = x; then
46695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46696$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46697        has_space=`$ECHO "$complete" | $GREP " "`
46698        if test "x$has_space" != x; then
46699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46701        fi
46702        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46703      fi
46704    fi
46705
46706    # Now join together the path and the arguments once again
46707    if test "x$arguments" != xEOL; then
46708      new_complete="$new_path ${arguments% *}"
46709    else
46710      new_complete="$new_path"
46711    fi
46712
46713    if test "x$complete" != "x$new_complete"; then
46714      BUILD_AR="$new_complete"
46715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46716$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46717    fi
46718  fi
46719
46720
46721
46722  # Publish this variable in the help.
46723
46724
46725  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46726    # The variable is not set by user, try to locate tool using the code snippet
46727    for ac_prog in objcopy
46728do
46729  # Extract the first word of "$ac_prog", so it can be a program name with args.
46730set dummy $ac_prog; ac_word=$2
46731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46732$as_echo_n "checking for $ac_word... " >&6; }
46733if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46734  $as_echo_n "(cached) " >&6
46735else
46736  case $BUILD_OBJCOPY in
46737  [\\/]* | ?:[\\/]*)
46738  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46739  ;;
46740  *)
46741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46742for as_dir in $PATH
46743do
46744  IFS=$as_save_IFS
46745  test -z "$as_dir" && as_dir=.
46746    for ac_exec_ext in '' $ac_executable_extensions; do
46747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46748    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46750    break 2
46751  fi
46752done
46753  done
46754IFS=$as_save_IFS
46755
46756  ;;
46757esac
46758fi
46759BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46760if test -n "$BUILD_OBJCOPY"; then
46761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46762$as_echo "$BUILD_OBJCOPY" >&6; }
46763else
46764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46765$as_echo "no" >&6; }
46766fi
46767
46768
46769  test -n "$BUILD_OBJCOPY" && break
46770done
46771
46772  else
46773    # The variable is set, but is it from the command line or the environment?
46774
46775    # Try to remove the string !BUILD_OBJCOPY! from our list.
46776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46778      # If it failed, the variable was not from the command line. Ignore it,
46779      # but warn the user (except for BASH, which is always set by the calling BASH).
46780      if test "xBUILD_OBJCOPY" != xBASH; then
46781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46782$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46783      fi
46784      # Try to locate tool using the code snippet
46785      for ac_prog in objcopy
46786do
46787  # Extract the first word of "$ac_prog", so it can be a program name with args.
46788set dummy $ac_prog; ac_word=$2
46789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46790$as_echo_n "checking for $ac_word... " >&6; }
46791if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46792  $as_echo_n "(cached) " >&6
46793else
46794  case $BUILD_OBJCOPY in
46795  [\\/]* | ?:[\\/]*)
46796  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46797  ;;
46798  *)
46799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46800for as_dir in $PATH
46801do
46802  IFS=$as_save_IFS
46803  test -z "$as_dir" && as_dir=.
46804    for ac_exec_ext in '' $ac_executable_extensions; do
46805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46806    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46808    break 2
46809  fi
46810done
46811  done
46812IFS=$as_save_IFS
46813
46814  ;;
46815esac
46816fi
46817BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46818if test -n "$BUILD_OBJCOPY"; then
46819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46820$as_echo "$BUILD_OBJCOPY" >&6; }
46821else
46822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46823$as_echo "no" >&6; }
46824fi
46825
46826
46827  test -n "$BUILD_OBJCOPY" && break
46828done
46829
46830    else
46831      # If it succeeded, then it was overridden by the user. We will use it
46832      # for the tool.
46833
46834      # First remove it from the list of overridden variables, so we can test
46835      # for unknown variables in the end.
46836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46837
46838      # Check if we try to supply an empty value
46839      if test "x$BUILD_OBJCOPY" = x; then
46840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46841$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46843$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46845$as_echo "disabled" >&6; }
46846      else
46847        # Check if the provided tool contains a complete path.
46848        tool_specified="$BUILD_OBJCOPY"
46849        tool_basename="${tool_specified##*/}"
46850        if test "x$tool_basename" = "x$tool_specified"; then
46851          # A command without a complete path is provided, search $PATH.
46852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46853$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46854          # Extract the first word of "$tool_basename", so it can be a program name with args.
46855set dummy $tool_basename; ac_word=$2
46856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46857$as_echo_n "checking for $ac_word... " >&6; }
46858if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46859  $as_echo_n "(cached) " >&6
46860else
46861  case $BUILD_OBJCOPY in
46862  [\\/]* | ?:[\\/]*)
46863  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46864  ;;
46865  *)
46866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46867for as_dir in $PATH
46868do
46869  IFS=$as_save_IFS
46870  test -z "$as_dir" && as_dir=.
46871    for ac_exec_ext in '' $ac_executable_extensions; do
46872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46873    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46875    break 2
46876  fi
46877done
46878  done
46879IFS=$as_save_IFS
46880
46881  ;;
46882esac
46883fi
46884BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46885if test -n "$BUILD_OBJCOPY"; then
46886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46887$as_echo "$BUILD_OBJCOPY" >&6; }
46888else
46889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46890$as_echo "no" >&6; }
46891fi
46892
46893
46894          if test "x$BUILD_OBJCOPY" = x; then
46895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46896          fi
46897        else
46898          # Otherwise we believe it is a complete path. Use it as it is.
46899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46900$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46902$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46903          if test ! -x "$tool_specified"; then
46904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46905$as_echo "not found" >&6; }
46906            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46907          fi
46908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46909$as_echo "$tool_specified" >&6; }
46910        fi
46911      fi
46912    fi
46913
46914  fi
46915
46916
46917
46918  # Only process if variable expands to non-empty
46919
46920  if test "x$BUILD_OBJCOPY" != x; then
46921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46922
46923  # First separate the path from the arguments. This will split at the first
46924  # space.
46925  complete="$BUILD_OBJCOPY"
46926  path="${complete%% *}"
46927  tmp="$complete EOL"
46928  arguments="${tmp#* }"
46929
46930  # Input might be given as Windows format, start by converting to
46931  # unix format.
46932  new_path=`$CYGPATH -u "$path"`
46933
46934  # Now try to locate executable using which
46935  new_path=`$WHICH "$new_path" 2> /dev/null`
46936  # bat and cmd files are not always considered executable in cygwin causing which
46937  # to not find them
46938  if test "x$new_path" = x \
46939      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46940      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46941    new_path=`$CYGPATH -u "$path"`
46942  fi
46943  if test "x$new_path" = x; then
46944    # Oops. Which didn't find the executable.
46945    # The splitting of arguments from the executable at a space might have been incorrect,
46946    # since paths with space are more likely in Windows. Give it another try with the whole
46947    # argument.
46948    path="$complete"
46949    arguments="EOL"
46950    new_path=`$CYGPATH -u "$path"`
46951    new_path=`$WHICH "$new_path" 2> /dev/null`
46952    # bat and cmd files are not always considered executable in cygwin causing which
46953    # to not find them
46954    if test "x$new_path" = x \
46955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46957      new_path=`$CYGPATH -u "$path"`
46958    fi
46959    if test "x$new_path" = x; then
46960      # It's still not found. Now this is an unrecoverable error.
46961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46962$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46963      has_space=`$ECHO "$complete" | $GREP " "`
46964      if test "x$has_space" != x; then
46965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46967      fi
46968      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46969    fi
46970  fi
46971
46972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46975  # "foo.exe" is OK but "foo" is an error.
46976  #
46977  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46978  # It is also a way to make sure we got the proper file name for the real test later on.
46979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46980  if test "x$test_shortpath" = x; then
46981    # Short path failed, file does not exist as specified.
46982    # Try adding .exe or .cmd
46983    if test -f "${new_path}.exe"; then
46984      input_to_shortpath="${new_path}.exe"
46985    elif test -f "${new_path}.cmd"; then
46986      input_to_shortpath="${new_path}.cmd"
46987    else
46988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46989$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46990      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46991$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46992      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46993    fi
46994  else
46995    input_to_shortpath="$new_path"
46996  fi
46997
46998  # Call helper function which possibly converts this using DOS-style short mode.
46999  # If so, the updated path is stored in $new_path.
47000  new_path="$input_to_shortpath"
47001
47002  input_path="$input_to_shortpath"
47003  # Check if we need to convert this using DOS-style short mode. If the path
47004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47005  # take no chances and rewrite it.
47006  # Note: m4 eats our [], so we need to use [ and ] instead.
47007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47008  if test "x$has_forbidden_chars" != x; then
47009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47013      # Going to short mode and back again did indeed matter. Since short mode is
47014      # case insensitive, let's make it lowercase to improve readability.
47015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47016      # Now convert it back to Unix-style (cygpath)
47017      input_path=`$CYGPATH -u "$shortmode_path"`
47018      new_path="$input_path"
47019    fi
47020  fi
47021
47022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47023  if test "x$test_cygdrive_prefix" = x; then
47024    # As a simple fix, exclude /usr/bin since it's not a real path.
47025    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47027      # a path prefixed by /cygdrive for fixpath to work.
47028      new_path="$CYGWIN_ROOT_PATH$input_path"
47029    fi
47030  fi
47031
47032  # remove trailing .exe if any
47033  new_path="${new_path/%.exe/}"
47034
47035    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47036
47037  # First separate the path from the arguments. This will split at the first
47038  # space.
47039  complete="$BUILD_OBJCOPY"
47040  path="${complete%% *}"
47041  tmp="$complete EOL"
47042  arguments="${tmp#* }"
47043
47044  # Input might be given as Windows format, start by converting to
47045  # unix format.
47046  new_path="$path"
47047
47048  windows_path="$new_path"
47049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47050    unix_path=`$CYGPATH -u "$windows_path"`
47051    new_path="$unix_path"
47052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47054    new_path="$unix_path"
47055  fi
47056
47057
47058  # Now try to locate executable using which
47059  new_path=`$WHICH "$new_path" 2> /dev/null`
47060
47061  if test "x$new_path" = x; then
47062    # Oops. Which didn't find the executable.
47063    # The splitting of arguments from the executable at a space might have been incorrect,
47064    # since paths with space are more likely in Windows. Give it another try with the whole
47065    # argument.
47066    path="$complete"
47067    arguments="EOL"
47068    new_path="$path"
47069
47070  windows_path="$new_path"
47071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47072    unix_path=`$CYGPATH -u "$windows_path"`
47073    new_path="$unix_path"
47074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47076    new_path="$unix_path"
47077  fi
47078
47079
47080    new_path=`$WHICH "$new_path" 2> /dev/null`
47081    # bat and cmd files are not always considered executable in MSYS causing which
47082    # to not find them
47083    if test "x$new_path" = x \
47084        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47085        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47086      new_path="$path"
47087
47088  windows_path="$new_path"
47089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47090    unix_path=`$CYGPATH -u "$windows_path"`
47091    new_path="$unix_path"
47092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47094    new_path="$unix_path"
47095  fi
47096
47097    fi
47098
47099    if test "x$new_path" = x; then
47100      # It's still not found. Now this is an unrecoverable error.
47101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47102$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47103      has_space=`$ECHO "$complete" | $GREP " "`
47104      if test "x$has_space" != x; then
47105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47107      fi
47108      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47109    fi
47110  fi
47111
47112  # Now new_path has a complete unix path to the binary
47113  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47114    # Keep paths in /bin as-is, but remove trailing .exe if any
47115    new_path="${new_path/%.exe/}"
47116    # Do not save /bin paths to all_fixpath_prefixes!
47117  else
47118    # Not in mixed or Windows style, start by that.
47119    new_path=`cmd //c echo $new_path`
47120
47121  input_path="$new_path"
47122  # Check if we need to convert this using DOS-style short mode. If the path
47123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47124  # take no chances and rewrite it.
47125  # Note: m4 eats our [], so we need to use [ and ] instead.
47126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47127  if test "x$has_forbidden_chars" != x; then
47128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47129    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47130  fi
47131
47132    # Output is in $new_path
47133
47134  windows_path="$new_path"
47135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47136    unix_path=`$CYGPATH -u "$windows_path"`
47137    new_path="$unix_path"
47138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47140    new_path="$unix_path"
47141  fi
47142
47143    # remove trailing .exe if any
47144    new_path="${new_path/%.exe/}"
47145
47146    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47147    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47148  fi
47149
47150    else
47151      # We're on a unix platform. Hooray! :)
47152      # First separate the path from the arguments. This will split at the first
47153      # space.
47154      complete="$BUILD_OBJCOPY"
47155      path="${complete%% *}"
47156      tmp="$complete EOL"
47157      arguments="${tmp#* }"
47158
47159      # Cannot rely on the command "which" here since it doesn't always work.
47160      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47161      if test -z "$is_absolute_path"; then
47162        # Path to executable is not absolute. Find it.
47163        IFS_save="$IFS"
47164        IFS=:
47165        for p in $PATH; do
47166          if test -f "$p/$path" && test -x "$p/$path"; then
47167            new_path="$p/$path"
47168            break
47169          fi
47170        done
47171        IFS="$IFS_save"
47172      else
47173        # This is an absolute path, we can use it without further modifications.
47174        new_path="$path"
47175      fi
47176
47177      if test "x$new_path" = x; then
47178        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47179$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47180        has_space=`$ECHO "$complete" | $GREP " "`
47181        if test "x$has_space" != x; then
47182          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47183$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47184        fi
47185        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47186      fi
47187    fi
47188
47189    # Now join together the path and the arguments once again
47190    if test "x$arguments" != xEOL; then
47191      new_complete="$new_path ${arguments% *}"
47192    else
47193      new_complete="$new_path"
47194    fi
47195
47196    if test "x$complete" != "x$new_complete"; then
47197      BUILD_OBJCOPY="$new_complete"
47198      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47199$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47200    fi
47201  fi
47202
47203
47204
47205  # Publish this variable in the help.
47206
47207
47208  if [ -z "${BUILD_STRIP+x}" ]; then
47209    # The variable is not set by user, try to locate tool using the code snippet
47210    for ac_prog in strip
47211do
47212  # Extract the first word of "$ac_prog", so it can be a program name with args.
47213set dummy $ac_prog; ac_word=$2
47214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47215$as_echo_n "checking for $ac_word... " >&6; }
47216if ${ac_cv_path_BUILD_STRIP+:} false; then :
47217  $as_echo_n "(cached) " >&6
47218else
47219  case $BUILD_STRIP in
47220  [\\/]* | ?:[\\/]*)
47221  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47222  ;;
47223  *)
47224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47225for as_dir in $PATH
47226do
47227  IFS=$as_save_IFS
47228  test -z "$as_dir" && as_dir=.
47229    for ac_exec_ext in '' $ac_executable_extensions; do
47230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47231    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47233    break 2
47234  fi
47235done
47236  done
47237IFS=$as_save_IFS
47238
47239  ;;
47240esac
47241fi
47242BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47243if test -n "$BUILD_STRIP"; then
47244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47245$as_echo "$BUILD_STRIP" >&6; }
47246else
47247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47248$as_echo "no" >&6; }
47249fi
47250
47251
47252  test -n "$BUILD_STRIP" && break
47253done
47254
47255  else
47256    # The variable is set, but is it from the command line or the environment?
47257
47258    # Try to remove the string !BUILD_STRIP! from our list.
47259    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47260    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47261      # If it failed, the variable was not from the command line. Ignore it,
47262      # but warn the user (except for BASH, which is always set by the calling BASH).
47263      if test "xBUILD_STRIP" != xBASH; then
47264        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47265$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47266      fi
47267      # Try to locate tool using the code snippet
47268      for ac_prog in strip
47269do
47270  # Extract the first word of "$ac_prog", so it can be a program name with args.
47271set dummy $ac_prog; ac_word=$2
47272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47273$as_echo_n "checking for $ac_word... " >&6; }
47274if ${ac_cv_path_BUILD_STRIP+:} false; then :
47275  $as_echo_n "(cached) " >&6
47276else
47277  case $BUILD_STRIP in
47278  [\\/]* | ?:[\\/]*)
47279  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47280  ;;
47281  *)
47282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47283for as_dir in $PATH
47284do
47285  IFS=$as_save_IFS
47286  test -z "$as_dir" && as_dir=.
47287    for ac_exec_ext in '' $ac_executable_extensions; do
47288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47289    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47291    break 2
47292  fi
47293done
47294  done
47295IFS=$as_save_IFS
47296
47297  ;;
47298esac
47299fi
47300BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47301if test -n "$BUILD_STRIP"; then
47302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47303$as_echo "$BUILD_STRIP" >&6; }
47304else
47305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47306$as_echo "no" >&6; }
47307fi
47308
47309
47310  test -n "$BUILD_STRIP" && break
47311done
47312
47313    else
47314      # If it succeeded, then it was overridden by the user. We will use it
47315      # for the tool.
47316
47317      # First remove it from the list of overridden variables, so we can test
47318      # for unknown variables in the end.
47319      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47320
47321      # Check if we try to supply an empty value
47322      if test "x$BUILD_STRIP" = x; then
47323        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47324$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47326$as_echo_n "checking for BUILD_STRIP... " >&6; }
47327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47328$as_echo "disabled" >&6; }
47329      else
47330        # Check if the provided tool contains a complete path.
47331        tool_specified="$BUILD_STRIP"
47332        tool_basename="${tool_specified##*/}"
47333        if test "x$tool_basename" = "x$tool_specified"; then
47334          # A command without a complete path is provided, search $PATH.
47335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47336$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47337          # Extract the first word of "$tool_basename", so it can be a program name with args.
47338set dummy $tool_basename; ac_word=$2
47339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47340$as_echo_n "checking for $ac_word... " >&6; }
47341if ${ac_cv_path_BUILD_STRIP+:} false; then :
47342  $as_echo_n "(cached) " >&6
47343else
47344  case $BUILD_STRIP in
47345  [\\/]* | ?:[\\/]*)
47346  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47347  ;;
47348  *)
47349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47350for as_dir in $PATH
47351do
47352  IFS=$as_save_IFS
47353  test -z "$as_dir" && as_dir=.
47354    for ac_exec_ext in '' $ac_executable_extensions; do
47355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47356    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47358    break 2
47359  fi
47360done
47361  done
47362IFS=$as_save_IFS
47363
47364  ;;
47365esac
47366fi
47367BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47368if test -n "$BUILD_STRIP"; then
47369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47370$as_echo "$BUILD_STRIP" >&6; }
47371else
47372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47373$as_echo "no" >&6; }
47374fi
47375
47376
47377          if test "x$BUILD_STRIP" = x; then
47378            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47379          fi
47380        else
47381          # Otherwise we believe it is a complete path. Use it as it is.
47382          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47383$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47384          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47385$as_echo_n "checking for BUILD_STRIP... " >&6; }
47386          if test ! -x "$tool_specified"; then
47387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47388$as_echo "not found" >&6; }
47389            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47390          fi
47391          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47392$as_echo "$tool_specified" >&6; }
47393        fi
47394      fi
47395    fi
47396
47397  fi
47398
47399
47400
47401  # Only process if variable expands to non-empty
47402
47403  if test "x$BUILD_STRIP" != x; then
47404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47405
47406  # First separate the path from the arguments. This will split at the first
47407  # space.
47408  complete="$BUILD_STRIP"
47409  path="${complete%% *}"
47410  tmp="$complete EOL"
47411  arguments="${tmp#* }"
47412
47413  # Input might be given as Windows format, start by converting to
47414  # unix format.
47415  new_path=`$CYGPATH -u "$path"`
47416
47417  # Now try to locate executable using which
47418  new_path=`$WHICH "$new_path" 2> /dev/null`
47419  # bat and cmd files are not always considered executable in cygwin causing which
47420  # to not find them
47421  if test "x$new_path" = x \
47422      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47423      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47424    new_path=`$CYGPATH -u "$path"`
47425  fi
47426  if test "x$new_path" = x; then
47427    # Oops. Which didn't find the executable.
47428    # The splitting of arguments from the executable at a space might have been incorrect,
47429    # since paths with space are more likely in Windows. Give it another try with the whole
47430    # argument.
47431    path="$complete"
47432    arguments="EOL"
47433    new_path=`$CYGPATH -u "$path"`
47434    new_path=`$WHICH "$new_path" 2> /dev/null`
47435    # bat and cmd files are not always considered executable in cygwin causing which
47436    # to not find them
47437    if test "x$new_path" = x \
47438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47440      new_path=`$CYGPATH -u "$path"`
47441    fi
47442    if test "x$new_path" = x; then
47443      # It's still not found. Now this is an unrecoverable error.
47444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47445$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47446      has_space=`$ECHO "$complete" | $GREP " "`
47447      if test "x$has_space" != x; then
47448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47450      fi
47451      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47452    fi
47453  fi
47454
47455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47458  # "foo.exe" is OK but "foo" is an error.
47459  #
47460  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47461  # It is also a way to make sure we got the proper file name for the real test later on.
47462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47463  if test "x$test_shortpath" = x; then
47464    # Short path failed, file does not exist as specified.
47465    # Try adding .exe or .cmd
47466    if test -f "${new_path}.exe"; then
47467      input_to_shortpath="${new_path}.exe"
47468    elif test -f "${new_path}.cmd"; then
47469      input_to_shortpath="${new_path}.cmd"
47470    else
47471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47472$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47473      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47474$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47475      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47476    fi
47477  else
47478    input_to_shortpath="$new_path"
47479  fi
47480
47481  # Call helper function which possibly converts this using DOS-style short mode.
47482  # If so, the updated path is stored in $new_path.
47483  new_path="$input_to_shortpath"
47484
47485  input_path="$input_to_shortpath"
47486  # Check if we need to convert this using DOS-style short mode. If the path
47487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47488  # take no chances and rewrite it.
47489  # Note: m4 eats our [], so we need to use [ and ] instead.
47490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47491  if test "x$has_forbidden_chars" != x; then
47492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47493    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47494    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47495    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47496      # Going to short mode and back again did indeed matter. Since short mode is
47497      # case insensitive, let's make it lowercase to improve readability.
47498      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47499      # Now convert it back to Unix-style (cygpath)
47500      input_path=`$CYGPATH -u "$shortmode_path"`
47501      new_path="$input_path"
47502    fi
47503  fi
47504
47505  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47506  if test "x$test_cygdrive_prefix" = x; then
47507    # As a simple fix, exclude /usr/bin since it's not a real path.
47508    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47509      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47510      # a path prefixed by /cygdrive for fixpath to work.
47511      new_path="$CYGWIN_ROOT_PATH$input_path"
47512    fi
47513  fi
47514
47515  # remove trailing .exe if any
47516  new_path="${new_path/%.exe/}"
47517
47518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47519
47520  # First separate the path from the arguments. This will split at the first
47521  # space.
47522  complete="$BUILD_STRIP"
47523  path="${complete%% *}"
47524  tmp="$complete EOL"
47525  arguments="${tmp#* }"
47526
47527  # Input might be given as Windows format, start by converting to
47528  # unix format.
47529  new_path="$path"
47530
47531  windows_path="$new_path"
47532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47533    unix_path=`$CYGPATH -u "$windows_path"`
47534    new_path="$unix_path"
47535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47537    new_path="$unix_path"
47538  fi
47539
47540
47541  # Now try to locate executable using which
47542  new_path=`$WHICH "$new_path" 2> /dev/null`
47543
47544  if test "x$new_path" = x; then
47545    # Oops. Which didn't find the executable.
47546    # The splitting of arguments from the executable at a space might have been incorrect,
47547    # since paths with space are more likely in Windows. Give it another try with the whole
47548    # argument.
47549    path="$complete"
47550    arguments="EOL"
47551    new_path="$path"
47552
47553  windows_path="$new_path"
47554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47555    unix_path=`$CYGPATH -u "$windows_path"`
47556    new_path="$unix_path"
47557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47559    new_path="$unix_path"
47560  fi
47561
47562
47563    new_path=`$WHICH "$new_path" 2> /dev/null`
47564    # bat and cmd files are not always considered executable in MSYS causing which
47565    # to not find them
47566    if test "x$new_path" = x \
47567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47569      new_path="$path"
47570
47571  windows_path="$new_path"
47572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47573    unix_path=`$CYGPATH -u "$windows_path"`
47574    new_path="$unix_path"
47575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47577    new_path="$unix_path"
47578  fi
47579
47580    fi
47581
47582    if test "x$new_path" = x; then
47583      # It's still not found. Now this is an unrecoverable error.
47584      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47585$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47586      has_space=`$ECHO "$complete" | $GREP " "`
47587      if test "x$has_space" != x; then
47588        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47589$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47590      fi
47591      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47592    fi
47593  fi
47594
47595  # Now new_path has a complete unix path to the binary
47596  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47597    # Keep paths in /bin as-is, but remove trailing .exe if any
47598    new_path="${new_path/%.exe/}"
47599    # Do not save /bin paths to all_fixpath_prefixes!
47600  else
47601    # Not in mixed or Windows style, start by that.
47602    new_path=`cmd //c echo $new_path`
47603
47604  input_path="$new_path"
47605  # Check if we need to convert this using DOS-style short mode. If the path
47606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47607  # take no chances and rewrite it.
47608  # Note: m4 eats our [], so we need to use [ and ] instead.
47609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47610  if test "x$has_forbidden_chars" != x; then
47611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47613  fi
47614
47615    # Output is in $new_path
47616
47617  windows_path="$new_path"
47618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47619    unix_path=`$CYGPATH -u "$windows_path"`
47620    new_path="$unix_path"
47621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47623    new_path="$unix_path"
47624  fi
47625
47626    # remove trailing .exe if any
47627    new_path="${new_path/%.exe/}"
47628
47629    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47630    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47631  fi
47632
47633    else
47634      # We're on a unix platform. Hooray! :)
47635      # First separate the path from the arguments. This will split at the first
47636      # space.
47637      complete="$BUILD_STRIP"
47638      path="${complete%% *}"
47639      tmp="$complete EOL"
47640      arguments="${tmp#* }"
47641
47642      # Cannot rely on the command "which" here since it doesn't always work.
47643      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47644      if test -z "$is_absolute_path"; then
47645        # Path to executable is not absolute. Find it.
47646        IFS_save="$IFS"
47647        IFS=:
47648        for p in $PATH; do
47649          if test -f "$p/$path" && test -x "$p/$path"; then
47650            new_path="$p/$path"
47651            break
47652          fi
47653        done
47654        IFS="$IFS_save"
47655      else
47656        # This is an absolute path, we can use it without further modifications.
47657        new_path="$path"
47658      fi
47659
47660      if test "x$new_path" = x; then
47661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47662$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47663        has_space=`$ECHO "$complete" | $GREP " "`
47664        if test "x$has_space" != x; then
47665          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47666$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47667        fi
47668        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47669      fi
47670    fi
47671
47672    # Now join together the path and the arguments once again
47673    if test "x$arguments" != xEOL; then
47674      new_complete="$new_path ${arguments% *}"
47675    else
47676      new_complete="$new_path"
47677    fi
47678
47679    if test "x$complete" != "x$new_complete"; then
47680      BUILD_STRIP="$new_complete"
47681      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47682$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47683    fi
47684  fi
47685
47686    # Assume the C compiler is the assembler
47687    BUILD_AS="$BUILD_CC -c"
47688    # Just like for the target compiler, use the compiler as linker
47689    BUILD_LD="$BUILD_CC"
47690    BUILD_LDCXX="$BUILD_CXX"
47691
47692    PATH="$OLDPATH"
47693
47694
47695  COMPILER=$BUILD_CC
47696  COMPILER_NAME=BuildC
47697
47698  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47699    # cc -V output typically looks like
47700    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47701    # or
47702    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47703    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47704    # Check that this is likely to be the Solaris Studio cc.
47705    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47706    if test $? -ne 0; then
47707      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47708      { $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
47709$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47710      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47711$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47712      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47713$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47714      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47715    fi
47716    # Remove usage instructions (if present), and
47717    # collapse compiler output into a single line
47718    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47719        $SED -e 's/ *[Uu]sage:.*//'`
47720    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47721        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47722  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47723    # xlc -qversion output typically looks like
47724    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47725    #     Version: 11.01.0000.0015
47726    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47727    # Check that this is likely to be the IBM XL C compiler.
47728    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47729    if test $? -ne 0; then
47730      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47731      { $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
47732$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47733      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47734$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47735      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47736$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47737      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47738    fi
47739    # Collapse compiler output into a single line
47740    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47741    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47742        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47743  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47744    # There is no specific version flag, but all output starts with a version string.
47745    # First line typically looks something like:
47746    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47747    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47748    # Check that this is likely to be Microsoft CL.EXE.
47749    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47750    if test $? -ne 0; then
47751      { $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
47752$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47753      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47754$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47755      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47756    fi
47757    # Collapse compiler output into a single line
47758    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47759    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47760        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47761  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47762    # gcc --version output typically looks like
47763    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47764    #     Copyright (C) 2013 Free Software Foundation, Inc.
47765    #     This is free software; see the source for copying conditions.  There is NO
47766    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47767    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47768    # Check that this is likely to be GCC.
47769    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47770    if test $? -ne 0; then
47771      { $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
47772$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47773      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47774$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47775      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47776    fi
47777    # Remove Copyright and legalese from version string, and
47778    # collapse into a single line
47779    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47780        $SED -e 's/ *Copyright .*//'`
47781    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47782        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47783  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47784    # clang --version output typically looks like
47785    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47786    #    clang version 3.3 (tags/RELEASE_33/final)
47787    # or
47788    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47789    #    Target: x86_64-pc-linux-gnu
47790    #    Thread model: posix
47791    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47792    # Check that this is likely to be clang
47793    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47794    if test $? -ne 0; then
47795      { $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
47796$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47797      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47798$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47799      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47800    fi
47801    # Collapse compiler output into a single line
47802    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47803    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47804        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47805  else
47806      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47807  fi
47808  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47809  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47810  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47811  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47812
47813  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47814$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47815
47816
47817  COMPILER=$BUILD_CXX
47818  COMPILER_NAME=BuildC++
47819
47820  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47821    # cc -V output typically looks like
47822    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47823    # or
47824    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47825    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47826    # Check that this is likely to be the Solaris Studio cc.
47827    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47828    if test $? -ne 0; then
47829      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47830      { $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
47831$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47832      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47833$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47834      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47835$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47836      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47837    fi
47838    # Remove usage instructions (if present), and
47839    # collapse compiler output into a single line
47840    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47841        $SED -e 's/ *[Uu]sage:.*//'`
47842    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47843        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47844  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47845    # xlc -qversion output typically looks like
47846    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47847    #     Version: 11.01.0000.0015
47848    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47849    # Check that this is likely to be the IBM XL C compiler.
47850    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47851    if test $? -ne 0; then
47852      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47853      { $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
47854$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47855      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47856$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47857      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47858$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47859      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47860    fi
47861    # Collapse compiler output into a single line
47862    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47863    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47864        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47865  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47866    # There is no specific version flag, but all output starts with a version string.
47867    # First line typically looks something like:
47868    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47869    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47870    # Check that this is likely to be Microsoft CL.EXE.
47871    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47872    if test $? -ne 0; then
47873      { $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
47874$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47875      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47876$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47877      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47878    fi
47879    # Collapse compiler output into a single line
47880    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47881    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47882        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47883  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47884    # gcc --version output typically looks like
47885    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47886    #     Copyright (C) 2013 Free Software Foundation, Inc.
47887    #     This is free software; see the source for copying conditions.  There is NO
47888    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47889    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47890    # Check that this is likely to be GCC.
47891    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47892    if test $? -ne 0; then
47893      { $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
47894$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47895      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47896$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47897      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47898    fi
47899    # Remove Copyright and legalese from version string, and
47900    # collapse into a single line
47901    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47902        $SED -e 's/ *Copyright .*//'`
47903    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47904        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47905  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47906    # clang --version output typically looks like
47907    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47908    #    clang version 3.3 (tags/RELEASE_33/final)
47909    # or
47910    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47911    #    Target: x86_64-pc-linux-gnu
47912    #    Thread model: posix
47913    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47914    # Check that this is likely to be clang
47915    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47916    if test $? -ne 0; then
47917      { $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
47918$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47919      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47920$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47921      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47922    fi
47923    # Collapse compiler output into a single line
47924    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47925    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47926        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47927  else
47928      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47929  fi
47930  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47931  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47932  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47933  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47934
47935  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47936$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47937
47938
47939  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47940    { $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
47941$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47942    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47943$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47944  fi
47945
47946  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47947  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47948    { $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
47949$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;}
47950  fi
47951
47952  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47953    { $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
47954$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47955  fi
47956
47957  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47958
47959  else
47960    # If we are not cross compiling, use the normal target compilers for
47961    # building the build platform executables.
47962    BUILD_CC="$CC"
47963    BUILD_CXX="$CXX"
47964    BUILD_LD="$LD"
47965    BUILD_LDCXX="$LDCXX"
47966    BUILD_NM="$NM"
47967    BUILD_AS="$AS"
47968    BUILD_OBJCOPY="$OBJCOPY"
47969    BUILD_STRIP="$STRIP"
47970    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47971    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47972    BUILD_AR="$AR"
47973
47974
47975  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47976    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47977$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47978    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47979$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47980  fi
47981
47982  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47983  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47984    { $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
47985$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;}
47986  fi
47987
47988  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47989    { $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
47990$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47991  fi
47992
47993  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47994
47995  fi
47996
47997
47998
47999
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010  # The package path is used only on macosx?
48011  # FIXME: clean this up, and/or move it elsewhere.
48012  PACKAGE_PATH=/opt/local
48013
48014
48015  # Check for extra potential brokenness.
48016  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48017    # On Windows, double-check that we got the right compiler.
48018    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48019    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48020    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48021      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48022        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
48023      fi
48024    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48025      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48026        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48027      fi
48028    fi
48029  fi
48030
48031  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48032    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48033    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48034    # This is later checked when setting flags.
48035
48036    # "-Og" suppported for GCC 4.8 and later
48037    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48038
48039
48040
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053
48054
48055
48056
48057
48058
48059
48060
48061
48062
48063
48064
48065
48066
48067
48068
48069
48070
48071
48072
48073
48074
48075
48076
48077
48078
48079
48080
48081
48082
48083
48084
48085    # Execute function body
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134    # Execute function body
48135
48136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48137$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48138  supports=yes
48139
48140  saved_cflags="$CFLAGS"
48141  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48142  ac_ext=c
48143ac_cpp='$CPP $CPPFLAGS'
48144ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48145ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48146ac_compiler_gnu=$ac_cv_c_compiler_gnu
48147
48148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48149/* end confdefs.h.  */
48150int i;
48151_ACEOF
48152if ac_fn_c_try_compile "$LINENO"; then :
48153
48154else
48155  supports=no
48156fi
48157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48158  ac_ext=cpp
48159ac_cpp='$CXXCPP $CPPFLAGS'
48160ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48161ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48162ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48163
48164  CFLAGS="$saved_cflags"
48165
48166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48167$as_echo "$supports" >&6; }
48168  if test "x$supports" = "xyes" ; then
48169    :
48170    C_COMP_SUPPORTS="yes"
48171  else
48172    :
48173    C_COMP_SUPPORTS="no"
48174  fi
48175
48176
48177
48178
48179
48180
48181
48182
48183
48184
48185
48186
48187
48188
48189
48190
48191
48192
48193
48194
48195
48196
48197
48198
48199
48200
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234    # Execute function body
48235
48236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48237$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48238  supports=yes
48239
48240  saved_cxxflags="$CXXFLAGS"
48241  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48242  ac_ext=cpp
48243ac_cpp='$CXXCPP $CPPFLAGS'
48244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48247
48248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48249/* end confdefs.h.  */
48250int i;
48251_ACEOF
48252if ac_fn_cxx_try_compile "$LINENO"; then :
48253
48254else
48255  supports=no
48256fi
48257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48258  ac_ext=cpp
48259ac_cpp='$CXXCPP $CPPFLAGS'
48260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48263
48264  CXXFLAGS="$saved_cxxflags"
48265
48266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48267$as_echo "$supports" >&6; }
48268  if test "x$supports" = "xyes" ; then
48269    :
48270    CXX_COMP_SUPPORTS="yes"
48271  else
48272    :
48273    CXX_COMP_SUPPORTS="no"
48274  fi
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48289$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48290  supports=no
48291  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48292
48293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48294$as_echo "$supports" >&6; }
48295  if test "x$supports" = "xyes" ; then
48296    :
48297    HAS_CFLAG_OPTIMIZE_DEBUG=true
48298  else
48299    :
48300    HAS_CFLAG_OPTIMIZE_DEBUG=false
48301  fi
48302
48303
48304
48305
48306
48307
48308
48309    # "-z relro" supported in GNU binutils 2.17 and later
48310    LINKER_RELRO_FLAG="-Wl,-z,relro"
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358    # Execute function body
48359
48360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48361$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48362  supports=yes
48363
48364  saved_ldflags="$LDFLAGS"
48365  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48366  ac_ext=c
48367ac_cpp='$CPP $CPPFLAGS'
48368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48370ac_compiler_gnu=$ac_cv_c_compiler_gnu
48371
48372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48373/* end confdefs.h.  */
48374
48375int
48376main ()
48377{
48378
48379  ;
48380  return 0;
48381}
48382_ACEOF
48383if ac_fn_c_try_link "$LINENO"; then :
48384
48385else
48386  supports=no
48387fi
48388rm -f core conftest.err conftest.$ac_objext \
48389    conftest$ac_exeext conftest.$ac_ext
48390  ac_ext=cpp
48391ac_cpp='$CXXCPP $CPPFLAGS'
48392ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48393ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48394ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48395
48396  LDFLAGS="$saved_ldflags"
48397
48398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48399$as_echo "$supports" >&6; }
48400  if test "x$supports" = "xyes" ; then
48401    :
48402    HAS_LINKER_RELRO=true
48403  else
48404    :
48405    HAS_LINKER_RELRO=false
48406  fi
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420    # "-z now" supported in GNU binutils 2.11 and later
48421    LINKER_NOW_FLAG="-Wl,-z,now"
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442
48443
48444
48445
48446
48447
48448
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469    # Execute function body
48470
48471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48472$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48473  supports=yes
48474
48475  saved_ldflags="$LDFLAGS"
48476  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48477  ac_ext=c
48478ac_cpp='$CPP $CPPFLAGS'
48479ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48480ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48481ac_compiler_gnu=$ac_cv_c_compiler_gnu
48482
48483  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48484/* end confdefs.h.  */
48485
48486int
48487main ()
48488{
48489
48490  ;
48491  return 0;
48492}
48493_ACEOF
48494if ac_fn_c_try_link "$LINENO"; then :
48495
48496else
48497  supports=no
48498fi
48499rm -f core conftest.err conftest.$ac_objext \
48500    conftest$ac_exeext conftest.$ac_ext
48501  ac_ext=cpp
48502ac_cpp='$CXXCPP $CPPFLAGS'
48503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48506
48507  LDFLAGS="$saved_ldflags"
48508
48509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48510$as_echo "$supports" >&6; }
48511  if test "x$supports" = "xyes" ; then
48512    :
48513    HAS_LINKER_NOW=true
48514  else
48515    :
48516    HAS_LINKER_NOW=false
48517  fi
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530  fi
48531
48532  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48533  # in executable.'
48534  USING_BROKEN_SUSE_LD=no
48535  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48537$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48538    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48539    $ECHO "int main() { }" > main.c
48540    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48542$as_echo "no" >&6; }
48543      USING_BROKEN_SUSE_LD=no
48544    else
48545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48546$as_echo "yes" >&6; }
48547      USING_BROKEN_SUSE_LD=yes
48548    fi
48549    $RM version-script.map main.c a.out
48550  fi
48551
48552
48553  # Setup hotspot lecagy names for toolchains
48554  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48555  if test "x$TOOLCHAIN_TYPE" = xclang; then
48556    HOTSPOT_TOOLCHAIN_TYPE=gcc
48557  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48558    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48559  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48560    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48561  fi
48562
48563
48564
48565# Setup the JTReg Regression Test Harness.
48566
48567
48568# Check whether --with-jtreg was given.
48569if test "${with_jtreg+set}" = set; then :
48570  withval=$with_jtreg;
48571else
48572  with_jtreg=no
48573fi
48574
48575
48576  if test "x$with_jtreg" = xno; then
48577    # jtreg disabled
48578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48579$as_echo_n "checking for jtreg... " >&6; }
48580    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48581$as_echo "no" >&6; }
48582  else
48583    if test "x$with_jtreg" != xyes; then
48584      # with path specified.
48585      JT_HOME="$with_jtreg"
48586    fi
48587
48588    if test "x$JT_HOME" != x; then
48589      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48590$as_echo_n "checking for jtreg... " >&6; }
48591
48592      # use JT_HOME enviroment var.
48593
48594  # Only process if variable expands to non-empty
48595
48596  if test "x$JT_HOME" != x; then
48597    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48598
48599  # Input might be given as Windows format, start by converting to
48600  # unix format.
48601  path="$JT_HOME"
48602  new_path=`$CYGPATH -u "$path"`
48603
48604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48607  # "foo.exe" is OK but "foo" is an error.
48608  #
48609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48610  # It is also a way to make sure we got the proper file name for the real test later on.
48611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48612  if test "x$test_shortpath" = x; then
48613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48614$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48615    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48616  fi
48617
48618  # Call helper function which possibly converts this using DOS-style short mode.
48619  # If so, the updated path is stored in $new_path.
48620
48621  input_path="$new_path"
48622  # Check if we need to convert this using DOS-style short mode. If the path
48623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48624  # take no chances and rewrite it.
48625  # Note: m4 eats our [], so we need to use [ and ] instead.
48626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48627  if test "x$has_forbidden_chars" != x; then
48628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48632      # Going to short mode and back again did indeed matter. Since short mode is
48633      # case insensitive, let's make it lowercase to improve readability.
48634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48635      # Now convert it back to Unix-style (cygpath)
48636      input_path=`$CYGPATH -u "$shortmode_path"`
48637      new_path="$input_path"
48638    fi
48639  fi
48640
48641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48642  if test "x$test_cygdrive_prefix" = x; then
48643    # As a simple fix, exclude /usr/bin since it's not a real path.
48644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48646      # a path prefixed by /cygdrive for fixpath to work.
48647      new_path="$CYGWIN_ROOT_PATH$input_path"
48648    fi
48649  fi
48650
48651
48652  if test "x$path" != "x$new_path"; then
48653    JT_HOME="$new_path"
48654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48655$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48656  fi
48657
48658    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48659
48660  path="$JT_HOME"
48661  has_colon=`$ECHO $path | $GREP ^.:`
48662  new_path="$path"
48663  if test "x$has_colon" = x; then
48664    # Not in mixed or Windows style, start by that.
48665    new_path=`cmd //c echo $path`
48666  fi
48667
48668
48669  input_path="$new_path"
48670  # Check if we need to convert this using DOS-style short mode. If the path
48671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48672  # take no chances and rewrite it.
48673  # Note: m4 eats our [], so we need to use [ and ] instead.
48674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48675  if test "x$has_forbidden_chars" != x; then
48676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48678  fi
48679
48680
48681  windows_path="$new_path"
48682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48683    unix_path=`$CYGPATH -u "$windows_path"`
48684    new_path="$unix_path"
48685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48687    new_path="$unix_path"
48688  fi
48689
48690  if test "x$path" != "x$new_path"; then
48691    JT_HOME="$new_path"
48692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48693$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48694  fi
48695
48696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48698
48699    else
48700      # We're on a unix platform. Hooray! :)
48701      path="$JT_HOME"
48702      has_space=`$ECHO "$path" | $GREP " "`
48703      if test "x$has_space" != x; then
48704        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48705$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48706        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48707      fi
48708
48709      # Use eval to expand a potential ~
48710      eval path="$path"
48711      if test ! -f "$path" && test ! -d "$path"; then
48712        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48713      fi
48714
48715      if test -d "$path"; then
48716        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48717      else
48718        dir="`$DIRNAME "$path"`"
48719        base="`$BASENAME "$path"`"
48720        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48721      fi
48722    fi
48723  fi
48724
48725
48726      # jtreg win32 script works for everybody
48727      JTREGEXE="$JT_HOME/bin/jtreg"
48728
48729      if test ! -f "$JTREGEXE"; then
48730        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48731      fi
48732
48733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48734$as_echo "$JTREGEXE" >&6; }
48735    else
48736      # try to find jtreg on path
48737
48738
48739
48740  # Publish this variable in the help.
48741
48742
48743  if [ -z "${JTREGEXE+x}" ]; then
48744    # The variable is not set by user, try to locate tool using the code snippet
48745    for ac_prog in jtreg
48746do
48747  # Extract the first word of "$ac_prog", so it can be a program name with args.
48748set dummy $ac_prog; ac_word=$2
48749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48750$as_echo_n "checking for $ac_word... " >&6; }
48751if ${ac_cv_path_JTREGEXE+:} false; then :
48752  $as_echo_n "(cached) " >&6
48753else
48754  case $JTREGEXE in
48755  [\\/]* | ?:[\\/]*)
48756  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48757  ;;
48758  *)
48759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48760for as_dir in $PATH
48761do
48762  IFS=$as_save_IFS
48763  test -z "$as_dir" && as_dir=.
48764    for ac_exec_ext in '' $ac_executable_extensions; do
48765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48766    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48768    break 2
48769  fi
48770done
48771  done
48772IFS=$as_save_IFS
48773
48774  ;;
48775esac
48776fi
48777JTREGEXE=$ac_cv_path_JTREGEXE
48778if test -n "$JTREGEXE"; then
48779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48780$as_echo "$JTREGEXE" >&6; }
48781else
48782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48783$as_echo "no" >&6; }
48784fi
48785
48786
48787  test -n "$JTREGEXE" && break
48788done
48789
48790  else
48791    # The variable is set, but is it from the command line or the environment?
48792
48793    # Try to remove the string !JTREGEXE! from our list.
48794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48796      # If it failed, the variable was not from the command line. Ignore it,
48797      # but warn the user (except for BASH, which is always set by the calling BASH).
48798      if test "xJTREGEXE" != xBASH; then
48799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48800$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48801      fi
48802      # Try to locate tool using the code snippet
48803      for ac_prog in jtreg
48804do
48805  # Extract the first word of "$ac_prog", so it can be a program name with args.
48806set dummy $ac_prog; ac_word=$2
48807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48808$as_echo_n "checking for $ac_word... " >&6; }
48809if ${ac_cv_path_JTREGEXE+:} false; then :
48810  $as_echo_n "(cached) " >&6
48811else
48812  case $JTREGEXE in
48813  [\\/]* | ?:[\\/]*)
48814  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48815  ;;
48816  *)
48817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48818for as_dir in $PATH
48819do
48820  IFS=$as_save_IFS
48821  test -z "$as_dir" && as_dir=.
48822    for ac_exec_ext in '' $ac_executable_extensions; do
48823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48824    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48826    break 2
48827  fi
48828done
48829  done
48830IFS=$as_save_IFS
48831
48832  ;;
48833esac
48834fi
48835JTREGEXE=$ac_cv_path_JTREGEXE
48836if test -n "$JTREGEXE"; then
48837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48838$as_echo "$JTREGEXE" >&6; }
48839else
48840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48841$as_echo "no" >&6; }
48842fi
48843
48844
48845  test -n "$JTREGEXE" && break
48846done
48847
48848    else
48849      # If it succeeded, then it was overridden by the user. We will use it
48850      # for the tool.
48851
48852      # First remove it from the list of overridden variables, so we can test
48853      # for unknown variables in the end.
48854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48855
48856      # Check if we try to supply an empty value
48857      if test "x$JTREGEXE" = x; then
48858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48859$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48861$as_echo_n "checking for JTREGEXE... " >&6; }
48862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48863$as_echo "disabled" >&6; }
48864      else
48865        # Check if the provided tool contains a complete path.
48866        tool_specified="$JTREGEXE"
48867        tool_basename="${tool_specified##*/}"
48868        if test "x$tool_basename" = "x$tool_specified"; then
48869          # A command without a complete path is provided, search $PATH.
48870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48871$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48872          # Extract the first word of "$tool_basename", so it can be a program name with args.
48873set dummy $tool_basename; ac_word=$2
48874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48875$as_echo_n "checking for $ac_word... " >&6; }
48876if ${ac_cv_path_JTREGEXE+:} false; then :
48877  $as_echo_n "(cached) " >&6
48878else
48879  case $JTREGEXE in
48880  [\\/]* | ?:[\\/]*)
48881  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48882  ;;
48883  *)
48884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48885for as_dir in $PATH
48886do
48887  IFS=$as_save_IFS
48888  test -z "$as_dir" && as_dir=.
48889    for ac_exec_ext in '' $ac_executable_extensions; do
48890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48891    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48893    break 2
48894  fi
48895done
48896  done
48897IFS=$as_save_IFS
48898
48899  ;;
48900esac
48901fi
48902JTREGEXE=$ac_cv_path_JTREGEXE
48903if test -n "$JTREGEXE"; then
48904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48905$as_echo "$JTREGEXE" >&6; }
48906else
48907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48908$as_echo "no" >&6; }
48909fi
48910
48911
48912          if test "x$JTREGEXE" = x; then
48913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48914          fi
48915        else
48916          # Otherwise we believe it is a complete path. Use it as it is.
48917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48918$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48920$as_echo_n "checking for JTREGEXE... " >&6; }
48921          if test ! -x "$tool_specified"; then
48922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48923$as_echo "not found" >&6; }
48924            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48925          fi
48926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48927$as_echo "$tool_specified" >&6; }
48928        fi
48929      fi
48930    fi
48931
48932  fi
48933
48934
48935
48936  if test "x$JTREGEXE" = x; then
48937    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48938  fi
48939
48940
48941      JT_HOME="`$DIRNAME $JTREGEXE`"
48942    fi
48943  fi
48944
48945
48946
48947
48948
48949
48950  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48951  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48952  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48953  #                              commands produced by the link step (currently AIX only)
48954  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48955    COMPILER_TARGET_BITS_FLAG="-q"
48956    COMPILER_COMMAND_FILE_FLAG="-f"
48957    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48958  else
48959    COMPILER_TARGET_BITS_FLAG="-m"
48960    COMPILER_COMMAND_FILE_FLAG="@"
48961    COMPILER_BINDCMD_FILE_FLAG=""
48962
48963    # The solstudio linker does not support @-files.
48964    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48965      COMPILER_COMMAND_FILE_FLAG=
48966    fi
48967
48968    # Check if @file is supported by gcc
48969    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48970      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48971$as_echo_n "checking if @file is supported by gcc... " >&6; }
48972      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48973      $ECHO "" "--version" > command.file
48974      if $CXX @command.file 2>&5 >&5; then
48975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48976$as_echo "yes" >&6; }
48977        COMPILER_COMMAND_FILE_FLAG="@"
48978      else
48979        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48980$as_echo "no" >&6; }
48981        COMPILER_COMMAND_FILE_FLAG=
48982      fi
48983      $RM command.file
48984    fi
48985  fi
48986
48987
48988
48989
48990  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48991  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48992    ARFLAGS="-r"
48993  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48994    ARFLAGS="-X64"
48995  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48996    # lib.exe is used as AR to create static libraries.
48997    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48998  else
48999    ARFLAGS=""
49000  fi
49001
49002
49003  ## Setup strip.
49004  # FIXME: should this really be per platform, or should it be per toolchain type?
49005  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49006  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49007  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49008    STRIPFLAGS="-g"
49009  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49010    STRIPFLAGS="-x"
49011  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49012    STRIPFLAGS="-S"
49013  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49014    STRIPFLAGS="-X32_64"
49015  fi
49016
49017
49018
49019  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49020    CC_OUT_OPTION=-Fo
49021    EXE_OUT_OPTION=-out:
49022    LD_OUT_OPTION=-out:
49023    AR_OUT_OPTION=-out:
49024  else
49025    # The option used to specify the target .o,.a or .so file.
49026    # When compiling, how to specify the to be created object file.
49027    CC_OUT_OPTION='-o$(SPACE)'
49028    # When linking, how to specify the to be created executable.
49029    EXE_OUT_OPTION='-o$(SPACE)'
49030    # When linking, how to specify the to be created dynamically linkable library.
49031    LD_OUT_OPTION='-o$(SPACE)'
49032    # When archiving, how to specify the to be create static archive for object files.
49033    AR_OUT_OPTION='rcs$(SPACE)'
49034  fi
49035
49036
49037
49038
49039
49040  # On Windows, we need to set RC flags.
49041  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49042    RC_FLAGS="-nologo -l0x409"
49043    JVM_RCFLAGS="-nologo"
49044    if test "x$DEBUG_LEVEL" = xrelease; then
49045      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49046      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49047    fi
49048
49049    # The version variables used to create RC_FLAGS may be overridden
49050    # in a custom configure script, or possibly the command line.
49051    # Let those variables be expanded at make time in spec.gmk.
49052    # The \$ are escaped to the shell, and the $(...) variables
49053    # are evaluated by make.
49054    RC_FLAGS="$RC_FLAGS \
49055        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49056        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49057        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49058        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49059        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49060        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49061        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49062
49063    JVM_RCFLAGS="$JVM_RCFLAGS \
49064        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49065        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49066        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49067        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49068        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49069        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49070        -D\"HS_FNAME=jvm.dll\" \
49071        -D\"HS_INTERNAL_NAME=jvm\""
49072  fi
49073
49074
49075
49076  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49077    # silence copyright notice and other headers.
49078    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49079  fi
49080
49081
49082# Now we can test some aspects on the target using configure macros.
49083
49084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49085$as_echo_n "checking for ANSI C header files... " >&6; }
49086if ${ac_cv_header_stdc+:} false; then :
49087  $as_echo_n "(cached) " >&6
49088else
49089  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49090/* end confdefs.h.  */
49091#include <stdlib.h>
49092#include <stdarg.h>
49093#include <string.h>
49094#include <float.h>
49095
49096int
49097main ()
49098{
49099
49100  ;
49101  return 0;
49102}
49103_ACEOF
49104if ac_fn_cxx_try_compile "$LINENO"; then :
49105  ac_cv_header_stdc=yes
49106else
49107  ac_cv_header_stdc=no
49108fi
49109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49110
49111if test $ac_cv_header_stdc = yes; then
49112  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49114/* end confdefs.h.  */
49115#include <string.h>
49116
49117_ACEOF
49118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49119  $EGREP "memchr" >/dev/null 2>&1; then :
49120
49121else
49122  ac_cv_header_stdc=no
49123fi
49124rm -f conftest*
49125
49126fi
49127
49128if test $ac_cv_header_stdc = yes; then
49129  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49131/* end confdefs.h.  */
49132#include <stdlib.h>
49133
49134_ACEOF
49135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49136  $EGREP "free" >/dev/null 2>&1; then :
49137
49138else
49139  ac_cv_header_stdc=no
49140fi
49141rm -f conftest*
49142
49143fi
49144
49145if test $ac_cv_header_stdc = yes; then
49146  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49147  if test "$cross_compiling" = yes; then :
49148  :
49149else
49150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49151/* end confdefs.h.  */
49152#include <ctype.h>
49153#include <stdlib.h>
49154#if ((' ' & 0x0FF) == 0x020)
49155# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49156# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49157#else
49158# define ISLOWER(c) \
49159		   (('a' <= (c) && (c) <= 'i') \
49160		     || ('j' <= (c) && (c) <= 'r') \
49161		     || ('s' <= (c) && (c) <= 'z'))
49162# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49163#endif
49164
49165#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49166int
49167main ()
49168{
49169  int i;
49170  for (i = 0; i < 256; i++)
49171    if (XOR (islower (i), ISLOWER (i))
49172	|| toupper (i) != TOUPPER (i))
49173      return 2;
49174  return 0;
49175}
49176_ACEOF
49177if ac_fn_cxx_try_run "$LINENO"; then :
49178
49179else
49180  ac_cv_header_stdc=no
49181fi
49182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49183  conftest.$ac_objext conftest.beam conftest.$ac_ext
49184fi
49185
49186fi
49187fi
49188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49189$as_echo "$ac_cv_header_stdc" >&6; }
49190if test $ac_cv_header_stdc = yes; then
49191
49192$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49193
49194fi
49195
49196# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49197for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49198		  inttypes.h stdint.h unistd.h
49199do :
49200  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49201ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49202"
49203if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49204  cat >>confdefs.h <<_ACEOF
49205#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49206_ACEOF
49207
49208fi
49209
49210done
49211
49212
49213
49214  ###############################################################################
49215  #
49216  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49217  # (The JVM can use 32 or 64 bit Java pointers but that decision
49218  # is made at runtime.)
49219  #
49220
49221  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49222    # Always specify -m flag on Solaris
49223    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49224
49225  # When we add flags to the "official" CFLAGS etc, we need to
49226  # keep track of these additions in ADDED_CFLAGS etc. These
49227  # will later be checked to make sure only controlled additions
49228  # have been made to CFLAGS etc.
49229  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49230  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49231  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49232
49233  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49234  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49235  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49236
49237  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49238  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49239  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49240
49241  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49242  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49243  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49244
49245  elif test "x$COMPILE_TYPE" = xreduced; then
49246    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49247      # Specify -m if running reduced on unix platforms
49248
49249  # When we add flags to the "official" CFLAGS etc, we need to
49250  # keep track of these additions in ADDED_CFLAGS etc. These
49251  # will later be checked to make sure only controlled additions
49252  # have been made to CFLAGS etc.
49253  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49254  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49255  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49256
49257  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49258  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49259  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49260
49261  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49262  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49263  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49264
49265  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49266  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49267  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49268
49269    fi
49270  fi
49271  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49272    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49273    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49274    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49275  fi
49276
49277  # Make compilation sanity check
49278  for ac_header in stdio.h
49279do :
49280  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49281if test "x$ac_cv_header_stdio_h" = xyes; then :
49282  cat >>confdefs.h <<_ACEOF
49283#define HAVE_STDIO_H 1
49284_ACEOF
49285
49286else
49287
49288    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49289$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49290    if test "x$COMPILE_TYPE" = xreduced; then
49291
49292  # Print a helpful message on how to acquire the necessary build dependency.
49293  # reduced is the help tag: freetype, cups, alsa etc
49294  MISSING_DEPENDENCY=reduced
49295
49296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49297    cygwin_help $MISSING_DEPENDENCY
49298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49299    msys_help $MISSING_DEPENDENCY
49300  else
49301    PKGHANDLER_COMMAND=
49302
49303    case $PKGHANDLER in
49304      apt-get)
49305        apt_help     $MISSING_DEPENDENCY ;;
49306      yum)
49307        yum_help     $MISSING_DEPENDENCY ;;
49308      brew)
49309        brew_help    $MISSING_DEPENDENCY ;;
49310      port)
49311        port_help    $MISSING_DEPENDENCY ;;
49312      pkgutil)
49313        pkgutil_help $MISSING_DEPENDENCY ;;
49314      pkgadd)
49315        pkgadd_help  $MISSING_DEPENDENCY ;;
49316    esac
49317
49318    if test "x$PKGHANDLER_COMMAND" != x; then
49319      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49320    fi
49321  fi
49322
49323      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49324$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49325    elif test "x$COMPILE_TYPE" = xcross; then
49326      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49327$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49328    fi
49329    as_fn_error $? "Cannot continue." "$LINENO" 5
49330
49331fi
49332
49333done
49334
49335
49336  # The cast to long int works around a bug in the HP C Compiler
49337# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49338# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49339# This bug is HP SR number 8606223364.
49340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49341$as_echo_n "checking size of int *... " >&6; }
49342if ${ac_cv_sizeof_int_p+:} false; then :
49343  $as_echo_n "(cached) " >&6
49344else
49345  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49346
49347else
49348  if test "$ac_cv_type_int_p" = yes; then
49349     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49351as_fn_error 77 "cannot compute sizeof (int *)
49352See \`config.log' for more details" "$LINENO" 5; }
49353   else
49354     ac_cv_sizeof_int_p=0
49355   fi
49356fi
49357
49358fi
49359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49360$as_echo "$ac_cv_sizeof_int_p" >&6; }
49361
49362
49363
49364cat >>confdefs.h <<_ACEOF
49365#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49366_ACEOF
49367
49368
49369
49370  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49371  if test "x$ac_cv_sizeof_int_p" = x; then
49372    # The test failed, lets stick to the assumed value.
49373    { $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
49374$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49375  else
49376    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49377
49378    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49379      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49380      # Let's try to implicitely set the compilers target architecture and retry the test
49381      { $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
49382$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;}
49383      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49384$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49385
49386  # When we add flags to the "official" CFLAGS etc, we need to
49387  # keep track of these additions in ADDED_CFLAGS etc. These
49388  # will later be checked to make sure only controlled additions
49389  # have been made to CFLAGS etc.
49390  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49391  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49392  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49393
49394  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49395  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49396  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49397
49398  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49399  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49400  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49401
49402  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49403  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49404  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49405
49406
49407      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49408      unset ac_cv_sizeof_int_p
49409      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49410      cat >>confdefs.h <<_ACEOF
49411#undef SIZEOF_INT_P
49412_ACEOF
49413
49414      # The cast to long int works around a bug in the HP C Compiler
49415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49417# This bug is HP SR number 8606223364.
49418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49419$as_echo_n "checking size of int *... " >&6; }
49420if ${ac_cv_sizeof_int_p+:} false; then :
49421  $as_echo_n "(cached) " >&6
49422else
49423  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49424
49425else
49426  if test "$ac_cv_type_int_p" = yes; then
49427     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49428$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49429as_fn_error 77 "cannot compute sizeof (int *)
49430See \`config.log' for more details" "$LINENO" 5; }
49431   else
49432     ac_cv_sizeof_int_p=0
49433   fi
49434fi
49435
49436fi
49437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49438$as_echo "$ac_cv_sizeof_int_p" >&6; }
49439
49440
49441
49442cat >>confdefs.h <<_ACEOF
49443#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49444_ACEOF
49445
49446
49447
49448      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49449
49450      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49451        { $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
49452$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;}
49453        if test "x$COMPILE_TYPE" = xreduced; then
49454
49455  # Print a helpful message on how to acquire the necessary build dependency.
49456  # reduced is the help tag: freetype, cups, alsa etc
49457  MISSING_DEPENDENCY=reduced
49458
49459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49460    cygwin_help $MISSING_DEPENDENCY
49461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49462    msys_help $MISSING_DEPENDENCY
49463  else
49464    PKGHANDLER_COMMAND=
49465
49466    case $PKGHANDLER in
49467      apt-get)
49468        apt_help     $MISSING_DEPENDENCY ;;
49469      yum)
49470        yum_help     $MISSING_DEPENDENCY ;;
49471      brew)
49472        brew_help    $MISSING_DEPENDENCY ;;
49473      port)
49474        port_help    $MISSING_DEPENDENCY ;;
49475      pkgutil)
49476        pkgutil_help $MISSING_DEPENDENCY ;;
49477      pkgadd)
49478        pkgadd_help  $MISSING_DEPENDENCY ;;
49479    esac
49480
49481    if test "x$PKGHANDLER_COMMAND" != x; then
49482      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49483    fi
49484  fi
49485
49486          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49487$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49488        elif test "x$COMPILE_TYPE" = xcross; then
49489          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49490$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49491        fi
49492        as_fn_error $? "Cannot continue." "$LINENO" 5
49493      fi
49494    fi
49495  fi
49496
49497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49498$as_echo_n "checking for target address size... " >&6; }
49499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49500$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49501
49502
49503  ###############################################################################
49504  #
49505  # Is the target little of big endian?
49506  #
49507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49508$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49509if ${ac_cv_c_bigendian+:} false; then :
49510  $as_echo_n "(cached) " >&6
49511else
49512  ac_cv_c_bigendian=unknown
49513    # See if we're dealing with a universal compiler.
49514    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49515/* end confdefs.h.  */
49516#ifndef __APPLE_CC__
49517	       not a universal capable compiler
49518	     #endif
49519	     typedef int dummy;
49520
49521_ACEOF
49522if ac_fn_cxx_try_compile "$LINENO"; then :
49523
49524	# Check for potential -arch flags.  It is not universal unless
49525	# there are at least two -arch flags with different values.
49526	ac_arch=
49527	ac_prev=
49528	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49529	 if test -n "$ac_prev"; then
49530	   case $ac_word in
49531	     i?86 | x86_64 | ppc | ppc64)
49532	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49533		 ac_arch=$ac_word
49534	       else
49535		 ac_cv_c_bigendian=universal
49536		 break
49537	       fi
49538	       ;;
49539	   esac
49540	   ac_prev=
49541	 elif test "x$ac_word" = "x-arch"; then
49542	   ac_prev=arch
49543	 fi
49544       done
49545fi
49546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49547    if test $ac_cv_c_bigendian = unknown; then
49548      # See if sys/param.h defines the BYTE_ORDER macro.
49549      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49550/* end confdefs.h.  */
49551#include <sys/types.h>
49552	     #include <sys/param.h>
49553
49554int
49555main ()
49556{
49557#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49558		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49559		     && LITTLE_ENDIAN)
49560	      bogus endian macros
49561	     #endif
49562
49563  ;
49564  return 0;
49565}
49566_ACEOF
49567if ac_fn_cxx_try_compile "$LINENO"; then :
49568  # It does; now see whether it defined to BIG_ENDIAN or not.
49569	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49570/* end confdefs.h.  */
49571#include <sys/types.h>
49572		#include <sys/param.h>
49573
49574int
49575main ()
49576{
49577#if BYTE_ORDER != BIG_ENDIAN
49578		 not big endian
49579		#endif
49580
49581  ;
49582  return 0;
49583}
49584_ACEOF
49585if ac_fn_cxx_try_compile "$LINENO"; then :
49586  ac_cv_c_bigendian=yes
49587else
49588  ac_cv_c_bigendian=no
49589fi
49590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49591fi
49592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49593    fi
49594    if test $ac_cv_c_bigendian = unknown; then
49595      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49596      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49597/* end confdefs.h.  */
49598#include <limits.h>
49599
49600int
49601main ()
49602{
49603#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49604	      bogus endian macros
49605	     #endif
49606
49607  ;
49608  return 0;
49609}
49610_ACEOF
49611if ac_fn_cxx_try_compile "$LINENO"; then :
49612  # It does; now see whether it defined to _BIG_ENDIAN or not.
49613	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49614/* end confdefs.h.  */
49615#include <limits.h>
49616
49617int
49618main ()
49619{
49620#ifndef _BIG_ENDIAN
49621		 not big endian
49622		#endif
49623
49624  ;
49625  return 0;
49626}
49627_ACEOF
49628if ac_fn_cxx_try_compile "$LINENO"; then :
49629  ac_cv_c_bigendian=yes
49630else
49631  ac_cv_c_bigendian=no
49632fi
49633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49634fi
49635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49636    fi
49637    if test $ac_cv_c_bigendian = unknown; then
49638      # Compile a test program.
49639      if test "$cross_compiling" = yes; then :
49640  # Try to guess by grepping values from an object file.
49641	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49642/* end confdefs.h.  */
49643short int ascii_mm[] =
49644		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49645		short int ascii_ii[] =
49646		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49647		int use_ascii (int i) {
49648		  return ascii_mm[i] + ascii_ii[i];
49649		}
49650		short int ebcdic_ii[] =
49651		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49652		short int ebcdic_mm[] =
49653		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49654		int use_ebcdic (int i) {
49655		  return ebcdic_mm[i] + ebcdic_ii[i];
49656		}
49657		extern int foo;
49658
49659int
49660main ()
49661{
49662return use_ascii (foo) == use_ebcdic (foo);
49663  ;
49664  return 0;
49665}
49666_ACEOF
49667if ac_fn_cxx_try_compile "$LINENO"; then :
49668  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49669	      ac_cv_c_bigendian=yes
49670	    fi
49671	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49672	      if test "$ac_cv_c_bigendian" = unknown; then
49673		ac_cv_c_bigendian=no
49674	      else
49675		# finding both strings is unlikely to happen, but who knows?
49676		ac_cv_c_bigendian=unknown
49677	      fi
49678	    fi
49679fi
49680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49681else
49682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49683/* end confdefs.h.  */
49684$ac_includes_default
49685int
49686main ()
49687{
49688
49689	     /* Are we little or big endian?  From Harbison&Steele.  */
49690	     union
49691	     {
49692	       long int l;
49693	       char c[sizeof (long int)];
49694	     } u;
49695	     u.l = 1;
49696	     return u.c[sizeof (long int) - 1] == 1;
49697
49698  ;
49699  return 0;
49700}
49701_ACEOF
49702if ac_fn_cxx_try_run "$LINENO"; then :
49703  ac_cv_c_bigendian=no
49704else
49705  ac_cv_c_bigendian=yes
49706fi
49707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49708  conftest.$ac_objext conftest.beam conftest.$ac_ext
49709fi
49710
49711    fi
49712fi
49713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49714$as_echo "$ac_cv_c_bigendian" >&6; }
49715 case $ac_cv_c_bigendian in #(
49716   yes)
49717     ENDIAN="big";; #(
49718   no)
49719     ENDIAN="little" ;; #(
49720   universal)
49721     ENDIAN="universal_endianness"
49722     ;; #(
49723   *)
49724     ENDIAN="unknown" ;;
49725 esac
49726
49727
49728  if test "x$ENDIAN" = xuniversal_endianness; then
49729    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49730  fi
49731  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49732    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
49733  fi
49734
49735
49736# Configure flags for the tools
49737
49738  ###############################################################################
49739  #
49740  # How to compile shared libraries.
49741  #
49742
49743  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49744    PICFLAG="-fPIC"
49745    C_FLAG_REORDER=''
49746    CXX_FLAG_REORDER=''
49747
49748    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49749      # Linking is different on MacOSX
49750      if test "x$STATIC_BUILD" = xtrue; then
49751        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49752      else
49753        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49754        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49755      fi
49756      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49757      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49758      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49759      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49760    else
49761      # Default works for linux, might work on other platforms as well.
49762      SHARED_LIBRARY_FLAGS='-shared'
49763      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49764      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49765      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49766      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49767    fi
49768  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49769    C_FLAG_REORDER=''
49770    CXX_FLAG_REORDER=''
49771
49772    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49773      # Linking is different on MacOSX
49774      PICFLAG=''
49775      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49776      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
49777      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49778      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49779      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49780
49781      if test "x$STATIC_BUILD" = xfalse; then
49782        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49783      fi
49784    else
49785      # Default works for linux, might work on other platforms as well.
49786      PICFLAG='-fPIC'
49787      SHARED_LIBRARY_FLAGS='-shared'
49788      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49789      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49790      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49791
49792      # arm specific settings
49793      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49794        # '-Wl,-z,origin' isn't used on arm.
49795        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49796      else
49797        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49798      fi
49799
49800    fi
49801  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49802    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49803      PICFLAG="-xcode=pic32"
49804    else
49805      PICFLAG="-KPIC"
49806    fi
49807    C_FLAG_REORDER='-xF'
49808    CXX_FLAG_REORDER='-xF'
49809    SHARED_LIBRARY_FLAGS="-G"
49810    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49811    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49812    SET_SHARED_LIBRARY_NAME='-h $1'
49813    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49814  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49815    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49816    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49817    # will have to patch this single instruction with a call to some out-of-order code which
49818    # does the load from the TOC. This is of course slow. But in that case we also would have
49819    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49820    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49821    # can be patched directly by the linker and does not require a jump to out-of-order code.
49822    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49823    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49824    # loads for accessing a global variable). But there are rumors that this may be seen as a
49825    # 'performance feature' because of improved code locality of the symbols used in a
49826    # compilation unit.
49827    PICFLAG="-qpic"
49828    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49829    C_FLAG_REORDER=''
49830    CXX_FLAG_REORDER=''
49831    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49832    SET_EXECUTABLE_ORIGIN=""
49833    SET_SHARED_LIBRARY_ORIGIN=''
49834    SET_SHARED_LIBRARY_NAME=''
49835    SET_SHARED_LIBRARY_MAPFILE=''
49836  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49837    PICFLAG=""
49838    C_FLAG_REORDER=''
49839    CXX_FLAG_REORDER=''
49840    SHARED_LIBRARY_FLAGS="-dll"
49841    SET_EXECUTABLE_ORIGIN=''
49842    SET_SHARED_LIBRARY_ORIGIN=''
49843    SET_SHARED_LIBRARY_NAME=''
49844    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49845  fi
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855  # The (cross) compiler is now configured, we can now test capabilities
49856  # of the target platform.
49857
49858
49859
49860  ###############################################################################
49861  #
49862  # Setup the opt flags for different compilers
49863  # and different operating systems.
49864  #
49865
49866  # FIXME: this was indirectly the old default, but just inherited.
49867  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49868  #   C_FLAG_DEPS="-MMD -MF"
49869  # fi
49870
49871  # Generate make dependency files
49872  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49873    C_FLAG_DEPS="-MMD -MF"
49874  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49875    C_FLAG_DEPS="-MMD -MF"
49876  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49877    C_FLAG_DEPS="-xMMD -xMF"
49878  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49879    C_FLAG_DEPS="-qmakedep=gcc -MF"
49880  fi
49881  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49882
49883
49884
49885  # Debug symbols
49886  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49887    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49888      # reduce from default "-g2" option to save space
49889      CFLAGS_DEBUG_SYMBOLS="-g1"
49890      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49891    else
49892      CFLAGS_DEBUG_SYMBOLS="-g"
49893      CXXFLAGS_DEBUG_SYMBOLS="-g"
49894    fi
49895  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49896    CFLAGS_DEBUG_SYMBOLS="-g"
49897    CXXFLAGS_DEBUG_SYMBOLS="-g"
49898  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49899    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49900    # -g0 enables debug symbols without disabling inlining.
49901    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49902  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49903    CFLAGS_DEBUG_SYMBOLS="-g"
49904    CXXFLAGS_DEBUG_SYMBOLS="-g"
49905  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49906    CFLAGS_DEBUG_SYMBOLS="-Zi"
49907    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49908  fi
49909
49910
49911
49912  # Debug symbols for JVM_CFLAGS
49913  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49914    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49915    if test "x$DEBUG_LEVEL" = xslowdebug; then
49916      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49917    else
49918      # -g0 does not disable inlining, which -g does.
49919      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49920    fi
49921  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49922    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49923  else
49924    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49925  fi
49926
49927
49928  # bounds, memory and behavior checking options
49929  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49930    case $DEBUG_LEVEL in
49931    release )
49932      # no adjustment
49933      ;;
49934    fastdebug )
49935      # no adjustment
49936      ;;
49937    slowdebug )
49938      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49939      # get's added conditionally on whether we produce debug symbols or not.
49940      # This is most likely not really correct.
49941
49942      # Add runtime stack smashing and undefined behavior checks.
49943      # Not all versions of gcc support -fstack-protector
49944      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987    # Execute function body
49988
49989
49990
49991
49992
49993
49994
49995
49996
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    # Execute function body
50037
50038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50039$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50040  supports=yes
50041
50042  saved_cflags="$CFLAGS"
50043  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50044  ac_ext=c
50045ac_cpp='$CPP $CPPFLAGS'
50046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50048ac_compiler_gnu=$ac_cv_c_compiler_gnu
50049
50050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50051/* end confdefs.h.  */
50052int i;
50053_ACEOF
50054if ac_fn_c_try_compile "$LINENO"; then :
50055
50056else
50057  supports=no
50058fi
50059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50060  ac_ext=cpp
50061ac_cpp='$CXXCPP $CPPFLAGS'
50062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50065
50066  CFLAGS="$saved_cflags"
50067
50068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50069$as_echo "$supports" >&6; }
50070  if test "x$supports" = "xyes" ; then
50071    :
50072    C_COMP_SUPPORTS="yes"
50073  else
50074    :
50075    C_COMP_SUPPORTS="no"
50076  fi
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136    # Execute function body
50137
50138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50139$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50140  supports=yes
50141
50142  saved_cxxflags="$CXXFLAGS"
50143  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50144  ac_ext=cpp
50145ac_cpp='$CXXCPP $CPPFLAGS'
50146ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50147ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50148ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50149
50150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50151/* end confdefs.h.  */
50152int i;
50153_ACEOF
50154if ac_fn_cxx_try_compile "$LINENO"; then :
50155
50156else
50157  supports=no
50158fi
50159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50160  ac_ext=cpp
50161ac_cpp='$CXXCPP $CPPFLAGS'
50162ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50163ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50164ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50165
50166  CXXFLAGS="$saved_cxxflags"
50167
50168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50169$as_echo "$supports" >&6; }
50170  if test "x$supports" = "xyes" ; then
50171    :
50172    CXX_COMP_SUPPORTS="yes"
50173  else
50174    :
50175    CXX_COMP_SUPPORTS="no"
50176  fi
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50191$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50192  supports=no
50193  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50194
50195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50196$as_echo "$supports" >&6; }
50197  if test "x$supports" = "xyes" ; then
50198    :
50199
50200  else
50201    :
50202    STACK_PROTECTOR_CFLAG=""
50203  fi
50204
50205
50206
50207
50208
50209
50210
50211      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50212      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50213      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50214        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50215      fi
50216      ;;
50217    esac
50218  fi
50219
50220  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50221    if test "x$DEBUG_LEVEL" != xrelease; then
50222      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50223        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50224      fi
50225    fi
50226  fi
50227
50228  # Optimization levels
50229  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50230    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50231
50232    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50233      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50234      C_O_FLAG_HIGHEST_JVM="-xO4"
50235      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50236      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50237      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50238      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50239      C_O_FLAG_DEBUG_JVM=""
50240      C_O_FLAG_NONE="-xregs=no%frameptr"
50241      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50242      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50243      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50244      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50245      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50246      CXX_O_FLAG_DEBUG_JVM=""
50247      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50248      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50249        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50250        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50251      fi
50252    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50253      C_O_FLAG_HIGHEST_JVM="-xO4"
50254      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50255      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50256      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50257      C_O_FLAG_DEBUG=""
50258      C_O_FLAG_DEBUG_JVM=""
50259      C_O_FLAG_NONE=""
50260      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50261      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50262      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50263      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50264      CXX_O_FLAG_DEBUG=""
50265      CXX_O_FLAG_DEBUG_JVM=""
50266      CXX_O_FLAG_NONE=""
50267    fi
50268  else
50269    # The remaining toolchains share opt flags between CC and CXX;
50270    # setup for C and duplicate afterwards.
50271    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50272      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50273        # On MacOSX we optimize for size, something
50274        # we should do for all platforms?
50275        C_O_FLAG_HIGHEST_JVM="-Os"
50276        C_O_FLAG_HIGHEST="-Os"
50277        C_O_FLAG_HI="-Os"
50278        C_O_FLAG_NORM="-Os"
50279        C_O_FLAG_SIZE="-Os"
50280      else
50281        C_O_FLAG_HIGHEST_JVM="-O3"
50282        C_O_FLAG_HIGHEST="-O3"
50283        C_O_FLAG_HI="-O3"
50284        C_O_FLAG_NORM="-O2"
50285        C_O_FLAG_SIZE="-Os"
50286      fi
50287      C_O_FLAG_DEBUG="-O0"
50288      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50289        C_O_FLAG_DEBUG_JVM=""
50290      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50291        C_O_FLAG_DEBUG_JVM="-O0"
50292      fi
50293      C_O_FLAG_NONE="-O0"
50294    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50295      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50296        # On MacOSX we optimize for size, something
50297        # we should do for all platforms?
50298        C_O_FLAG_HIGHEST_JVM="-Os"
50299        C_O_FLAG_HIGHEST="-Os"
50300        C_O_FLAG_HI="-Os"
50301        C_O_FLAG_NORM="-Os"
50302        C_O_FLAG_SIZE="-Os"
50303      else
50304        C_O_FLAG_HIGHEST_JVM="-O3"
50305        C_O_FLAG_HIGHEST="-O3"
50306        C_O_FLAG_HI="-O3"
50307        C_O_FLAG_NORM="-O2"
50308        C_O_FLAG_SIZE="-Os"
50309      fi
50310      C_O_FLAG_DEBUG="-O0"
50311      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50312        C_O_FLAG_DEBUG_JVM=""
50313      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50314        C_O_FLAG_DEBUG_JVM="-O0"
50315      fi
50316      C_O_FLAG_NONE="-O0"
50317    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50318      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50319      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50320      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50321      C_O_FLAG_NORM="-O2"
50322      C_O_FLAG_DEBUG="-qnoopt"
50323      # FIXME: Value below not verified.
50324      C_O_FLAG_DEBUG_JVM=""
50325      C_O_FLAG_NONE="-qnoopt"
50326    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50327      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50328      C_O_FLAG_HIGHEST="-O2"
50329      C_O_FLAG_HI="-O1"
50330      C_O_FLAG_NORM="-O1"
50331      C_O_FLAG_DEBUG="-Od"
50332      C_O_FLAG_DEBUG_JVM=""
50333      C_O_FLAG_NONE="-Od"
50334      C_O_FLAG_SIZE="-Os"
50335    fi
50336    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50337    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50338    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50339    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50340    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50341    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50342    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50343    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50344  fi
50345
50346  # Adjust optimization flags according to debug level.
50347  case $DEBUG_LEVEL in
50348    release )
50349      # no adjustment
50350      ;;
50351    fastdebug )
50352      # Not quite so much optimization
50353      C_O_FLAG_HI="$C_O_FLAG_NORM"
50354      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50355      ;;
50356    slowdebug )
50357      # Disable optimization
50358      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50359      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50360      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50361      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50362      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50363      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50364      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50365      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50366      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50367      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50368      ;;
50369  esac
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390# Check whether --with-abi-profile was given.
50391if test "${with_abi_profile+set}" = set; then :
50392  withval=$with_abi_profile;
50393fi
50394
50395
50396  if test "x$with_abi_profile" != x; then
50397    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50398        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50399      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50400    fi
50401
50402    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50404$as_echo_n "checking for ABI profle... " >&6; }
50405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50406$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50407
50408    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50409      ARM_FLOAT_TYPE=vfp-sflt
50410      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50411    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50412      ARM_FLOAT_TYPE=vfp-hflt
50413      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50414    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50415      ARM_FLOAT_TYPE=sflt
50416      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50417    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50418      ARM_FLOAT_TYPE=vfp-sflt
50419      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50420    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50421      ARM_FLOAT_TYPE=vfp-hflt
50422      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50423    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50424      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50425      ARM_FLOAT_TYPE=
50426      ARM_ARCH_TYPE_FLAGS=
50427    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50428      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50429      ARM_FLOAT_TYPE=
50430      ARM_ARCH_TYPE_FLAGS=
50431    else
50432      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50433    fi
50434
50435    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50436      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50437    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50438      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50439    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50440      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50441    fi
50442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50443$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50445$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50446
50447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50448$as_echo_n "checking for arch type flags... " >&6; }
50449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50450$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50451
50452    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50453    # autoconf target triplet.
50454     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50455    # Sanity check that it is a known ABI.
50456    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50457        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50458        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50459          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50460$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50461    fi
50462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50463$as_echo_n "checking for ABI property name... " >&6; }
50464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50465$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50466
50467
50468    # Pass these on to the open part of configure as if they were set using
50469    # --with-extra-c[xx]flags.
50470    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50471    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50472    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50473    # FIXME: This should not really be set using extra_cflags.
50474    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50475        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50476        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50477    fi
50478    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50479    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50480    # And pass the architecture flags to the linker as well
50481    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50482  fi
50483
50484  # When building with an abi profile, the name of that profile is appended on the
50485  # bundle platform, which is used in bundle names.
50486  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50487    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50488  fi
50489
50490
50491  # Special extras...
50492  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50493    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50494      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50495      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50496    fi
50497    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50498    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50499  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50500    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50501    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50502  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50503    CXXSTD_CXXFLAG="-std=gnu++98"
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546    # Execute function body
50547
50548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50549$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50550  supports=yes
50551
50552  saved_cxxflags="$CXXFLAGS"
50553  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50554  ac_ext=cpp
50555ac_cpp='$CXXCPP $CPPFLAGS'
50556ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50557ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50558ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50559
50560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50561/* end confdefs.h.  */
50562int i;
50563_ACEOF
50564if ac_fn_cxx_try_compile "$LINENO"; then :
50565
50566else
50567  supports=no
50568fi
50569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50570  ac_ext=cpp
50571ac_cpp='$CXXCPP $CPPFLAGS'
50572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50575
50576  CXXFLAGS="$saved_cxxflags"
50577
50578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50579$as_echo "$supports" >&6; }
50580  if test "x$supports" = "xyes" ; then
50581    :
50582
50583  else
50584    :
50585    CXXSTD_CXXFLAG=""
50586  fi
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50600    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50601
50602  fi
50603  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50604    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50605    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50606  fi
50607
50608  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50609  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50610  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50611
50612  ###############################################################################
50613  #
50614  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50615  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50616  #
50617
50618  # Setup compiler/platform specific flags into
50619  #    CFLAGS_JDK    - C Compiler flags
50620  #    CXXFLAGS_JDK  - C++ Compiler flags
50621  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50622  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50623    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50624    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50625    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50626    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50627      # Force compatibility with i586 on 32 bit intel platforms.
50628      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50629      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50630    fi
50631    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50632        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50633    case $OPENJDK_TARGET_CPU_ARCH in
50634      arm )
50635        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50636        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50637        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50638        ;;
50639      ppc )
50640        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50641        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50642        ;;
50643      s390 )
50644        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50645        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50646        ;;
50647      * )
50648        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50649        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50650        ;;
50651    esac
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706    # Execute function body
50707
50708  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50709  REFERENCE_VERSION=6
50710
50711  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50712    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50713  fi
50714
50715  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50716    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50717  fi
50718
50719  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50720  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50721
50722  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50723    :
50724
50725  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50726  # runs afoul of the more aggressive versions of these optimisations.
50727  # Notably, value range propagation now assumes that the this pointer of C++
50728  # member functions is non-null.
50729  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50730        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50731        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50732$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50733  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50734  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50735
50736  else
50737    :
50738
50739  fi
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50755    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50756
50757    # Restrict the debug information created by Clang to avoid
50758    # too big object files and speed the build up a little bit
50759    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50760    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50761    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50762      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50763        # Force compatibility with i586 on 32 bit intel platforms.
50764        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50765        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50766      fi
50767      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50768      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50769          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50770      case $OPENJDK_TARGET_CPU_ARCH in
50771        ppc )
50772          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50773          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50774          ;;
50775        * )
50776          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50777          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50778          ;;
50779      esac
50780    fi
50781  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50782    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50783    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50784    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50785      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50786    fi
50787
50788    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50789    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50790  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50791    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50792    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50793    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50794  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50795    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50796        -MD -Zc:wchar_t- -W3 -wd4800 \
50797        -DWIN32_LEAN_AND_MEAN \
50798        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50799        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50800        -DWIN32 -DIAL"
50801    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50802      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50803    else
50804      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50805    fi
50806    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50807    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50808    # studio.
50809    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50810      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50811      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50812      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50813    fi
50814  fi
50815
50816  ###############################################################################
50817
50818  # Adjust flags according to debug level.
50819  case $DEBUG_LEVEL in
50820    fastdebug | slowdebug )
50821      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50822      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50823      ;;
50824    release )
50825      ;;
50826    * )
50827      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50828      ;;
50829  esac
50830
50831  # Set some common defines. These works for all compilers, but assume
50832  # -D is universally accepted.
50833
50834  # Setup endianness
50835  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50836    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50837    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50838    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50839    #   Note: -Dmacro         is the same as    #define macro 1
50840    #         -Dmacro=        is the same as    #define macro
50841    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50842      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50843    else
50844      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50845    fi
50846  else
50847    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50848    # are defined in the system?
50849    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50850      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50851    else
50852      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50853    fi
50854  fi
50855
50856  # Setup target OS define. Use OS target name but in upper case.
50857  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50858  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50859
50860  # Setup target CPU
50861  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50862      $OPENJDK_TARGET_ADD_LP64 \
50863      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50864
50865  # Setup debug/release defines
50866  if test "x$DEBUG_LEVEL" = xrelease; then
50867    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50868    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50869      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50870    fi
50871  else
50872    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50873  fi
50874
50875  # Set some additional per-OS defines.
50876  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50877    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50878    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50879        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50880  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50881    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50882    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50883        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50884  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50885    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50886    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50887    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50888    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50889        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50890        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50891        -fno-omit-frame-pointer"
50892  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50893    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50894    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50895    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50896        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50897        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50898  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50899    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50900  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50901    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50902    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50903  fi
50904
50905  # Set some additional per-CPU defines.
50906  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50907    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50908  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50909    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50910  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50911    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50912      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50913      # fixes `relocation truncated to fit' error for gcc 4.1.
50914      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50915      # Use ppc64 instructions, but schedule for power5
50916      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50917    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50918      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50919    fi
50920  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50921    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50922      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50923      # Little endian machine uses ELFv2 ABI.
50924      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50925      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50926      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50927    fi
50928  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50929    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50930      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50931    fi
50932  fi
50933
50934  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50935    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50936  fi
50937
50938  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50939    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50940      # Solaris does not have _LP64=1 in the old build.
50941      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50942      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50943    fi
50944  fi
50945
50946  # Set JVM_CFLAGS warning handling
50947  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50948    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50949        -Wunused-value -Woverloaded-virtual"
50950
50951    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006    # Execute function body
51007
51008  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51009  REFERENCE_VERSION=4.8
51010
51011  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51012    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51013  fi
51014
51015  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51016    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51017  fi
51018
51019  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51020  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51021
51022  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51023    :
51024
51025            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51026            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51027
51028
51029  else
51030    :
51031
51032  fi
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047    fi
51048    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51049      # Non-zero builds have stricter warnings
51050      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51051    else
51052      if test "x$TOOLCHAIN_TYPE" = xclang; then
51053        # Some versions of llvm do not like -Wundef
51054        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51055      fi
51056    fi
51057  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51058    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51059        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51060  fi
51061
51062  # Additional macosx handling
51063  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51064    # Setting these parameters makes it an error to link to macosx APIs that are
51065    # newer than the given OS version and makes the linked binaries compatible
51066    # even if built on a newer version of the OS.
51067    # The expected format is X.Y.Z
51068    MACOSX_VERSION_MIN=10.7.0
51069
51070
51071    # The macro takes the version with no dots, ex: 1070
51072    # Let the flags variables get resolved in make for easier override on make
51073    # command line.
51074    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51075    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51076  fi
51077
51078  # Setup some hard coded includes
51079  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51080      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51081      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51082      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51083      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51084      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51085      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51086
51087  # The shared libraries are compiled using the picflag.
51088  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51089      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51090  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51091      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51092
51093  # Executable flags
51094  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51095  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51096
51097
51098
51099
51100
51101
51102  # Setup LDFLAGS et al.
51103  #
51104
51105  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51106    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51107    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51108    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51109    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51110      LDFLAGS_SAFESH="-safeseh"
51111      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51112      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51113      # NOTE: Old build added -machine. Probably not needed.
51114      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51115    else
51116      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51117    fi
51118  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51119      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51120      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51121        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51122        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51123    fi
51124  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51125    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51126    # We have previously set HAS_GNU_HASH if this is the case
51127    if test -n "$HAS_GNU_HASH"; then
51128      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51129      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51130      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51131    fi
51132      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51133        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51134    fi
51135    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51136      # And since we now know that the linker is gnu, then add -z defs, to forbid
51137      # undefined symbols in object files.
51138      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51139      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51140      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51141      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51142      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51143      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51144        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51145      fi
51146      case $DEBUG_LEVEL in
51147        release )
51148          # tell linker to optimize libraries.
51149          # Should this be supplied to the OSS linker as well?
51150          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51151          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51152          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51153          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51154            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51155          fi
51156          ;;
51157        slowdebug )
51158          # Hotspot always let the linker optimize
51159          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51160          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51161            # do relocations at load
51162            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51163            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51164            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51165          fi
51166          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51167            # mark relocations read only
51168            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51169            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51170            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51171          fi
51172          ;;
51173        fastdebug )
51174          # Hotspot always let the linker optimize
51175          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51176          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51177            # mark relocations read only
51178            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51179            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51180            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51181          fi
51182          ;;
51183        * )
51184          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51185          ;;
51186        esac
51187    fi
51188  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51189    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51190    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51191    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51192    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51193    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51194    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51195      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51196    fi
51197  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51198    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51199    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51200    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51201  fi
51202
51203  # Customize LDFLAGS for executables
51204
51205  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51206
51207  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51208    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51209      LDFLAGS_STACK_SIZE=1048576
51210    else
51211      LDFLAGS_STACK_SIZE=327680
51212    fi
51213    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51214  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51215    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51216  fi
51217
51218  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51219
51220  # Customize LDFLAGS for libs
51221  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51222
51223  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51224  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51225    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51226        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51227    JDKLIB_LIBS=""
51228  else
51229    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51230        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51231
51232    if test "xTARGET" = "xTARGET"; then
51233      # On some platforms (mac) the linker warns about non existing -L dirs.
51234      # For any of the variants server, client or minimal, the dir matches the
51235      # variant name. The "main" variant should be used for linking. For the
51236      # rest, the dir is just server.
51237      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51238          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51239        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51240            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51241      else
51242        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51243            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51244      fi
51245    elif test "xTARGET" = "xBUILD"; then
51246      # When building a buildjdk, it's always only the server variant
51247      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51248          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51249    fi
51250
51251    JDKLIB_LIBS="-ljava -ljvm"
51252    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51253      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51254    fi
51255
51256  fi
51257
51258LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51259
51260  # Set JVM_LIBS (per os)
51261  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51262    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51263  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51264    # FIXME: This hard-coded path is not really proper.
51265    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51266      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51267    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51268      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51269    fi
51270    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51271        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51272  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51273    JVM_LIBS="$JVM_LIBS -lm"
51274  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51275    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51276  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51277    JVM_LIBS="$JVM_LIBS -lm"
51278  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51279    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51280        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51281        wsock32.lib winmm.lib version.lib psapi.lib"
51282    fi
51283
51284  # Set JVM_ASFLAGS
51285  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51286    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51287      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51288    fi
51289  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51290    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51291  fi
51292
51293  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309  # Special extras...
51310  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51311    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51312      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51313      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51314    fi
51315    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51316    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51317  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51318    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51319    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51320  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51321    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364    # Execute function body
51365
51366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51367$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51368  supports=yes
51369
51370  saved_cxxflags="$CXXFLAGS"
51371  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51372  ac_ext=cpp
51373ac_cpp='$CXXCPP $CPPFLAGS'
51374ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51375ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51376ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51377
51378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51379/* end confdefs.h.  */
51380int i;
51381_ACEOF
51382if ac_fn_cxx_try_compile "$LINENO"; then :
51383
51384else
51385  supports=no
51386fi
51387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51388  ac_ext=cpp
51389ac_cpp='$CXXCPP $CPPFLAGS'
51390ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51391ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51392ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51393
51394  CXXFLAGS="$saved_cxxflags"
51395
51396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51397$as_echo "$supports" >&6; }
51398  if test "x$supports" = "xyes" ; then
51399    :
51400
51401  else
51402    :
51403    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51404  fi
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51418    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51419
51420  fi
51421  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51422    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51423    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51424  fi
51425
51426  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51427  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51428  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51429
51430  ###############################################################################
51431  #
51432  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51433  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51434  #
51435
51436  # Setup compiler/platform specific flags into
51437  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51438  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51439  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51440  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51441    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51442    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51443    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51444    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51445      # Force compatibility with i586 on 32 bit intel platforms.
51446      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51447      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51448    fi
51449    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51450        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51451    case $OPENJDK_BUILD_CPU_ARCH in
51452      arm )
51453        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51454        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51455        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51456        ;;
51457      ppc )
51458        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51459        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51460        ;;
51461      s390 )
51462        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51463        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51464        ;;
51465      * )
51466        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51467        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51468        ;;
51469    esac
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524    # Execute function body
51525
51526  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51527  REFERENCE_VERSION=6
51528
51529  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51530    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51531  fi
51532
51533  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51534    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51535  fi
51536
51537  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51538  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51539
51540  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51541    :
51542
51543  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51544  # runs afoul of the more aggressive versions of these optimisations.
51545  # Notably, value range propagation now assumes that the this pointer of C++
51546  # member functions is non-null.
51547  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51548        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51549        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51550$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51551  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51552  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51553
51554  else
51555    :
51556
51557  fi
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51573    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51574
51575    # Restrict the debug information created by Clang to avoid
51576    # too big object files and speed the build up a little bit
51577    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51578    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51579    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51580      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51581        # Force compatibility with i586 on 32 bit intel platforms.
51582        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51583        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51584      fi
51585      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51586      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51587          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51588      case $OPENJDK_BUILD_CPU_ARCH in
51589        ppc )
51590          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51591          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51592          ;;
51593        * )
51594          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51595          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51596          ;;
51597      esac
51598    fi
51599  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51600    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51601    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51602    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51603      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51604    fi
51605
51606    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51607    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51608  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51609    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51610    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51611    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51612  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51613    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51614        -MD -Zc:wchar_t- -W3 -wd4800 \
51615        -DWIN32_LEAN_AND_MEAN \
51616        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51617        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51618        -DWIN32 -DIAL"
51619    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51620      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51621    else
51622      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51623    fi
51624    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51625    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51626    # studio.
51627    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51628      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51629      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51630      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51631    fi
51632  fi
51633
51634  ###############################################################################
51635
51636  # Adjust flags according to debug level.
51637  case $DEBUG_LEVEL in
51638    fastdebug | slowdebug )
51639      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51640      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51641      ;;
51642    release )
51643      ;;
51644    * )
51645      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51646      ;;
51647  esac
51648
51649  # Set some common defines. These works for all compilers, but assume
51650  # -D is universally accepted.
51651
51652  # Setup endianness
51653  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51654    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51655    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51656    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51657    #   Note: -Dmacro         is the same as    #define macro 1
51658    #         -Dmacro=        is the same as    #define macro
51659    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51660      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51661    else
51662      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51663    fi
51664  else
51665    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51666    # are defined in the system?
51667    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51668      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51669    else
51670      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51671    fi
51672  fi
51673
51674  # Setup target OS define. Use OS target name but in upper case.
51675  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51676  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51677
51678  # Setup target CPU
51679  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51680      $OPENJDK_BUILD_ADD_LP64 \
51681      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51682
51683  # Setup debug/release defines
51684  if test "x$DEBUG_LEVEL" = xrelease; then
51685    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51686    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51687      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51688    fi
51689  else
51690    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51691  fi
51692
51693  # Set some additional per-OS defines.
51694  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51695    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51696    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51697        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51698  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51699    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51700    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51701        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51702  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51703    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51704    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51705    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51706    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51707        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51708        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51709        -fno-omit-frame-pointer"
51710  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51711    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51712    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51713    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51714        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51715        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51716  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51717    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51718  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51719    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51720    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51721  fi
51722
51723  # Set some additional per-CPU defines.
51724  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51725    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51726  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51727    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51728  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51729    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51730      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51731      # fixes `relocation truncated to fit' error for gcc 4.1.
51732      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51733      # Use ppc64 instructions, but schedule for power5
51734      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51735    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51736      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51737    fi
51738  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51739    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51740      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51741      # Little endian machine uses ELFv2 ABI.
51742      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51743      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51744      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51745    fi
51746  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51747    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51748      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51749    fi
51750  fi
51751
51752  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51753    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51754  fi
51755
51756  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51757    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51758      # Solaris does not have _LP64=1 in the old build.
51759      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51760      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51761    fi
51762  fi
51763
51764  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51765  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51766    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51767        -Wunused-value -Woverloaded-virtual"
51768
51769    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824    # Execute function body
51825
51826  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51827  REFERENCE_VERSION=4.8
51828
51829  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51830    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51831  fi
51832
51833  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51834    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51835  fi
51836
51837  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51838  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51839
51840  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51841    :
51842
51843            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51844            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51845
51846
51847  else
51848    :
51849
51850  fi
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865    fi
51866    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51867      # Non-zero builds have stricter warnings
51868      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51869    else
51870      if test "x$TOOLCHAIN_TYPE" = xclang; then
51871        # Some versions of llvm do not like -Wundef
51872        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51873      fi
51874    fi
51875  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51876    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51877        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51878  fi
51879
51880  # Additional macosx handling
51881  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51882    # Setting these parameters makes it an error to link to macosx APIs that are
51883    # newer than the given OS version and makes the linked binaries compatible
51884    # even if built on a newer version of the OS.
51885    # The expected format is X.Y.Z
51886    MACOSX_VERSION_MIN=10.7.0
51887
51888
51889    # The macro takes the version with no dots, ex: 1070
51890    # Let the flags variables get resolved in make for easier override on make
51891    # command line.
51892    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)"
51893    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51894  fi
51895
51896  # Setup some hard coded includes
51897  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51898      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51899      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51900      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51901      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51902      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51903      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51904
51905  # The shared libraries are compiled using the picflag.
51906  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51907      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51908  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51909      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51910
51911  # Executable flags
51912  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51913  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51914
51915
51916
51917
51918
51919
51920  # Setup LDFLAGS et al.
51921  #
51922
51923  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51924    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51925    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51926    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51927    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51928      LDFLAGS_SAFESH="-safeseh"
51929      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51930      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51931      # NOTE: Old build added -machine. Probably not needed.
51932      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51933    else
51934      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51935    fi
51936  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51937      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51938      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51939        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51940        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51941    fi
51942  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51943    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51944    # We have previously set HAS_GNU_HASH if this is the case
51945    if test -n "$HAS_GNU_HASH"; then
51946      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51947      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51948      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51949    fi
51950      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51951        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51952    fi
51953    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51954      # And since we now know that the linker is gnu, then add -z defs, to forbid
51955      # undefined symbols in object files.
51956      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51957      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51958      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51959      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51960      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51961      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51962        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51963      fi
51964      case $DEBUG_LEVEL in
51965        release )
51966          # tell linker to optimize libraries.
51967          # Should this be supplied to the OSS linker as well?
51968          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51969          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51970          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51971          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51972            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51973          fi
51974          ;;
51975        slowdebug )
51976          # Hotspot always let the linker optimize
51977          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51978          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51979            # do relocations at load
51980            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51981            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51982            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51983          fi
51984          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51985            # mark relocations read only
51986            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51987            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51988            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51989          fi
51990          ;;
51991        fastdebug )
51992          # Hotspot always let the linker optimize
51993          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51994          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51995            # mark relocations read only
51996            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51997            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51998            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51999          fi
52000          ;;
52001        * )
52002          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52003          ;;
52004        esac
52005    fi
52006  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52007    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52008    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52009    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52010    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52011    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52012    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52013      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52014    fi
52015  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52016    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52017    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52018    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52019  fi
52020
52021  # Customize LDFLAGS for executables
52022
52023  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52024
52025  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52026    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52027      LDFLAGS_STACK_SIZE=1048576
52028    else
52029      LDFLAGS_STACK_SIZE=327680
52030    fi
52031    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52032  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52033    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52034  fi
52035
52036  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52037
52038  # Customize LDFLAGS for libs
52039  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52040
52041  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52042  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52043    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52044        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52045    OPENJDK_BUILD_JDKLIB_LIBS=""
52046  else
52047    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52048        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52049
52050    if test "xBUILD" = "xTARGET"; then
52051      # On some platforms (mac) the linker warns about non existing -L dirs.
52052      # For any of the variants server, client or minimal, the dir matches the
52053      # variant name. The "main" variant should be used for linking. For the
52054      # rest, the dir is just server.
52055      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52056          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52057        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52058            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52059      else
52060        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52061            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52062      fi
52063    elif test "xBUILD" = "xBUILD"; then
52064      # When building a buildjdk, it's always only the server variant
52065      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52066          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52067    fi
52068
52069    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52070    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52071      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52072    fi
52073
52074  fi
52075
52076OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52077
52078  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52079  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52080    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52081  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52082    # FIXME: This hard-coded path is not really proper.
52083    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52084      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52085    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52086      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52087    fi
52088    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52089        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52090  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52091    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52092  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52093    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52094  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52095    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52096  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52097    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52098        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52099        wsock32.lib winmm.lib version.lib psapi.lib"
52100    fi
52101
52102  # Set OPENJDK_BUILD_JVM_ASFLAGS
52103  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52104    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52105      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52106    fi
52107  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52108    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52109  fi
52110
52111  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127  # Tests are only ever compiled for TARGET
52128  # Flags for compiling test libraries
52129  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52130  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52131
52132  # Flags for compiling test executables
52133  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52134  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52135
52136
52137
52138
52139
52140
52141  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52142  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52143
52144
52145
52146
52147
52148
52149  # Check that the compiler supports -mX (or -qX on AIX) flags
52150  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
52191
52192
52193
52194
52195
52196
52197
52198    # Execute function body
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247    # Execute function body
52248
52249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52250$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52251  supports=yes
52252
52253  saved_cflags="$CFLAGS"
52254  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52255  ac_ext=c
52256ac_cpp='$CPP $CPPFLAGS'
52257ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52258ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52259ac_compiler_gnu=$ac_cv_c_compiler_gnu
52260
52261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52262/* end confdefs.h.  */
52263int i;
52264_ACEOF
52265if ac_fn_c_try_compile "$LINENO"; then :
52266
52267else
52268  supports=no
52269fi
52270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52271  ac_ext=cpp
52272ac_cpp='$CXXCPP $CPPFLAGS'
52273ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52274ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52275ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52276
52277  CFLAGS="$saved_cflags"
52278
52279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52280$as_echo "$supports" >&6; }
52281  if test "x$supports" = "xyes" ; then
52282    :
52283    C_COMP_SUPPORTS="yes"
52284  else
52285    :
52286    C_COMP_SUPPORTS="no"
52287  fi
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347    # Execute function body
52348
52349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52350$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52351  supports=yes
52352
52353  saved_cxxflags="$CXXFLAGS"
52354  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52355  ac_ext=cpp
52356ac_cpp='$CXXCPP $CPPFLAGS'
52357ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52358ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52359ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52360
52361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52362/* end confdefs.h.  */
52363int i;
52364_ACEOF
52365if ac_fn_cxx_try_compile "$LINENO"; then :
52366
52367else
52368  supports=no
52369fi
52370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52371  ac_ext=cpp
52372ac_cpp='$CXXCPP $CPPFLAGS'
52373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52376
52377  CXXFLAGS="$saved_cxxflags"
52378
52379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52380$as_echo "$supports" >&6; }
52381  if test "x$supports" = "xyes" ; then
52382    :
52383    CXX_COMP_SUPPORTS="yes"
52384  else
52385    :
52386    CXX_COMP_SUPPORTS="no"
52387  fi
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52402$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52403  supports=no
52404  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52405
52406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52407$as_echo "$supports" >&6; }
52408  if test "x$supports" = "xyes" ; then
52409    :
52410    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52411  else
52412    :
52413    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52414  fi
52415
52416
52417
52418
52419
52420
52421
52422
52423  # Check whether --enable-warnings-as-errors was given.
52424if test "${enable_warnings_as_errors+set}" = set; then :
52425  enableval=$enable_warnings_as_errors;
52426fi
52427
52428
52429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52430$as_echo_n "checking if native warnings are errors... " >&6; }
52431  if test "x$enable_warnings_as_errors" = "xyes"; then
52432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52433$as_echo "yes (explicitly set)" >&6; }
52434    WARNINGS_AS_ERRORS=true
52435  elif test "x$enable_warnings_as_errors" = "xno"; then
52436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52437$as_echo "no" >&6; }
52438    WARNINGS_AS_ERRORS=false
52439  elif test "x$enable_warnings_as_errors" = "x"; then
52440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52441$as_echo "yes (default)" >&6; }
52442    WARNINGS_AS_ERRORS=true
52443  else
52444    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52445  fi
52446
52447
52448
52449  case "${TOOLCHAIN_TYPE}" in
52450    microsoft)
52451      DISABLE_WARNING_PREFIX="-wd"
52452      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52453      ;;
52454    solstudio)
52455      DISABLE_WARNING_PREFIX="-erroff="
52456      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52457      ;;
52458    gcc)
52459      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507    # Execute function body
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556    # Execute function body
52557
52558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52559$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52560  supports=yes
52561
52562  saved_cflags="$CFLAGS"
52563  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52564  ac_ext=c
52565ac_cpp='$CPP $CPPFLAGS'
52566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52568ac_compiler_gnu=$ac_cv_c_compiler_gnu
52569
52570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52571/* end confdefs.h.  */
52572int i;
52573_ACEOF
52574if ac_fn_c_try_compile "$LINENO"; then :
52575
52576else
52577  supports=no
52578fi
52579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52580  ac_ext=cpp
52581ac_cpp='$CXXCPP $CPPFLAGS'
52582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52585
52586  CFLAGS="$saved_cflags"
52587
52588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52589$as_echo "$supports" >&6; }
52590  if test "x$supports" = "xyes" ; then
52591    :
52592    C_COMP_SUPPORTS="yes"
52593  else
52594    :
52595    C_COMP_SUPPORTS="no"
52596  fi
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656    # Execute function body
52657
52658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52659$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52660  supports=yes
52661
52662  saved_cxxflags="$CXXFLAGS"
52663  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52664  ac_ext=cpp
52665ac_cpp='$CXXCPP $CPPFLAGS'
52666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52669
52670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52671/* end confdefs.h.  */
52672int i;
52673_ACEOF
52674if ac_fn_cxx_try_compile "$LINENO"; then :
52675
52676else
52677  supports=no
52678fi
52679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52680  ac_ext=cpp
52681ac_cpp='$CXXCPP $CPPFLAGS'
52682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52685
52686  CXXFLAGS="$saved_cxxflags"
52687
52688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52689$as_echo "$supports" >&6; }
52690  if test "x$supports" = "xyes" ; then
52691    :
52692    CXX_COMP_SUPPORTS="yes"
52693  else
52694    :
52695    CXX_COMP_SUPPORTS="no"
52696  fi
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52711$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52712  supports=no
52713  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52714
52715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52716$as_echo "$supports" >&6; }
52717  if test "x$supports" = "xyes" ; then
52718    :
52719    GCC_CAN_DISABLE_WARNINGS=true
52720  else
52721    :
52722    GCC_CAN_DISABLE_WARNINGS=false
52723
52724  fi
52725
52726
52727
52728
52729
52730
52731      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52732        DISABLE_WARNING_PREFIX="-Wno-"
52733      else
52734        DISABLE_WARNING_PREFIX=
52735      fi
52736      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52737      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52738      # CFLAGS since any target specific flags will likely not work with the
52739      # build compiler
52740      CC_OLD="$CC"
52741      CXX_OLD="$CXX"
52742      CC="$BUILD_CC"
52743      CXX="$BUILD_CXX"
52744      CFLAGS_OLD="$CFLAGS"
52745      CFLAGS=""
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793    # Execute function body
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842    # Execute function body
52843
52844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52845$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52846  supports=yes
52847
52848  saved_cflags="$CFLAGS"
52849  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52850  ac_ext=c
52851ac_cpp='$CPP $CPPFLAGS'
52852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52854ac_compiler_gnu=$ac_cv_c_compiler_gnu
52855
52856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52857/* end confdefs.h.  */
52858int i;
52859_ACEOF
52860if ac_fn_c_try_compile "$LINENO"; then :
52861
52862else
52863  supports=no
52864fi
52865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52866  ac_ext=cpp
52867ac_cpp='$CXXCPP $CPPFLAGS'
52868ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52869ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52870ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52871
52872  CFLAGS="$saved_cflags"
52873
52874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52875$as_echo "$supports" >&6; }
52876  if test "x$supports" = "xyes" ; then
52877    :
52878    C_COMP_SUPPORTS="yes"
52879  else
52880    :
52881    C_COMP_SUPPORTS="no"
52882  fi
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942    # Execute function body
52943
52944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52945$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52946  supports=yes
52947
52948  saved_cxxflags="$CXXFLAGS"
52949  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52950  ac_ext=cpp
52951ac_cpp='$CXXCPP $CPPFLAGS'
52952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52955
52956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52957/* end confdefs.h.  */
52958int i;
52959_ACEOF
52960if ac_fn_cxx_try_compile "$LINENO"; then :
52961
52962else
52963  supports=no
52964fi
52965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52966  ac_ext=cpp
52967ac_cpp='$CXXCPP $CPPFLAGS'
52968ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52969ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52970ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52971
52972  CXXFLAGS="$saved_cxxflags"
52973
52974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52975$as_echo "$supports" >&6; }
52976  if test "x$supports" = "xyes" ; then
52977    :
52978    CXX_COMP_SUPPORTS="yes"
52979  else
52980    :
52981    CXX_COMP_SUPPORTS="no"
52982  fi
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52997$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52998  supports=no
52999  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53000
53001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53002$as_echo "$supports" >&6; }
53003  if test "x$supports" = "xyes" ; then
53004    :
53005    BUILD_CC_CAN_DISABLE_WARNINGS=true
53006  else
53007    :
53008    BUILD_CC_CAN_DISABLE_WARNINGS=false
53009
53010  fi
53011
53012
53013
53014
53015
53016
53017      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53018        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53019      else
53020        BUILD_CC_DISABLE_WARNING_PREFIX=
53021      fi
53022      CC="$CC_OLD"
53023      CXX="$CXX_OLD"
53024      CFLAGS="$CFLAGS_OLD"
53025      ;;
53026    clang)
53027      DISABLE_WARNING_PREFIX="-Wno-"
53028      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53029      ;;
53030    xlc)
53031      DISABLE_WARNING_PREFIX="-qsuppress="
53032      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53033      ;;
53034  esac
53035
53036
53037
53038
53039
53040# Setup debug symbols (need objcopy from the toolchain for that)
53041
53042  #
53043  # NATIVE_DEBUG_SYMBOLS
53044  # This must be done after the toolchain is setup, since we're looking at objcopy.
53045  #
53046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53047$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53048
53049# Check whether --with-native-debug-symbols was given.
53050if test "${with_native_debug_symbols+set}" = set; then :
53051  withval=$with_native_debug_symbols;
53052        if test "x$OPENJDK_TARGET_OS" = xaix; then
53053          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53054            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53055          fi
53056        fi
53057
53058else
53059
53060        if test "x$OPENJDK_TARGET_OS" = xaix; then
53061          # AIX doesn't support 'zipped' so use 'internal' as default
53062          with_native_debug_symbols="internal"
53063        else
53064          if test "x$STATIC_BUILD" = xtrue; then
53065            with_native_debug_symbols="none"
53066          else
53067            with_native_debug_symbols="zipped"
53068          fi
53069        fi
53070
53071fi
53072
53073  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53075$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53076
53077  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53078
53079    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53080      if test "x$OBJCOPY" = x; then
53081        # enabling of enable-debug-symbols and can't find objcopy
53082        # this is an error
53083        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53084      fi
53085    fi
53086
53087    COMPILE_WITH_DEBUG_SYMBOLS=true
53088    COPY_DEBUG_SYMBOLS=true
53089    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53090  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53091    COMPILE_WITH_DEBUG_SYMBOLS=false
53092    COPY_DEBUG_SYMBOLS=false
53093    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53094  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53095    COMPILE_WITH_DEBUG_SYMBOLS=true
53096    COPY_DEBUG_SYMBOLS=false
53097    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53098  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53099
53100    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53101      if test "x$OBJCOPY" = x; then
53102        # enabling of enable-debug-symbols and can't find objcopy
53103        # this is an error
53104        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53105      fi
53106    fi
53107
53108    COMPILE_WITH_DEBUG_SYMBOLS=true
53109    COPY_DEBUG_SYMBOLS=true
53110    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53111  else
53112    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53113  fi
53114
53115  # --enable-debug-symbols is deprecated.
53116  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53117
53118  # Check whether --enable-debug-symbols was given.
53119if test "${enable_debug_symbols+set}" = set; then :
53120  enableval=$enable_debug_symbols;
53121fi
53122
53123  if test "x$enable_debug_symbols" != x; then
53124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53125$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53126
53127    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53128      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53129$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53130    fi
53131
53132  fi
53133
53134
53135  # --enable-zip-debug-info is deprecated.
53136  # Please use --with-native-debug-symbols=zipped .
53137
53138  # Check whether --enable-zip-debug-info was given.
53139if test "${enable_zip_debug_info+set}" = set; then :
53140  enableval=$enable_zip_debug_info;
53141fi
53142
53143  if test "x$enable_zip_debug_info" != x; then
53144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53145$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53146
53147    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53148      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53149$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53150    fi
53151
53152  fi
53153
53154
53155
53156
53157
53158
53159
53160  # Check whether --enable-native-coverage was given.
53161if test "${enable_native_coverage+set}" = set; then :
53162  enableval=$enable_native_coverage;
53163fi
53164
53165  GCOV_ENABLED="false"
53166  if test "x$enable_native_coverage" = "xyes"; then
53167    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53168      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53169$as_echo_n "checking if native coverage is enabled... " >&6; }
53170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53171$as_echo "yes" >&6; }
53172      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53173      GCOV_LDFLAGS="-fprofile-arcs"
53174      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53175      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53176      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53177      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53178      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53179      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53180      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53181      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53182      GCOV_ENABLED="true"
53183    else
53184      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53185    fi
53186  elif test "x$enable_native_coverage" = "xno"; then
53187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53188$as_echo_n "checking if native coverage is enabled... " >&6; }
53189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53190$as_echo "no" >&6; }
53191  elif test "x$enable_native_coverage" != "x"; then
53192    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53193  fi
53194
53195
53196
53197
53198# Need toolchain to setup dtrace
53199
53200  # Test for dtrace dependencies
53201  # Check whether --enable-dtrace was given.
53202if test "${enable_dtrace+set}" = set; then :
53203  enableval=$enable_dtrace;
53204fi
53205
53206
53207  DTRACE_DEP_MISSING=false
53208
53209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53210$as_echo_n "checking for dtrace tool... " >&6; }
53211  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53213$as_echo "$DTRACE" >&6; }
53214  else
53215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53216$as_echo "not found, cannot build dtrace" >&6; }
53217    DTRACE_DEP_MISSING=true
53218  fi
53219
53220  for ac_header in sys/sdt.h
53221do :
53222  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53223if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53224  cat >>confdefs.h <<_ACEOF
53225#define HAVE_SYS_SDT_H 1
53226_ACEOF
53227 DTRACE_HEADERS_OK=yes
53228else
53229  DTRACE_HEADERS_OK=no
53230fi
53231
53232done
53233
53234  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53235    DTRACE_DEP_MISSING=true
53236  fi
53237
53238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53239$as_echo_n "checking if dtrace should be built... " >&6; }
53240  if test "x$enable_dtrace" = "xyes"; then
53241    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53242      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53243$as_echo "no, missing dependencies" >&6; }
53244
53245  # Print a helpful message on how to acquire the necessary build dependency.
53246  # dtrace is the help tag: freetype, cups, alsa etc
53247  MISSING_DEPENDENCY=dtrace
53248
53249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53250    cygwin_help $MISSING_DEPENDENCY
53251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53252    msys_help $MISSING_DEPENDENCY
53253  else
53254    PKGHANDLER_COMMAND=
53255
53256    case $PKGHANDLER in
53257      apt-get)
53258        apt_help     $MISSING_DEPENDENCY ;;
53259      yum)
53260        yum_help     $MISSING_DEPENDENCY ;;
53261      brew)
53262        brew_help    $MISSING_DEPENDENCY ;;
53263      port)
53264        port_help    $MISSING_DEPENDENCY ;;
53265      pkgutil)
53266        pkgutil_help $MISSING_DEPENDENCY ;;
53267      pkgadd)
53268        pkgadd_help  $MISSING_DEPENDENCY ;;
53269    esac
53270
53271    if test "x$PKGHANDLER_COMMAND" != x; then
53272      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53273    fi
53274  fi
53275
53276      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53277    else
53278      INCLUDE_DTRACE=true
53279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53280$as_echo "yes, forced" >&6; }
53281    fi
53282  elif test "x$enable_dtrace" = "xno"; then
53283    INCLUDE_DTRACE=false
53284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53285$as_echo "no, forced" >&6; }
53286  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53287    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53288      INCLUDE_DTRACE=false
53289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53290$as_echo "no, missing dependencies" >&6; }
53291    else
53292      INCLUDE_DTRACE=true
53293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53294$as_echo "yes, dependencies present" >&6; }
53295    fi
53296  else
53297    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53298  fi
53299
53300
53301  # Check whether --enable-aot was given.
53302if test "${enable_aot+set}" = set; then :
53303  enableval=$enable_aot;
53304fi
53305
53306
53307  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53308    ENABLE_AOT="true"
53309  elif test "x$enable_aot" = "xyes"; then
53310    ENABLE_AOT="true"
53311  elif test "x$enable_aot" = "xno"; then
53312    ENABLE_AOT="false"
53313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53314$as_echo_n "checking if aot should be enabled... " >&6; }
53315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53316$as_echo "no, forced" >&6; }
53317  else
53318    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53319  fi
53320
53321  if test "x$ENABLE_AOT" = "xtrue"; then
53322    # Only enable AOT on linux-X64.
53323    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53324      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53325        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53326          ENABLE_AOT="true"
53327        else
53328          ENABLE_AOT="false"
53329          if test "x$enable_aot" = "xyes"; then
53330            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53331          fi
53332        fi
53333      else
53334        ENABLE_AOT="false"
53335        if test "x$enable_aot" = "xyes"; then
53336          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53337        fi
53338      fi
53339    else
53340      ENABLE_AOT="false"
53341      if test "x$enable_aot" = "xyes"; then
53342        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53343      fi
53344    fi
53345  fi
53346
53347
53348
53349
53350  # Check whether --enable-hotspot-gtest was given.
53351if test "${enable_hotspot_gtest+set}" = set; then :
53352  enableval=$enable_hotspot_gtest;
53353fi
53354
53355
53356  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53357    GTEST_DIR_EXISTS="true"
53358  else
53359    GTEST_DIR_EXISTS="false"
53360  fi
53361
53362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53363$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53364  if test "x$enable_hotspot_gtest" = "xyes"; then
53365    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53367$as_echo "yes, forced" >&6; }
53368      BUILD_GTEST="true"
53369    else
53370      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53371    fi
53372  elif test "x$enable_hotspot_gtest" = "xno"; then
53373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53374$as_echo "no, forced" >&6; }
53375    BUILD_GTEST="false"
53376  elif test "x$enable_hotspot_gtest" = "x"; then
53377    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53379$as_echo "yes" >&6; }
53380      BUILD_GTEST="true"
53381    else
53382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53383$as_echo "no" >&6; }
53384      BUILD_GTEST="false"
53385    fi
53386  else
53387    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53388  fi
53389
53390
53391
53392
53393###############################################################################
53394#
53395# Check dependencies for external and internal libraries.
53396#
53397###############################################################################
53398
53399# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53400
53401  # When using cygwin or msys, we need a wrapper binary that renames
53402  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53403  # @files and rewrites these too! This wrapper binary is
53404  # called fixpath.
53405  FIXPATH=
53406  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53408$as_echo_n "checking if fixpath can be created... " >&6; }
53409    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53410    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53411    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53412    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53413      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53414      FIXPATH="$FIXPATH_BIN -c"
53415    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53416      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53417      # @ was chosen as separator to minimize risk of other tools messing around with it
53418      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53419          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53420      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53421      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53422    fi
53423    FIXPATH_SRC_W="$FIXPATH_SRC"
53424    FIXPATH_BIN_W="$FIXPATH_BIN"
53425
53426  unix_path="$FIXPATH_SRC_W"
53427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53428    windows_path=`$CYGPATH -m "$unix_path"`
53429    FIXPATH_SRC_W="$windows_path"
53430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53431    windows_path=`cmd //c echo $unix_path`
53432    FIXPATH_SRC_W="$windows_path"
53433  fi
53434
53435
53436  unix_path="$FIXPATH_BIN_W"
53437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53438    windows_path=`$CYGPATH -m "$unix_path"`
53439    FIXPATH_BIN_W="$windows_path"
53440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53441    windows_path=`cmd //c echo $unix_path`
53442    FIXPATH_BIN_W="$windows_path"
53443  fi
53444
53445    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53446    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53447    cd $FIXPATH_DIR
53448    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53449    cd $CURDIR
53450
53451    if test ! -x $FIXPATH_BIN; then
53452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53453$as_echo "no" >&6; }
53454      cat $FIXPATH_DIR/fixpath1.log
53455      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53456    fi
53457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53458$as_echo "yes" >&6; }
53459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53460$as_echo_n "checking if fixpath.exe works... " >&6; }
53461    cd $FIXPATH_DIR
53462    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53463        > $FIXPATH_DIR/fixpath2.log 2>&1
53464    cd $CURDIR
53465    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53467$as_echo "no" >&6; }
53468      cat $FIXPATH_DIR/fixpath2.log
53469      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53470    fi
53471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53472$as_echo "yes" >&6; }
53473
53474    FIXPATH_DETACH_FLAG="--detach"
53475  fi
53476
53477
53478
53479
53480
53481
53482  # Check if X11 is needed
53483  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53484    # No X11 support on windows or macosx
53485    NEEDS_LIB_X11=false
53486  else
53487    # All other instances need X11, even if building headless only, libawt still
53488    # needs X11 headers.
53489    NEEDS_LIB_X11=true
53490  fi
53491
53492  # Check if cups is needed
53493  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53494    # Windows have a separate print system
53495    NEEDS_LIB_CUPS=false
53496  else
53497    NEEDS_LIB_CUPS=true
53498  fi
53499
53500  # A custom hook may have set this already
53501  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53502    NEEDS_LIB_FREETYPE=true
53503  fi
53504
53505  # Check if alsa is needed
53506  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53507    NEEDS_LIB_ALSA=true
53508  else
53509    NEEDS_LIB_ALSA=false
53510  fi
53511
53512  # Check if ffi is needed
53513  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53514    NEEDS_LIB_FFI=true
53515  else
53516    NEEDS_LIB_FFI=false
53517  fi
53518
53519
53520  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53521  # dynamic build is configured on command line.
53522
53523# Check whether --with-stdc++lib was given.
53524if test "${with_stdc__lib+set}" = set; then :
53525  withval=$with_stdc__lib;
53526        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53527                && test "x$with_stdc__lib" != xdefault; then
53528          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53529        fi
53530
53531else
53532  with_stdc__lib=default
53533
53534fi
53535
53536
53537  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53538    # Test if stdc++ can be linked statically.
53539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53540$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53541    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53542    ac_ext=cpp
53543ac_cpp='$CXXCPP $CPPFLAGS'
53544ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53545ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53546ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53547
53548    OLD_LIBS="$LIBS"
53549    LIBS="$STATIC_STDCXX_FLAGS"
53550    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53551/* end confdefs.h.  */
53552
53553int
53554main ()
53555{
53556return 0;
53557  ;
53558  return 0;
53559}
53560_ACEOF
53561if ac_fn_cxx_try_link "$LINENO"; then :
53562  has_static_libstdcxx=yes
53563else
53564  has_static_libstdcxx=no
53565fi
53566rm -f core conftest.err conftest.$ac_objext \
53567    conftest$ac_exeext conftest.$ac_ext
53568    LIBS="$OLD_LIBS"
53569    ac_ext=cpp
53570ac_cpp='$CXXCPP $CPPFLAGS'
53571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53574
53575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53576$as_echo "$has_static_libstdcxx" >&6; }
53577
53578    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53579      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53580    fi
53581
53582    # If dynamic was requested, it's available since it would fail above otherwise.
53583    # If dynamic wasn't requested, go with static unless it isn't available.
53584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53585$as_echo_n "checking how to link with libstdc++... " >&6; }
53586    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53587        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53589$as_echo "dynamic" >&6; }
53590    else
53591      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53592      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53593      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53594      # just use the same setting as for the TARGET toolchain.
53595      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53597$as_echo "static" >&6; }
53598    fi
53599  fi
53600
53601  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53602  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53603    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53604  fi
53605
53606
53607
53608  # Setup Windows runtime dlls
53609  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53610
53611
53612# Check whether --with-msvcr-dll was given.
53613if test "${with_msvcr_dll+set}" = set; then :
53614  withval=$with_msvcr_dll;
53615fi
53616
53617
53618  if test "x$with_msvcr_dll" != x; then
53619    # If given explicitly by user, do not probe. If not present, fail directly.
53620
53621  DLL_NAME="$MSVCR_NAME"
53622  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53623  METHOD="--with-msvcr-dll"
53624  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53625    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53626$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53627
53628    # Need to check if the found msvcr is correct architecture
53629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53630$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53631    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53633      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53634      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53635      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53636        CORRECT_MSVCR_ARCH="PE32 executable"
53637      else
53638        CORRECT_MSVCR_ARCH="PE32+ executable"
53639      fi
53640    else
53641      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53642        CORRECT_MSVCR_ARCH=386
53643      else
53644        CORRECT_MSVCR_ARCH=x86-64
53645      fi
53646    fi
53647    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53649$as_echo "ok" >&6; }
53650      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53651
53652  # Only process if variable expands to non-empty
53653
53654  if test "x$MSVC_DLL" != x; then
53655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53656
53657  # Input might be given as Windows format, start by converting to
53658  # unix format.
53659  path="$MSVC_DLL"
53660  new_path=`$CYGPATH -u "$path"`
53661
53662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53665  # "foo.exe" is OK but "foo" is an error.
53666  #
53667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53668  # It is also a way to make sure we got the proper file name for the real test later on.
53669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53670  if test "x$test_shortpath" = x; then
53671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53672$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53673    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53674  fi
53675
53676  # Call helper function which possibly converts this using DOS-style short mode.
53677  # If so, the updated path is stored in $new_path.
53678
53679  input_path="$new_path"
53680  # Check if we need to convert this using DOS-style short mode. If the path
53681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53682  # take no chances and rewrite it.
53683  # Note: m4 eats our [], so we need to use [ and ] instead.
53684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53685  if test "x$has_forbidden_chars" != x; then
53686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53690      # Going to short mode and back again did indeed matter. Since short mode is
53691      # case insensitive, let's make it lowercase to improve readability.
53692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53693      # Now convert it back to Unix-style (cygpath)
53694      input_path=`$CYGPATH -u "$shortmode_path"`
53695      new_path="$input_path"
53696    fi
53697  fi
53698
53699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53700  if test "x$test_cygdrive_prefix" = x; then
53701    # As a simple fix, exclude /usr/bin since it's not a real path.
53702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53704      # a path prefixed by /cygdrive for fixpath to work.
53705      new_path="$CYGWIN_ROOT_PATH$input_path"
53706    fi
53707  fi
53708
53709
53710  if test "x$path" != "x$new_path"; then
53711    MSVC_DLL="$new_path"
53712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53713$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53714  fi
53715
53716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53717
53718  path="$MSVC_DLL"
53719  has_colon=`$ECHO $path | $GREP ^.:`
53720  new_path="$path"
53721  if test "x$has_colon" = x; then
53722    # Not in mixed or Windows style, start by that.
53723    new_path=`cmd //c echo $path`
53724  fi
53725
53726
53727  input_path="$new_path"
53728  # Check if we need to convert this using DOS-style short mode. If the path
53729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53730  # take no chances and rewrite it.
53731  # Note: m4 eats our [], so we need to use [ and ] instead.
53732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53733  if test "x$has_forbidden_chars" != x; then
53734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53736  fi
53737
53738
53739  windows_path="$new_path"
53740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53741    unix_path=`$CYGPATH -u "$windows_path"`
53742    new_path="$unix_path"
53743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53745    new_path="$unix_path"
53746  fi
53747
53748  if test "x$path" != "x$new_path"; then
53749    MSVC_DLL="$new_path"
53750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53751$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53752  fi
53753
53754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53756
53757    else
53758      # We're on a unix platform. Hooray! :)
53759      path="$MSVC_DLL"
53760      has_space=`$ECHO "$path" | $GREP " "`
53761      if test "x$has_space" != x; then
53762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53763$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53765      fi
53766
53767      # Use eval to expand a potential ~
53768      eval path="$path"
53769      if test ! -f "$path" && test ! -d "$path"; then
53770        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53771      fi
53772
53773      if test -d "$path"; then
53774        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53775      else
53776        dir="`$DIRNAME "$path"`"
53777        base="`$BASENAME "$path"`"
53778        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53779      fi
53780    fi
53781  fi
53782
53783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53784$as_echo_n "checking for $DLL_NAME... " >&6; }
53785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53786$as_echo "$MSVC_DLL" >&6; }
53787    else
53788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53789$as_echo "incorrect, ignoring" >&6; }
53790      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53791$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53792    fi
53793  fi
53794
53795    if test "x$MSVC_DLL" = x; then
53796      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53797    fi
53798    MSVCR_DLL="$MSVC_DLL"
53799  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53800
53801  DLL_NAME="$MSVCR_NAME"
53802  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53803  METHOD="devkit"
53804  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53805    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53806$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53807
53808    # Need to check if the found msvcr is correct architecture
53809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53810$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53811    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53813      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53814      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53815      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53816        CORRECT_MSVCR_ARCH="PE32 executable"
53817      else
53818        CORRECT_MSVCR_ARCH="PE32+ executable"
53819      fi
53820    else
53821      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53822        CORRECT_MSVCR_ARCH=386
53823      else
53824        CORRECT_MSVCR_ARCH=x86-64
53825      fi
53826    fi
53827    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53829$as_echo "ok" >&6; }
53830      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53831
53832  # Only process if variable expands to non-empty
53833
53834  if test "x$MSVC_DLL" != x; then
53835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53836
53837  # Input might be given as Windows format, start by converting to
53838  # unix format.
53839  path="$MSVC_DLL"
53840  new_path=`$CYGPATH -u "$path"`
53841
53842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53845  # "foo.exe" is OK but "foo" is an error.
53846  #
53847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53848  # It is also a way to make sure we got the proper file name for the real test later on.
53849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53850  if test "x$test_shortpath" = x; then
53851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53852$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53853    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53854  fi
53855
53856  # Call helper function which possibly converts this using DOS-style short mode.
53857  # If so, the updated path is stored in $new_path.
53858
53859  input_path="$new_path"
53860  # Check if we need to convert this using DOS-style short mode. If the path
53861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53862  # take no chances and rewrite it.
53863  # Note: m4 eats our [], so we need to use [ and ] instead.
53864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53865  if test "x$has_forbidden_chars" != x; then
53866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53870      # Going to short mode and back again did indeed matter. Since short mode is
53871      # case insensitive, let's make it lowercase to improve readability.
53872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53873      # Now convert it back to Unix-style (cygpath)
53874      input_path=`$CYGPATH -u "$shortmode_path"`
53875      new_path="$input_path"
53876    fi
53877  fi
53878
53879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53880  if test "x$test_cygdrive_prefix" = x; then
53881    # As a simple fix, exclude /usr/bin since it's not a real path.
53882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53884      # a path prefixed by /cygdrive for fixpath to work.
53885      new_path="$CYGWIN_ROOT_PATH$input_path"
53886    fi
53887  fi
53888
53889
53890  if test "x$path" != "x$new_path"; then
53891    MSVC_DLL="$new_path"
53892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53893$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53894  fi
53895
53896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53897
53898  path="$MSVC_DLL"
53899  has_colon=`$ECHO $path | $GREP ^.:`
53900  new_path="$path"
53901  if test "x$has_colon" = x; then
53902    # Not in mixed or Windows style, start by that.
53903    new_path=`cmd //c echo $path`
53904  fi
53905
53906
53907  input_path="$new_path"
53908  # Check if we need to convert this using DOS-style short mode. If the path
53909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53910  # take no chances and rewrite it.
53911  # Note: m4 eats our [], so we need to use [ and ] instead.
53912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53913  if test "x$has_forbidden_chars" != x; then
53914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53916  fi
53917
53918
53919  windows_path="$new_path"
53920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53921    unix_path=`$CYGPATH -u "$windows_path"`
53922    new_path="$unix_path"
53923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53925    new_path="$unix_path"
53926  fi
53927
53928  if test "x$path" != "x$new_path"; then
53929    MSVC_DLL="$new_path"
53930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53931$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53932  fi
53933
53934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53936
53937    else
53938      # We're on a unix platform. Hooray! :)
53939      path="$MSVC_DLL"
53940      has_space=`$ECHO "$path" | $GREP " "`
53941      if test "x$has_space" != x; then
53942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53943$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53944        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53945      fi
53946
53947      # Use eval to expand a potential ~
53948      eval path="$path"
53949      if test ! -f "$path" && test ! -d "$path"; then
53950        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53951      fi
53952
53953      if test -d "$path"; then
53954        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53955      else
53956        dir="`$DIRNAME "$path"`"
53957        base="`$BASENAME "$path"`"
53958        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53959      fi
53960    fi
53961  fi
53962
53963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53964$as_echo_n "checking for $DLL_NAME... " >&6; }
53965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53966$as_echo "$MSVC_DLL" >&6; }
53967    else
53968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53969$as_echo "incorrect, ignoring" >&6; }
53970      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53971$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53972    fi
53973  fi
53974
53975    if test "x$MSVC_DLL" = x; then
53976      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53977    fi
53978    MSVCR_DLL="$MSVC_DLL"
53979  else
53980
53981  DLL_NAME="${MSVCR_NAME}"
53982  MSVC_DLL=
53983
53984  if test "x$MSVC_DLL" = x; then
53985    # Probe: Using well-known location from Visual Studio 10.0
53986    if test "x$VCINSTALLDIR" != x; then
53987      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53988
53989  windows_path="$CYGWIN_VC_INSTALL_DIR"
53990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53991    unix_path=`$CYGPATH -u "$windows_path"`
53992    CYGWIN_VC_INSTALL_DIR="$unix_path"
53993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53995    CYGWIN_VC_INSTALL_DIR="$unix_path"
53996  fi
53997
53998      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53999        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54000      else
54001        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54002      fi
54003      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54004
54005  DLL_NAME="$DLL_NAME"
54006  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54007  METHOD="well-known location in VCINSTALLDIR"
54008  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54009    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54010$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54011
54012    # Need to check if the found msvcr is correct architecture
54013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54014$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54015    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54017      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54018      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54019      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54020        CORRECT_MSVCR_ARCH="PE32 executable"
54021      else
54022        CORRECT_MSVCR_ARCH="PE32+ executable"
54023      fi
54024    else
54025      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54026        CORRECT_MSVCR_ARCH=386
54027      else
54028        CORRECT_MSVCR_ARCH=x86-64
54029      fi
54030    fi
54031    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54033$as_echo "ok" >&6; }
54034      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54035
54036  # Only process if variable expands to non-empty
54037
54038  if test "x$MSVC_DLL" != x; then
54039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54040
54041  # Input might be given as Windows format, start by converting to
54042  # unix format.
54043  path="$MSVC_DLL"
54044  new_path=`$CYGPATH -u "$path"`
54045
54046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54049  # "foo.exe" is OK but "foo" is an error.
54050  #
54051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54052  # It is also a way to make sure we got the proper file name for the real test later on.
54053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54054  if test "x$test_shortpath" = x; then
54055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54056$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54057    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54058  fi
54059
54060  # Call helper function which possibly converts this using DOS-style short mode.
54061  # If so, the updated path is stored in $new_path.
54062
54063  input_path="$new_path"
54064  # Check if we need to convert this using DOS-style short mode. If the path
54065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54066  # take no chances and rewrite it.
54067  # Note: m4 eats our [], so we need to use [ and ] instead.
54068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54069  if test "x$has_forbidden_chars" != x; then
54070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54074      # Going to short mode and back again did indeed matter. Since short mode is
54075      # case insensitive, let's make it lowercase to improve readability.
54076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54077      # Now convert it back to Unix-style (cygpath)
54078      input_path=`$CYGPATH -u "$shortmode_path"`
54079      new_path="$input_path"
54080    fi
54081  fi
54082
54083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54084  if test "x$test_cygdrive_prefix" = x; then
54085    # As a simple fix, exclude /usr/bin since it's not a real path.
54086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54088      # a path prefixed by /cygdrive for fixpath to work.
54089      new_path="$CYGWIN_ROOT_PATH$input_path"
54090    fi
54091  fi
54092
54093
54094  if test "x$path" != "x$new_path"; then
54095    MSVC_DLL="$new_path"
54096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54097$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54098  fi
54099
54100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54101
54102  path="$MSVC_DLL"
54103  has_colon=`$ECHO $path | $GREP ^.:`
54104  new_path="$path"
54105  if test "x$has_colon" = x; then
54106    # Not in mixed or Windows style, start by that.
54107    new_path=`cmd //c echo $path`
54108  fi
54109
54110
54111  input_path="$new_path"
54112  # Check if we need to convert this using DOS-style short mode. If the path
54113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54114  # take no chances and rewrite it.
54115  # Note: m4 eats our [], so we need to use [ and ] instead.
54116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54117  if test "x$has_forbidden_chars" != x; then
54118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54120  fi
54121
54122
54123  windows_path="$new_path"
54124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54125    unix_path=`$CYGPATH -u "$windows_path"`
54126    new_path="$unix_path"
54127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54129    new_path="$unix_path"
54130  fi
54131
54132  if test "x$path" != "x$new_path"; then
54133    MSVC_DLL="$new_path"
54134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54135$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54136  fi
54137
54138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54140
54141    else
54142      # We're on a unix platform. Hooray! :)
54143      path="$MSVC_DLL"
54144      has_space=`$ECHO "$path" | $GREP " "`
54145      if test "x$has_space" != x; then
54146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54147$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54149      fi
54150
54151      # Use eval to expand a potential ~
54152      eval path="$path"
54153      if test ! -f "$path" && test ! -d "$path"; then
54154        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54155      fi
54156
54157      if test -d "$path"; then
54158        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54159      else
54160        dir="`$DIRNAME "$path"`"
54161        base="`$BASENAME "$path"`"
54162        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54163      fi
54164    fi
54165  fi
54166
54167      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54168$as_echo_n "checking for $DLL_NAME... " >&6; }
54169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54170$as_echo "$MSVC_DLL" >&6; }
54171    else
54172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54173$as_echo "incorrect, ignoring" >&6; }
54174      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54175$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54176    fi
54177  fi
54178
54179    fi
54180  fi
54181
54182  if test "x$MSVC_DLL" = x; then
54183    # Probe: Check in the Boot JDK directory.
54184    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54185
54186  DLL_NAME="$DLL_NAME"
54187  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54188  METHOD="well-known location in Boot JDK"
54189  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54190    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54191$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54192
54193    # Need to check if the found msvcr is correct architecture
54194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54195$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54196    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54197    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54198      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54199      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54200      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54201        CORRECT_MSVCR_ARCH="PE32 executable"
54202      else
54203        CORRECT_MSVCR_ARCH="PE32+ executable"
54204      fi
54205    else
54206      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54207        CORRECT_MSVCR_ARCH=386
54208      else
54209        CORRECT_MSVCR_ARCH=x86-64
54210      fi
54211    fi
54212    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54214$as_echo "ok" >&6; }
54215      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54216
54217  # Only process if variable expands to non-empty
54218
54219  if test "x$MSVC_DLL" != x; then
54220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54221
54222  # Input might be given as Windows format, start by converting to
54223  # unix format.
54224  path="$MSVC_DLL"
54225  new_path=`$CYGPATH -u "$path"`
54226
54227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54230  # "foo.exe" is OK but "foo" is an error.
54231  #
54232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54233  # It is also a way to make sure we got the proper file name for the real test later on.
54234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54235  if test "x$test_shortpath" = x; then
54236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54237$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54238    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54239  fi
54240
54241  # Call helper function which possibly converts this using DOS-style short mode.
54242  # If so, the updated path is stored in $new_path.
54243
54244  input_path="$new_path"
54245  # Check if we need to convert this using DOS-style short mode. If the path
54246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54247  # take no chances and rewrite it.
54248  # Note: m4 eats our [], so we need to use [ and ] instead.
54249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54250  if test "x$has_forbidden_chars" != x; then
54251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54255      # Going to short mode and back again did indeed matter. Since short mode is
54256      # case insensitive, let's make it lowercase to improve readability.
54257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54258      # Now convert it back to Unix-style (cygpath)
54259      input_path=`$CYGPATH -u "$shortmode_path"`
54260      new_path="$input_path"
54261    fi
54262  fi
54263
54264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54265  if test "x$test_cygdrive_prefix" = x; then
54266    # As a simple fix, exclude /usr/bin since it's not a real path.
54267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54269      # a path prefixed by /cygdrive for fixpath to work.
54270      new_path="$CYGWIN_ROOT_PATH$input_path"
54271    fi
54272  fi
54273
54274
54275  if test "x$path" != "x$new_path"; then
54276    MSVC_DLL="$new_path"
54277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54278$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54279  fi
54280
54281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54282
54283  path="$MSVC_DLL"
54284  has_colon=`$ECHO $path | $GREP ^.:`
54285  new_path="$path"
54286  if test "x$has_colon" = x; then
54287    # Not in mixed or Windows style, start by that.
54288    new_path=`cmd //c echo $path`
54289  fi
54290
54291
54292  input_path="$new_path"
54293  # Check if we need to convert this using DOS-style short mode. If the path
54294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54295  # take no chances and rewrite it.
54296  # Note: m4 eats our [], so we need to use [ and ] instead.
54297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54298  if test "x$has_forbidden_chars" != x; then
54299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54301  fi
54302
54303
54304  windows_path="$new_path"
54305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54306    unix_path=`$CYGPATH -u "$windows_path"`
54307    new_path="$unix_path"
54308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54310    new_path="$unix_path"
54311  fi
54312
54313  if test "x$path" != "x$new_path"; then
54314    MSVC_DLL="$new_path"
54315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54316$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54317  fi
54318
54319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54321
54322    else
54323      # We're on a unix platform. Hooray! :)
54324      path="$MSVC_DLL"
54325      has_space=`$ECHO "$path" | $GREP " "`
54326      if test "x$has_space" != x; then
54327        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54328$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54329        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54330      fi
54331
54332      # Use eval to expand a potential ~
54333      eval path="$path"
54334      if test ! -f "$path" && test ! -d "$path"; then
54335        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54336      fi
54337
54338      if test -d "$path"; then
54339        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54340      else
54341        dir="`$DIRNAME "$path"`"
54342        base="`$BASENAME "$path"`"
54343        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54344      fi
54345    fi
54346  fi
54347
54348      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54349$as_echo_n "checking for $DLL_NAME... " >&6; }
54350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54351$as_echo "$MSVC_DLL" >&6; }
54352    else
54353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54354$as_echo "incorrect, ignoring" >&6; }
54355      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54356$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54357    fi
54358  fi
54359
54360  fi
54361
54362  if test "x$MSVC_DLL" = x; then
54363    # Probe: Look in the Windows system32 directory
54364    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54365
54366  windows_path="$CYGWIN_SYSTEMROOT"
54367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54368    unix_path=`$CYGPATH -u "$windows_path"`
54369    CYGWIN_SYSTEMROOT="$unix_path"
54370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54372    CYGWIN_SYSTEMROOT="$unix_path"
54373  fi
54374
54375    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54376
54377  DLL_NAME="$DLL_NAME"
54378  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54379  METHOD="well-known location in SYSTEMROOT"
54380  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54381    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54382$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54383
54384    # Need to check if the found msvcr is correct architecture
54385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54386$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54387    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54389      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54390      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54391      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54392        CORRECT_MSVCR_ARCH="PE32 executable"
54393      else
54394        CORRECT_MSVCR_ARCH="PE32+ executable"
54395      fi
54396    else
54397      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54398        CORRECT_MSVCR_ARCH=386
54399      else
54400        CORRECT_MSVCR_ARCH=x86-64
54401      fi
54402    fi
54403    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54405$as_echo "ok" >&6; }
54406      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54407
54408  # Only process if variable expands to non-empty
54409
54410  if test "x$MSVC_DLL" != x; then
54411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54412
54413  # Input might be given as Windows format, start by converting to
54414  # unix format.
54415  path="$MSVC_DLL"
54416  new_path=`$CYGPATH -u "$path"`
54417
54418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54421  # "foo.exe" is OK but "foo" is an error.
54422  #
54423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54424  # It is also a way to make sure we got the proper file name for the real test later on.
54425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54426  if test "x$test_shortpath" = x; then
54427    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54428$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54429    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54430  fi
54431
54432  # Call helper function which possibly converts this using DOS-style short mode.
54433  # If so, the updated path is stored in $new_path.
54434
54435  input_path="$new_path"
54436  # Check if we need to convert this using DOS-style short mode. If the path
54437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54438  # take no chances and rewrite it.
54439  # Note: m4 eats our [], so we need to use [ and ] instead.
54440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54441  if test "x$has_forbidden_chars" != x; then
54442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54446      # Going to short mode and back again did indeed matter. Since short mode is
54447      # case insensitive, let's make it lowercase to improve readability.
54448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54449      # Now convert it back to Unix-style (cygpath)
54450      input_path=`$CYGPATH -u "$shortmode_path"`
54451      new_path="$input_path"
54452    fi
54453  fi
54454
54455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54456  if test "x$test_cygdrive_prefix" = x; then
54457    # As a simple fix, exclude /usr/bin since it's not a real path.
54458    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54460      # a path prefixed by /cygdrive for fixpath to work.
54461      new_path="$CYGWIN_ROOT_PATH$input_path"
54462    fi
54463  fi
54464
54465
54466  if test "x$path" != "x$new_path"; then
54467    MSVC_DLL="$new_path"
54468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54469$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54470  fi
54471
54472    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54473
54474  path="$MSVC_DLL"
54475  has_colon=`$ECHO $path | $GREP ^.:`
54476  new_path="$path"
54477  if test "x$has_colon" = x; then
54478    # Not in mixed or Windows style, start by that.
54479    new_path=`cmd //c echo $path`
54480  fi
54481
54482
54483  input_path="$new_path"
54484  # Check if we need to convert this using DOS-style short mode. If the path
54485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54486  # take no chances and rewrite it.
54487  # Note: m4 eats our [], so we need to use [ and ] instead.
54488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54489  if test "x$has_forbidden_chars" != x; then
54490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54492  fi
54493
54494
54495  windows_path="$new_path"
54496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54497    unix_path=`$CYGPATH -u "$windows_path"`
54498    new_path="$unix_path"
54499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54501    new_path="$unix_path"
54502  fi
54503
54504  if test "x$path" != "x$new_path"; then
54505    MSVC_DLL="$new_path"
54506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54507$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54508  fi
54509
54510  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54511  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54512
54513    else
54514      # We're on a unix platform. Hooray! :)
54515      path="$MSVC_DLL"
54516      has_space=`$ECHO "$path" | $GREP " "`
54517      if test "x$has_space" != x; then
54518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54519$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54520        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54521      fi
54522
54523      # Use eval to expand a potential ~
54524      eval path="$path"
54525      if test ! -f "$path" && test ! -d "$path"; then
54526        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54527      fi
54528
54529      if test -d "$path"; then
54530        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54531      else
54532        dir="`$DIRNAME "$path"`"
54533        base="`$BASENAME "$path"`"
54534        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54535      fi
54536    fi
54537  fi
54538
54539      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54540$as_echo_n "checking for $DLL_NAME... " >&6; }
54541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54542$as_echo "$MSVC_DLL" >&6; }
54543    else
54544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54545$as_echo "incorrect, ignoring" >&6; }
54546      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54547$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54548    fi
54549  fi
54550
54551  fi
54552
54553  if test "x$MSVC_DLL" = x; then
54554    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54555    if test "x$VS100COMNTOOLS" != x; then
54556      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54557
54558  windows_path="$CYGWIN_VS_TOOLS_DIR"
54559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54560    unix_path=`$CYGPATH -u "$windows_path"`
54561    CYGWIN_VS_TOOLS_DIR="$unix_path"
54562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54564    CYGWIN_VS_TOOLS_DIR="$unix_path"
54565  fi
54566
54567      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54568        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54569	    | $GREP -i /x64/ | $HEAD --lines 1`
54570      else
54571        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54572	    | $GREP -i /x86/ | $HEAD --lines 1`
54573      fi
54574
54575  DLL_NAME="$DLL_NAME"
54576  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54577  METHOD="search of VS100COMNTOOLS"
54578  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54579    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54580$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54581
54582    # Need to check if the found msvcr is correct architecture
54583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54584$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54585    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54587      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54588      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54589      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54590        CORRECT_MSVCR_ARCH="PE32 executable"
54591      else
54592        CORRECT_MSVCR_ARCH="PE32+ executable"
54593      fi
54594    else
54595      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54596        CORRECT_MSVCR_ARCH=386
54597      else
54598        CORRECT_MSVCR_ARCH=x86-64
54599      fi
54600    fi
54601    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54603$as_echo "ok" >&6; }
54604      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54605
54606  # Only process if variable expands to non-empty
54607
54608  if test "x$MSVC_DLL" != x; then
54609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54610
54611  # Input might be given as Windows format, start by converting to
54612  # unix format.
54613  path="$MSVC_DLL"
54614  new_path=`$CYGPATH -u "$path"`
54615
54616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54619  # "foo.exe" is OK but "foo" is an error.
54620  #
54621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54622  # It is also a way to make sure we got the proper file name for the real test later on.
54623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54624  if test "x$test_shortpath" = x; then
54625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54626$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54627    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54628  fi
54629
54630  # Call helper function which possibly converts this using DOS-style short mode.
54631  # If so, the updated path is stored in $new_path.
54632
54633  input_path="$new_path"
54634  # Check if we need to convert this using DOS-style short mode. If the path
54635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54636  # take no chances and rewrite it.
54637  # Note: m4 eats our [], so we need to use [ and ] instead.
54638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54639  if test "x$has_forbidden_chars" != x; then
54640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54644      # Going to short mode and back again did indeed matter. Since short mode is
54645      # case insensitive, let's make it lowercase to improve readability.
54646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54647      # Now convert it back to Unix-style (cygpath)
54648      input_path=`$CYGPATH -u "$shortmode_path"`
54649      new_path="$input_path"
54650    fi
54651  fi
54652
54653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54654  if test "x$test_cygdrive_prefix" = x; then
54655    # As a simple fix, exclude /usr/bin since it's not a real path.
54656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54658      # a path prefixed by /cygdrive for fixpath to work.
54659      new_path="$CYGWIN_ROOT_PATH$input_path"
54660    fi
54661  fi
54662
54663
54664  if test "x$path" != "x$new_path"; then
54665    MSVC_DLL="$new_path"
54666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54667$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54668  fi
54669
54670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54671
54672  path="$MSVC_DLL"
54673  has_colon=`$ECHO $path | $GREP ^.:`
54674  new_path="$path"
54675  if test "x$has_colon" = x; then
54676    # Not in mixed or Windows style, start by that.
54677    new_path=`cmd //c echo $path`
54678  fi
54679
54680
54681  input_path="$new_path"
54682  # Check if we need to convert this using DOS-style short mode. If the path
54683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54684  # take no chances and rewrite it.
54685  # Note: m4 eats our [], so we need to use [ and ] instead.
54686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54687  if test "x$has_forbidden_chars" != x; then
54688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54690  fi
54691
54692
54693  windows_path="$new_path"
54694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54695    unix_path=`$CYGPATH -u "$windows_path"`
54696    new_path="$unix_path"
54697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54699    new_path="$unix_path"
54700  fi
54701
54702  if test "x$path" != "x$new_path"; then
54703    MSVC_DLL="$new_path"
54704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54705$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54706  fi
54707
54708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54710
54711    else
54712      # We're on a unix platform. Hooray! :)
54713      path="$MSVC_DLL"
54714      has_space=`$ECHO "$path" | $GREP " "`
54715      if test "x$has_space" != x; then
54716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54717$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54719      fi
54720
54721      # Use eval to expand a potential ~
54722      eval path="$path"
54723      if test ! -f "$path" && test ! -d "$path"; then
54724        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54725      fi
54726
54727      if test -d "$path"; then
54728        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54729      else
54730        dir="`$DIRNAME "$path"`"
54731        base="`$BASENAME "$path"`"
54732        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54733      fi
54734    fi
54735  fi
54736
54737      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54738$as_echo_n "checking for $DLL_NAME... " >&6; }
54739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54740$as_echo "$MSVC_DLL" >&6; }
54741    else
54742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54743$as_echo "incorrect, ignoring" >&6; }
54744      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54745$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54746    fi
54747  fi
54748
54749    fi
54750  fi
54751
54752  if test "x$MSVC_DLL" = x; then
54753    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54754    # (This was the original behaviour; kept since it might turn something up)
54755    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54756      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54757        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54758	    | $GREP x64 | $HEAD --lines 1`
54759      else
54760        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54761	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54762        if test "x$POSSIBLE_MSVC_DLL" = x; then
54763          # We're grasping at straws now...
54764          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54765	      | $HEAD --lines 1`
54766        fi
54767      fi
54768
54769
54770  DLL_NAME="$DLL_NAME"
54771  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54772  METHOD="search of VCINSTALLDIR"
54773  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54775$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54776
54777    # Need to check if the found msvcr is correct architecture
54778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54779$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54780    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54782      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54783      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54784      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54785        CORRECT_MSVCR_ARCH="PE32 executable"
54786      else
54787        CORRECT_MSVCR_ARCH="PE32+ executable"
54788      fi
54789    else
54790      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54791        CORRECT_MSVCR_ARCH=386
54792      else
54793        CORRECT_MSVCR_ARCH=x86-64
54794      fi
54795    fi
54796    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54798$as_echo "ok" >&6; }
54799      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54800
54801  # Only process if variable expands to non-empty
54802
54803  if test "x$MSVC_DLL" != x; then
54804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54805
54806  # Input might be given as Windows format, start by converting to
54807  # unix format.
54808  path="$MSVC_DLL"
54809  new_path=`$CYGPATH -u "$path"`
54810
54811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54814  # "foo.exe" is OK but "foo" is an error.
54815  #
54816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54817  # It is also a way to make sure we got the proper file name for the real test later on.
54818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54819  if test "x$test_shortpath" = x; then
54820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54821$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54822    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54823  fi
54824
54825  # Call helper function which possibly converts this using DOS-style short mode.
54826  # If so, the updated path is stored in $new_path.
54827
54828  input_path="$new_path"
54829  # Check if we need to convert this using DOS-style short mode. If the path
54830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54831  # take no chances and rewrite it.
54832  # Note: m4 eats our [], so we need to use [ and ] instead.
54833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54834  if test "x$has_forbidden_chars" != x; then
54835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54839      # Going to short mode and back again did indeed matter. Since short mode is
54840      # case insensitive, let's make it lowercase to improve readability.
54841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54842      # Now convert it back to Unix-style (cygpath)
54843      input_path=`$CYGPATH -u "$shortmode_path"`
54844      new_path="$input_path"
54845    fi
54846  fi
54847
54848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54849  if test "x$test_cygdrive_prefix" = x; then
54850    # As a simple fix, exclude /usr/bin since it's not a real path.
54851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54853      # a path prefixed by /cygdrive for fixpath to work.
54854      new_path="$CYGWIN_ROOT_PATH$input_path"
54855    fi
54856  fi
54857
54858
54859  if test "x$path" != "x$new_path"; then
54860    MSVC_DLL="$new_path"
54861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54862$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54863  fi
54864
54865    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54866
54867  path="$MSVC_DLL"
54868  has_colon=`$ECHO $path | $GREP ^.:`
54869  new_path="$path"
54870  if test "x$has_colon" = x; then
54871    # Not in mixed or Windows style, start by that.
54872    new_path=`cmd //c echo $path`
54873  fi
54874
54875
54876  input_path="$new_path"
54877  # Check if we need to convert this using DOS-style short mode. If the path
54878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54879  # take no chances and rewrite it.
54880  # Note: m4 eats our [], so we need to use [ and ] instead.
54881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54882  if test "x$has_forbidden_chars" != x; then
54883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54885  fi
54886
54887
54888  windows_path="$new_path"
54889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54890    unix_path=`$CYGPATH -u "$windows_path"`
54891    new_path="$unix_path"
54892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54894    new_path="$unix_path"
54895  fi
54896
54897  if test "x$path" != "x$new_path"; then
54898    MSVC_DLL="$new_path"
54899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54900$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54901  fi
54902
54903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54905
54906    else
54907      # We're on a unix platform. Hooray! :)
54908      path="$MSVC_DLL"
54909      has_space=`$ECHO "$path" | $GREP " "`
54910      if test "x$has_space" != x; then
54911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54912$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54913        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54914      fi
54915
54916      # Use eval to expand a potential ~
54917      eval path="$path"
54918      if test ! -f "$path" && test ! -d "$path"; then
54919        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54920      fi
54921
54922      if test -d "$path"; then
54923        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54924      else
54925        dir="`$DIRNAME "$path"`"
54926        base="`$BASENAME "$path"`"
54927        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54928      fi
54929    fi
54930  fi
54931
54932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54933$as_echo_n "checking for $DLL_NAME... " >&6; }
54934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54935$as_echo "$MSVC_DLL" >&6; }
54936    else
54937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54938$as_echo "incorrect, ignoring" >&6; }
54939      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54940$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54941    fi
54942  fi
54943
54944    fi
54945  fi
54946
54947  if test "x$MSVC_DLL" = x; then
54948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54949$as_echo_n "checking for $DLL_NAME... " >&6; }
54950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54951$as_echo "no" >&6; }
54952    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54953  fi
54954
54955    MSVCR_DLL="$MSVC_DLL"
54956  fi
54957
54958
54959
54960# Check whether --with-msvcp-dll was given.
54961if test "${with_msvcp_dll+set}" = set; then :
54962  withval=$with_msvcp_dll;
54963fi
54964
54965
54966  if test "x$MSVCP_NAME" != "x"; then
54967    if test "x$with_msvcp_dll" != x; then
54968      # If given explicitly by user, do not probe. If not present, fail directly.
54969
54970  DLL_NAME="$MSVCP_NAME"
54971  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54972  METHOD="--with-msvcp-dll"
54973  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54974    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54975$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54976
54977    # Need to check if the found msvcr is correct architecture
54978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54979$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54980    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54982      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54983      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54984      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54985        CORRECT_MSVCR_ARCH="PE32 executable"
54986      else
54987        CORRECT_MSVCR_ARCH="PE32+ executable"
54988      fi
54989    else
54990      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54991        CORRECT_MSVCR_ARCH=386
54992      else
54993        CORRECT_MSVCR_ARCH=x86-64
54994      fi
54995    fi
54996    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54998$as_echo "ok" >&6; }
54999      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55000
55001  # Only process if variable expands to non-empty
55002
55003  if test "x$MSVC_DLL" != x; then
55004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55005
55006  # Input might be given as Windows format, start by converting to
55007  # unix format.
55008  path="$MSVC_DLL"
55009  new_path=`$CYGPATH -u "$path"`
55010
55011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55014  # "foo.exe" is OK but "foo" is an error.
55015  #
55016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55017  # It is also a way to make sure we got the proper file name for the real test later on.
55018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55019  if test "x$test_shortpath" = x; then
55020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55021$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55022    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55023  fi
55024
55025  # Call helper function which possibly converts this using DOS-style short mode.
55026  # If so, the updated path is stored in $new_path.
55027
55028  input_path="$new_path"
55029  # Check if we need to convert this using DOS-style short mode. If the path
55030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55031  # take no chances and rewrite it.
55032  # Note: m4 eats our [], so we need to use [ and ] instead.
55033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55034  if test "x$has_forbidden_chars" != x; then
55035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55039      # Going to short mode and back again did indeed matter. Since short mode is
55040      # case insensitive, let's make it lowercase to improve readability.
55041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55042      # Now convert it back to Unix-style (cygpath)
55043      input_path=`$CYGPATH -u "$shortmode_path"`
55044      new_path="$input_path"
55045    fi
55046  fi
55047
55048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55049  if test "x$test_cygdrive_prefix" = x; then
55050    # As a simple fix, exclude /usr/bin since it's not a real path.
55051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55053      # a path prefixed by /cygdrive for fixpath to work.
55054      new_path="$CYGWIN_ROOT_PATH$input_path"
55055    fi
55056  fi
55057
55058
55059  if test "x$path" != "x$new_path"; then
55060    MSVC_DLL="$new_path"
55061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55062$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55063  fi
55064
55065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55066
55067  path="$MSVC_DLL"
55068  has_colon=`$ECHO $path | $GREP ^.:`
55069  new_path="$path"
55070  if test "x$has_colon" = x; then
55071    # Not in mixed or Windows style, start by that.
55072    new_path=`cmd //c echo $path`
55073  fi
55074
55075
55076  input_path="$new_path"
55077  # Check if we need to convert this using DOS-style short mode. If the path
55078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55079  # take no chances and rewrite it.
55080  # Note: m4 eats our [], so we need to use [ and ] instead.
55081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55082  if test "x$has_forbidden_chars" != x; then
55083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55085  fi
55086
55087
55088  windows_path="$new_path"
55089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55090    unix_path=`$CYGPATH -u "$windows_path"`
55091    new_path="$unix_path"
55092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55094    new_path="$unix_path"
55095  fi
55096
55097  if test "x$path" != "x$new_path"; then
55098    MSVC_DLL="$new_path"
55099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55100$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55101  fi
55102
55103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55105
55106    else
55107      # We're on a unix platform. Hooray! :)
55108      path="$MSVC_DLL"
55109      has_space=`$ECHO "$path" | $GREP " "`
55110      if test "x$has_space" != x; then
55111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55112$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55114      fi
55115
55116      # Use eval to expand a potential ~
55117      eval path="$path"
55118      if test ! -f "$path" && test ! -d "$path"; then
55119        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55120      fi
55121
55122      if test -d "$path"; then
55123        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55124      else
55125        dir="`$DIRNAME "$path"`"
55126        base="`$BASENAME "$path"`"
55127        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55128      fi
55129    fi
55130  fi
55131
55132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55133$as_echo_n "checking for $DLL_NAME... " >&6; }
55134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55135$as_echo "$MSVC_DLL" >&6; }
55136    else
55137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55138$as_echo "incorrect, ignoring" >&6; }
55139      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55140$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55141    fi
55142  fi
55143
55144      if test "x$MSVC_DLL" = x; then
55145        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55146      fi
55147      MSVCP_DLL="$MSVC_DLL"
55148    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55149
55150  DLL_NAME="$MSVCP_NAME"
55151  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55152  METHOD="devkit"
55153  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55155$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55156
55157    # Need to check if the found msvcr is correct architecture
55158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55159$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55160    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55162      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55163      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55164      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55165        CORRECT_MSVCR_ARCH="PE32 executable"
55166      else
55167        CORRECT_MSVCR_ARCH="PE32+ executable"
55168      fi
55169    else
55170      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55171        CORRECT_MSVCR_ARCH=386
55172      else
55173        CORRECT_MSVCR_ARCH=x86-64
55174      fi
55175    fi
55176    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55178$as_echo "ok" >&6; }
55179      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55180
55181  # Only process if variable expands to non-empty
55182
55183  if test "x$MSVC_DLL" != x; then
55184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55185
55186  # Input might be given as Windows format, start by converting to
55187  # unix format.
55188  path="$MSVC_DLL"
55189  new_path=`$CYGPATH -u "$path"`
55190
55191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55194  # "foo.exe" is OK but "foo" is an error.
55195  #
55196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55197  # It is also a way to make sure we got the proper file name for the real test later on.
55198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55199  if test "x$test_shortpath" = x; then
55200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55201$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55202    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55203  fi
55204
55205  # Call helper function which possibly converts this using DOS-style short mode.
55206  # If so, the updated path is stored in $new_path.
55207
55208  input_path="$new_path"
55209  # Check if we need to convert this using DOS-style short mode. If the path
55210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55211  # take no chances and rewrite it.
55212  # Note: m4 eats our [], so we need to use [ and ] instead.
55213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55214  if test "x$has_forbidden_chars" != x; then
55215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55219      # Going to short mode and back again did indeed matter. Since short mode is
55220      # case insensitive, let's make it lowercase to improve readability.
55221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55222      # Now convert it back to Unix-style (cygpath)
55223      input_path=`$CYGPATH -u "$shortmode_path"`
55224      new_path="$input_path"
55225    fi
55226  fi
55227
55228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55229  if test "x$test_cygdrive_prefix" = x; then
55230    # As a simple fix, exclude /usr/bin since it's not a real path.
55231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55233      # a path prefixed by /cygdrive for fixpath to work.
55234      new_path="$CYGWIN_ROOT_PATH$input_path"
55235    fi
55236  fi
55237
55238
55239  if test "x$path" != "x$new_path"; then
55240    MSVC_DLL="$new_path"
55241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55242$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55243  fi
55244
55245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55246
55247  path="$MSVC_DLL"
55248  has_colon=`$ECHO $path | $GREP ^.:`
55249  new_path="$path"
55250  if test "x$has_colon" = x; then
55251    # Not in mixed or Windows style, start by that.
55252    new_path=`cmd //c echo $path`
55253  fi
55254
55255
55256  input_path="$new_path"
55257  # Check if we need to convert this using DOS-style short mode. If the path
55258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55259  # take no chances and rewrite it.
55260  # Note: m4 eats our [], so we need to use [ and ] instead.
55261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55262  if test "x$has_forbidden_chars" != x; then
55263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55265  fi
55266
55267
55268  windows_path="$new_path"
55269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55270    unix_path=`$CYGPATH -u "$windows_path"`
55271    new_path="$unix_path"
55272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55274    new_path="$unix_path"
55275  fi
55276
55277  if test "x$path" != "x$new_path"; then
55278    MSVC_DLL="$new_path"
55279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55280$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55281  fi
55282
55283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55285
55286    else
55287      # We're on a unix platform. Hooray! :)
55288      path="$MSVC_DLL"
55289      has_space=`$ECHO "$path" | $GREP " "`
55290      if test "x$has_space" != x; then
55291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55292$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55294      fi
55295
55296      # Use eval to expand a potential ~
55297      eval path="$path"
55298      if test ! -f "$path" && test ! -d "$path"; then
55299        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55300      fi
55301
55302      if test -d "$path"; then
55303        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55304      else
55305        dir="`$DIRNAME "$path"`"
55306        base="`$BASENAME "$path"`"
55307        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55308      fi
55309    fi
55310  fi
55311
55312      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55313$as_echo_n "checking for $DLL_NAME... " >&6; }
55314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55315$as_echo "$MSVC_DLL" >&6; }
55316    else
55317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55318$as_echo "incorrect, ignoring" >&6; }
55319      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55320$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55321    fi
55322  fi
55323
55324      if test "x$MSVC_DLL" = x; then
55325        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55326      fi
55327      MSVCP_DLL="$MSVC_DLL"
55328    else
55329
55330  DLL_NAME="${MSVCP_NAME}"
55331  MSVC_DLL=
55332
55333  if test "x$MSVC_DLL" = x; then
55334    # Probe: Using well-known location from Visual Studio 10.0
55335    if test "x$VCINSTALLDIR" != x; then
55336      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55337
55338  windows_path="$CYGWIN_VC_INSTALL_DIR"
55339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55340    unix_path=`$CYGPATH -u "$windows_path"`
55341    CYGWIN_VC_INSTALL_DIR="$unix_path"
55342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55344    CYGWIN_VC_INSTALL_DIR="$unix_path"
55345  fi
55346
55347      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55348        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55349      else
55350        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55351      fi
55352      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55353
55354  DLL_NAME="$DLL_NAME"
55355  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55356  METHOD="well-known location in VCINSTALLDIR"
55357  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55358    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55359$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55360
55361    # Need to check if the found msvcr is correct architecture
55362    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55363$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55364    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55366      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55367      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55368      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55369        CORRECT_MSVCR_ARCH="PE32 executable"
55370      else
55371        CORRECT_MSVCR_ARCH="PE32+ executable"
55372      fi
55373    else
55374      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55375        CORRECT_MSVCR_ARCH=386
55376      else
55377        CORRECT_MSVCR_ARCH=x86-64
55378      fi
55379    fi
55380    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55382$as_echo "ok" >&6; }
55383      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55384
55385  # Only process if variable expands to non-empty
55386
55387  if test "x$MSVC_DLL" != x; then
55388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55389
55390  # Input might be given as Windows format, start by converting to
55391  # unix format.
55392  path="$MSVC_DLL"
55393  new_path=`$CYGPATH -u "$path"`
55394
55395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55398  # "foo.exe" is OK but "foo" is an error.
55399  #
55400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55401  # It is also a way to make sure we got the proper file name for the real test later on.
55402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55403  if test "x$test_shortpath" = x; then
55404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55405$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55406    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55407  fi
55408
55409  # Call helper function which possibly converts this using DOS-style short mode.
55410  # If so, the updated path is stored in $new_path.
55411
55412  input_path="$new_path"
55413  # Check if we need to convert this using DOS-style short mode. If the path
55414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55415  # take no chances and rewrite it.
55416  # Note: m4 eats our [], so we need to use [ and ] instead.
55417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55418  if test "x$has_forbidden_chars" != x; then
55419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55423      # Going to short mode and back again did indeed matter. Since short mode is
55424      # case insensitive, let's make it lowercase to improve readability.
55425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55426      # Now convert it back to Unix-style (cygpath)
55427      input_path=`$CYGPATH -u "$shortmode_path"`
55428      new_path="$input_path"
55429    fi
55430  fi
55431
55432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55433  if test "x$test_cygdrive_prefix" = x; then
55434    # As a simple fix, exclude /usr/bin since it's not a real path.
55435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55437      # a path prefixed by /cygdrive for fixpath to work.
55438      new_path="$CYGWIN_ROOT_PATH$input_path"
55439    fi
55440  fi
55441
55442
55443  if test "x$path" != "x$new_path"; then
55444    MSVC_DLL="$new_path"
55445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55446$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55447  fi
55448
55449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55450
55451  path="$MSVC_DLL"
55452  has_colon=`$ECHO $path | $GREP ^.:`
55453  new_path="$path"
55454  if test "x$has_colon" = x; then
55455    # Not in mixed or Windows style, start by that.
55456    new_path=`cmd //c echo $path`
55457  fi
55458
55459
55460  input_path="$new_path"
55461  # Check if we need to convert this using DOS-style short mode. If the path
55462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55463  # take no chances and rewrite it.
55464  # Note: m4 eats our [], so we need to use [ and ] instead.
55465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55466  if test "x$has_forbidden_chars" != x; then
55467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55469  fi
55470
55471
55472  windows_path="$new_path"
55473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55474    unix_path=`$CYGPATH -u "$windows_path"`
55475    new_path="$unix_path"
55476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55478    new_path="$unix_path"
55479  fi
55480
55481  if test "x$path" != "x$new_path"; then
55482    MSVC_DLL="$new_path"
55483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55484$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55485  fi
55486
55487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55489
55490    else
55491      # We're on a unix platform. Hooray! :)
55492      path="$MSVC_DLL"
55493      has_space=`$ECHO "$path" | $GREP " "`
55494      if test "x$has_space" != x; then
55495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55496$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55498      fi
55499
55500      # Use eval to expand a potential ~
55501      eval path="$path"
55502      if test ! -f "$path" && test ! -d "$path"; then
55503        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55504      fi
55505
55506      if test -d "$path"; then
55507        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55508      else
55509        dir="`$DIRNAME "$path"`"
55510        base="`$BASENAME "$path"`"
55511        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55512      fi
55513    fi
55514  fi
55515
55516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55517$as_echo_n "checking for $DLL_NAME... " >&6; }
55518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55519$as_echo "$MSVC_DLL" >&6; }
55520    else
55521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55522$as_echo "incorrect, ignoring" >&6; }
55523      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55524$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55525    fi
55526  fi
55527
55528    fi
55529  fi
55530
55531  if test "x$MSVC_DLL" = x; then
55532    # Probe: Check in the Boot JDK directory.
55533    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55534
55535  DLL_NAME="$DLL_NAME"
55536  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55537  METHOD="well-known location in Boot JDK"
55538  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55539    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55540$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55541
55542    # Need to check if the found msvcr is correct architecture
55543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55544$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55545    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55547      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55548      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55549      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55550        CORRECT_MSVCR_ARCH="PE32 executable"
55551      else
55552        CORRECT_MSVCR_ARCH="PE32+ executable"
55553      fi
55554    else
55555      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55556        CORRECT_MSVCR_ARCH=386
55557      else
55558        CORRECT_MSVCR_ARCH=x86-64
55559      fi
55560    fi
55561    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55563$as_echo "ok" >&6; }
55564      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55565
55566  # Only process if variable expands to non-empty
55567
55568  if test "x$MSVC_DLL" != x; then
55569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55570
55571  # Input might be given as Windows format, start by converting to
55572  # unix format.
55573  path="$MSVC_DLL"
55574  new_path=`$CYGPATH -u "$path"`
55575
55576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55579  # "foo.exe" is OK but "foo" is an error.
55580  #
55581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55582  # It is also a way to make sure we got the proper file name for the real test later on.
55583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55584  if test "x$test_shortpath" = x; then
55585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55586$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55587    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55588  fi
55589
55590  # Call helper function which possibly converts this using DOS-style short mode.
55591  # If so, the updated path is stored in $new_path.
55592
55593  input_path="$new_path"
55594  # Check if we need to convert this using DOS-style short mode. If the path
55595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55596  # take no chances and rewrite it.
55597  # Note: m4 eats our [], so we need to use [ and ] instead.
55598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55599  if test "x$has_forbidden_chars" != x; then
55600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55604      # Going to short mode and back again did indeed matter. Since short mode is
55605      # case insensitive, let's make it lowercase to improve readability.
55606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55607      # Now convert it back to Unix-style (cygpath)
55608      input_path=`$CYGPATH -u "$shortmode_path"`
55609      new_path="$input_path"
55610    fi
55611  fi
55612
55613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55614  if test "x$test_cygdrive_prefix" = x; then
55615    # As a simple fix, exclude /usr/bin since it's not a real path.
55616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55618      # a path prefixed by /cygdrive for fixpath to work.
55619      new_path="$CYGWIN_ROOT_PATH$input_path"
55620    fi
55621  fi
55622
55623
55624  if test "x$path" != "x$new_path"; then
55625    MSVC_DLL="$new_path"
55626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55627$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55628  fi
55629
55630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55631
55632  path="$MSVC_DLL"
55633  has_colon=`$ECHO $path | $GREP ^.:`
55634  new_path="$path"
55635  if test "x$has_colon" = x; then
55636    # Not in mixed or Windows style, start by that.
55637    new_path=`cmd //c echo $path`
55638  fi
55639
55640
55641  input_path="$new_path"
55642  # Check if we need to convert this using DOS-style short mode. If the path
55643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55644  # take no chances and rewrite it.
55645  # Note: m4 eats our [], so we need to use [ and ] instead.
55646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55647  if test "x$has_forbidden_chars" != x; then
55648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55650  fi
55651
55652
55653  windows_path="$new_path"
55654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55655    unix_path=`$CYGPATH -u "$windows_path"`
55656    new_path="$unix_path"
55657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55659    new_path="$unix_path"
55660  fi
55661
55662  if test "x$path" != "x$new_path"; then
55663    MSVC_DLL="$new_path"
55664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55666  fi
55667
55668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55670
55671    else
55672      # We're on a unix platform. Hooray! :)
55673      path="$MSVC_DLL"
55674      has_space=`$ECHO "$path" | $GREP " "`
55675      if test "x$has_space" != x; then
55676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55677$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55679      fi
55680
55681      # Use eval to expand a potential ~
55682      eval path="$path"
55683      if test ! -f "$path" && test ! -d "$path"; then
55684        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55685      fi
55686
55687      if test -d "$path"; then
55688        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55689      else
55690        dir="`$DIRNAME "$path"`"
55691        base="`$BASENAME "$path"`"
55692        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55693      fi
55694    fi
55695  fi
55696
55697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55698$as_echo_n "checking for $DLL_NAME... " >&6; }
55699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55700$as_echo "$MSVC_DLL" >&6; }
55701    else
55702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55703$as_echo "incorrect, ignoring" >&6; }
55704      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55705$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55706    fi
55707  fi
55708
55709  fi
55710
55711  if test "x$MSVC_DLL" = x; then
55712    # Probe: Look in the Windows system32 directory
55713    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55714
55715  windows_path="$CYGWIN_SYSTEMROOT"
55716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55717    unix_path=`$CYGPATH -u "$windows_path"`
55718    CYGWIN_SYSTEMROOT="$unix_path"
55719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55721    CYGWIN_SYSTEMROOT="$unix_path"
55722  fi
55723
55724    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55725
55726  DLL_NAME="$DLL_NAME"
55727  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55728  METHOD="well-known location in SYSTEMROOT"
55729  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55730    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55731$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55732
55733    # Need to check if the found msvcr is correct architecture
55734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55735$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55736    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55738      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55739      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55740      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55741        CORRECT_MSVCR_ARCH="PE32 executable"
55742      else
55743        CORRECT_MSVCR_ARCH="PE32+ executable"
55744      fi
55745    else
55746      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55747        CORRECT_MSVCR_ARCH=386
55748      else
55749        CORRECT_MSVCR_ARCH=x86-64
55750      fi
55751    fi
55752    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55754$as_echo "ok" >&6; }
55755      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55756
55757  # Only process if variable expands to non-empty
55758
55759  if test "x$MSVC_DLL" != x; then
55760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55761
55762  # Input might be given as Windows format, start by converting to
55763  # unix format.
55764  path="$MSVC_DLL"
55765  new_path=`$CYGPATH -u "$path"`
55766
55767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55770  # "foo.exe" is OK but "foo" is an error.
55771  #
55772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55773  # It is also a way to make sure we got the proper file name for the real test later on.
55774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55775  if test "x$test_shortpath" = x; then
55776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55777$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55778    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55779  fi
55780
55781  # Call helper function which possibly converts this using DOS-style short mode.
55782  # If so, the updated path is stored in $new_path.
55783
55784  input_path="$new_path"
55785  # Check if we need to convert this using DOS-style short mode. If the path
55786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55787  # take no chances and rewrite it.
55788  # Note: m4 eats our [], so we need to use [ and ] instead.
55789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55790  if test "x$has_forbidden_chars" != x; then
55791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55795      # Going to short mode and back again did indeed matter. Since short mode is
55796      # case insensitive, let's make it lowercase to improve readability.
55797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55798      # Now convert it back to Unix-style (cygpath)
55799      input_path=`$CYGPATH -u "$shortmode_path"`
55800      new_path="$input_path"
55801    fi
55802  fi
55803
55804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55805  if test "x$test_cygdrive_prefix" = x; then
55806    # As a simple fix, exclude /usr/bin since it's not a real path.
55807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55809      # a path prefixed by /cygdrive for fixpath to work.
55810      new_path="$CYGWIN_ROOT_PATH$input_path"
55811    fi
55812  fi
55813
55814
55815  if test "x$path" != "x$new_path"; then
55816    MSVC_DLL="$new_path"
55817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55818$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55819  fi
55820
55821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55822
55823  path="$MSVC_DLL"
55824  has_colon=`$ECHO $path | $GREP ^.:`
55825  new_path="$path"
55826  if test "x$has_colon" = x; then
55827    # Not in mixed or Windows style, start by that.
55828    new_path=`cmd //c echo $path`
55829  fi
55830
55831
55832  input_path="$new_path"
55833  # Check if we need to convert this using DOS-style short mode. If the path
55834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55835  # take no chances and rewrite it.
55836  # Note: m4 eats our [], so we need to use [ and ] instead.
55837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55838  if test "x$has_forbidden_chars" != x; then
55839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55841  fi
55842
55843
55844  windows_path="$new_path"
55845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55846    unix_path=`$CYGPATH -u "$windows_path"`
55847    new_path="$unix_path"
55848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55850    new_path="$unix_path"
55851  fi
55852
55853  if test "x$path" != "x$new_path"; then
55854    MSVC_DLL="$new_path"
55855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55856$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55857  fi
55858
55859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55861
55862    else
55863      # We're on a unix platform. Hooray! :)
55864      path="$MSVC_DLL"
55865      has_space=`$ECHO "$path" | $GREP " "`
55866      if test "x$has_space" != x; then
55867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55868$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55870      fi
55871
55872      # Use eval to expand a potential ~
55873      eval path="$path"
55874      if test ! -f "$path" && test ! -d "$path"; then
55875        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55876      fi
55877
55878      if test -d "$path"; then
55879        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55880      else
55881        dir="`$DIRNAME "$path"`"
55882        base="`$BASENAME "$path"`"
55883        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55884      fi
55885    fi
55886  fi
55887
55888      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55889$as_echo_n "checking for $DLL_NAME... " >&6; }
55890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55891$as_echo "$MSVC_DLL" >&6; }
55892    else
55893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55894$as_echo "incorrect, ignoring" >&6; }
55895      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55896$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55897    fi
55898  fi
55899
55900  fi
55901
55902  if test "x$MSVC_DLL" = x; then
55903    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55904    if test "x$VS100COMNTOOLS" != x; then
55905      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55906
55907  windows_path="$CYGWIN_VS_TOOLS_DIR"
55908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55909    unix_path=`$CYGPATH -u "$windows_path"`
55910    CYGWIN_VS_TOOLS_DIR="$unix_path"
55911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55913    CYGWIN_VS_TOOLS_DIR="$unix_path"
55914  fi
55915
55916      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55917        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55918	    | $GREP -i /x64/ | $HEAD --lines 1`
55919      else
55920        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55921	    | $GREP -i /x86/ | $HEAD --lines 1`
55922      fi
55923
55924  DLL_NAME="$DLL_NAME"
55925  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55926  METHOD="search of VS100COMNTOOLS"
55927  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55928    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55929$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55930
55931    # Need to check if the found msvcr is correct architecture
55932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55933$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55934    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55936      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55937      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55938      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55939        CORRECT_MSVCR_ARCH="PE32 executable"
55940      else
55941        CORRECT_MSVCR_ARCH="PE32+ executable"
55942      fi
55943    else
55944      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55945        CORRECT_MSVCR_ARCH=386
55946      else
55947        CORRECT_MSVCR_ARCH=x86-64
55948      fi
55949    fi
55950    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55952$as_echo "ok" >&6; }
55953      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55954
55955  # Only process if variable expands to non-empty
55956
55957  if test "x$MSVC_DLL" != x; then
55958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55959
55960  # Input might be given as Windows format, start by converting to
55961  # unix format.
55962  path="$MSVC_DLL"
55963  new_path=`$CYGPATH -u "$path"`
55964
55965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55968  # "foo.exe" is OK but "foo" is an error.
55969  #
55970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55971  # It is also a way to make sure we got the proper file name for the real test later on.
55972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55973  if test "x$test_shortpath" = x; then
55974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55975$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55976    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55977  fi
55978
55979  # Call helper function which possibly converts this using DOS-style short mode.
55980  # If so, the updated path is stored in $new_path.
55981
55982  input_path="$new_path"
55983  # Check if we need to convert this using DOS-style short mode. If the path
55984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55985  # take no chances and rewrite it.
55986  # Note: m4 eats our [], so we need to use [ and ] instead.
55987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55988  if test "x$has_forbidden_chars" != x; then
55989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55993      # Going to short mode and back again did indeed matter. Since short mode is
55994      # case insensitive, let's make it lowercase to improve readability.
55995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55996      # Now convert it back to Unix-style (cygpath)
55997      input_path=`$CYGPATH -u "$shortmode_path"`
55998      new_path="$input_path"
55999    fi
56000  fi
56001
56002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56003  if test "x$test_cygdrive_prefix" = x; then
56004    # As a simple fix, exclude /usr/bin since it's not a real path.
56005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56007      # a path prefixed by /cygdrive for fixpath to work.
56008      new_path="$CYGWIN_ROOT_PATH$input_path"
56009    fi
56010  fi
56011
56012
56013  if test "x$path" != "x$new_path"; then
56014    MSVC_DLL="$new_path"
56015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56016$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56017  fi
56018
56019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56020
56021  path="$MSVC_DLL"
56022  has_colon=`$ECHO $path | $GREP ^.:`
56023  new_path="$path"
56024  if test "x$has_colon" = x; then
56025    # Not in mixed or Windows style, start by that.
56026    new_path=`cmd //c echo $path`
56027  fi
56028
56029
56030  input_path="$new_path"
56031  # Check if we need to convert this using DOS-style short mode. If the path
56032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56033  # take no chances and rewrite it.
56034  # Note: m4 eats our [], so we need to use [ and ] instead.
56035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56036  if test "x$has_forbidden_chars" != x; then
56037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56039  fi
56040
56041
56042  windows_path="$new_path"
56043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56044    unix_path=`$CYGPATH -u "$windows_path"`
56045    new_path="$unix_path"
56046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56048    new_path="$unix_path"
56049  fi
56050
56051  if test "x$path" != "x$new_path"; then
56052    MSVC_DLL="$new_path"
56053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56054$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56055  fi
56056
56057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56059
56060    else
56061      # We're on a unix platform. Hooray! :)
56062      path="$MSVC_DLL"
56063      has_space=`$ECHO "$path" | $GREP " "`
56064      if test "x$has_space" != x; then
56065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56066$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56067        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56068      fi
56069
56070      # Use eval to expand a potential ~
56071      eval path="$path"
56072      if test ! -f "$path" && test ! -d "$path"; then
56073        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56074      fi
56075
56076      if test -d "$path"; then
56077        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56078      else
56079        dir="`$DIRNAME "$path"`"
56080        base="`$BASENAME "$path"`"
56081        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56082      fi
56083    fi
56084  fi
56085
56086      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56087$as_echo_n "checking for $DLL_NAME... " >&6; }
56088      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56089$as_echo "$MSVC_DLL" >&6; }
56090    else
56091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56092$as_echo "incorrect, ignoring" >&6; }
56093      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56094$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56095    fi
56096  fi
56097
56098    fi
56099  fi
56100
56101  if test "x$MSVC_DLL" = x; then
56102    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56103    # (This was the original behaviour; kept since it might turn something up)
56104    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56105      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56106        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56107	    | $GREP x64 | $HEAD --lines 1`
56108      else
56109        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56110	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56111        if test "x$POSSIBLE_MSVC_DLL" = x; then
56112          # We're grasping at straws now...
56113          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56114	      | $HEAD --lines 1`
56115        fi
56116      fi
56117
56118
56119  DLL_NAME="$DLL_NAME"
56120  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56121  METHOD="search of VCINSTALLDIR"
56122  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56123    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56124$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56125
56126    # Need to check if the found msvcr is correct architecture
56127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56128$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56129    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56131      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56132      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56133      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56134        CORRECT_MSVCR_ARCH="PE32 executable"
56135      else
56136        CORRECT_MSVCR_ARCH="PE32+ executable"
56137      fi
56138    else
56139      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56140        CORRECT_MSVCR_ARCH=386
56141      else
56142        CORRECT_MSVCR_ARCH=x86-64
56143      fi
56144    fi
56145    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56146      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56147$as_echo "ok" >&6; }
56148      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56149
56150  # Only process if variable expands to non-empty
56151
56152  if test "x$MSVC_DLL" != x; then
56153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56154
56155  # Input might be given as Windows format, start by converting to
56156  # unix format.
56157  path="$MSVC_DLL"
56158  new_path=`$CYGPATH -u "$path"`
56159
56160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56163  # "foo.exe" is OK but "foo" is an error.
56164  #
56165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56166  # It is also a way to make sure we got the proper file name for the real test later on.
56167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56168  if test "x$test_shortpath" = x; then
56169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56170$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56171    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56172  fi
56173
56174  # Call helper function which possibly converts this using DOS-style short mode.
56175  # If so, the updated path is stored in $new_path.
56176
56177  input_path="$new_path"
56178  # Check if we need to convert this using DOS-style short mode. If the path
56179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56180  # take no chances and rewrite it.
56181  # Note: m4 eats our [], so we need to use [ and ] instead.
56182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56183  if test "x$has_forbidden_chars" != x; then
56184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56188      # Going to short mode and back again did indeed matter. Since short mode is
56189      # case insensitive, let's make it lowercase to improve readability.
56190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56191      # Now convert it back to Unix-style (cygpath)
56192      input_path=`$CYGPATH -u "$shortmode_path"`
56193      new_path="$input_path"
56194    fi
56195  fi
56196
56197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56198  if test "x$test_cygdrive_prefix" = x; then
56199    # As a simple fix, exclude /usr/bin since it's not a real path.
56200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56202      # a path prefixed by /cygdrive for fixpath to work.
56203      new_path="$CYGWIN_ROOT_PATH$input_path"
56204    fi
56205  fi
56206
56207
56208  if test "x$path" != "x$new_path"; then
56209    MSVC_DLL="$new_path"
56210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56211$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56212  fi
56213
56214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56215
56216  path="$MSVC_DLL"
56217  has_colon=`$ECHO $path | $GREP ^.:`
56218  new_path="$path"
56219  if test "x$has_colon" = x; then
56220    # Not in mixed or Windows style, start by that.
56221    new_path=`cmd //c echo $path`
56222  fi
56223
56224
56225  input_path="$new_path"
56226  # Check if we need to convert this using DOS-style short mode. If the path
56227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56228  # take no chances and rewrite it.
56229  # Note: m4 eats our [], so we need to use [ and ] instead.
56230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56231  if test "x$has_forbidden_chars" != x; then
56232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56234  fi
56235
56236
56237  windows_path="$new_path"
56238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56239    unix_path=`$CYGPATH -u "$windows_path"`
56240    new_path="$unix_path"
56241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56243    new_path="$unix_path"
56244  fi
56245
56246  if test "x$path" != "x$new_path"; then
56247    MSVC_DLL="$new_path"
56248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56249$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56250  fi
56251
56252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56254
56255    else
56256      # We're on a unix platform. Hooray! :)
56257      path="$MSVC_DLL"
56258      has_space=`$ECHO "$path" | $GREP " "`
56259      if test "x$has_space" != x; then
56260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56263      fi
56264
56265      # Use eval to expand a potential ~
56266      eval path="$path"
56267      if test ! -f "$path" && test ! -d "$path"; then
56268        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56269      fi
56270
56271      if test -d "$path"; then
56272        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56273      else
56274        dir="`$DIRNAME "$path"`"
56275        base="`$BASENAME "$path"`"
56276        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56277      fi
56278    fi
56279  fi
56280
56281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56282$as_echo_n "checking for $DLL_NAME... " >&6; }
56283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56284$as_echo "$MSVC_DLL" >&6; }
56285    else
56286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56287$as_echo "incorrect, ignoring" >&6; }
56288      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56289$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56290    fi
56291  fi
56292
56293    fi
56294  fi
56295
56296  if test "x$MSVC_DLL" = x; then
56297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56298$as_echo_n "checking for $DLL_NAME... " >&6; }
56299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56300$as_echo "no" >&6; }
56301    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56302  fi
56303
56304      MSVCP_DLL="$MSVC_DLL"
56305    fi
56306
56307  fi
56308
56309  fi
56310
56311
56312  if test "x$NEEDS_LIB_X11" = xfalse; then
56313    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56314      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56315$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56316    fi
56317    X_CFLAGS=
56318    X_LIBS=
56319  else
56320
56321    if test "x${with_x}" = xno; then
56322      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56323    fi
56324
56325    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56326      # The user has specified a X11 base directory. Use it for includes and
56327      # libraries, unless explicitly overridden.
56328      if test "x$x_includes" = xNONE; then
56329        x_includes="${with_x}/include"
56330      fi
56331      if test "x$x_libraries" = xNONE; then
56332        x_libraries="${with_x}/lib"
56333      fi
56334    else
56335      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56336      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56337      # --x-libraries for the sysroot, if that seems to be correct.
56338      if test "x$SYSROOT" != "x"; then
56339        if test "x$x_includes" = xNONE; then
56340          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56341            x_includes="$SYSROOT/usr/X11R6/include"
56342          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56343            x_includes="$SYSROOT/usr/include"
56344          fi
56345        fi
56346        if test "x$x_libraries" = xNONE; then
56347          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56348            x_libraries="$SYSROOT/usr/X11R6/lib"
56349          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56350            x_libraries="$SYSROOT/usr/lib64"
56351          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56352            x_libraries="$SYSROOT/usr/lib"
56353          fi
56354        fi
56355      fi
56356    fi
56357
56358    # Now let autoconf do it's magic
56359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56360$as_echo_n "checking for X... " >&6; }
56361
56362
56363# Check whether --with-x was given.
56364if test "${with_x+set}" = set; then :
56365  withval=$with_x;
56366fi
56367
56368# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56369if test "x$with_x" = xno; then
56370  # The user explicitly disabled X.
56371  have_x=disabled
56372else
56373  case $x_includes,$x_libraries in #(
56374    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56375    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56376  $as_echo_n "(cached) " >&6
56377else
56378  # One or both of the vars are not set, and there is no cached value.
56379ac_x_includes=no ac_x_libraries=no
56380rm -f -r conftest.dir
56381if mkdir conftest.dir; then
56382  cd conftest.dir
56383  cat >Imakefile <<'_ACEOF'
56384incroot:
56385	@echo incroot='${INCROOT}'
56386usrlibdir:
56387	@echo usrlibdir='${USRLIBDIR}'
56388libdir:
56389	@echo libdir='${LIBDIR}'
56390_ACEOF
56391  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56392    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56393    for ac_var in incroot usrlibdir libdir; do
56394      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56395    done
56396    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56397    for ac_extension in a so sl dylib la dll; do
56398      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56399	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56400	ac_im_usrlibdir=$ac_im_libdir; break
56401      fi
56402    done
56403    # Screen out bogus values from the imake configuration.  They are
56404    # bogus both because they are the default anyway, and because
56405    # using them would break gcc on systems where it needs fixed includes.
56406    case $ac_im_incroot in
56407	/usr/include) ac_x_includes= ;;
56408	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56409    esac
56410    case $ac_im_usrlibdir in
56411	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56412	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56413    esac
56414  fi
56415  cd ..
56416  rm -f -r conftest.dir
56417fi
56418
56419# Standard set of common directories for X headers.
56420# Check X11 before X11Rn because it is often a symlink to the current release.
56421ac_x_header_dirs='
56422/usr/X11/include
56423/usr/X11R7/include
56424/usr/X11R6/include
56425/usr/X11R5/include
56426/usr/X11R4/include
56427
56428/usr/include/X11
56429/usr/include/X11R7
56430/usr/include/X11R6
56431/usr/include/X11R5
56432/usr/include/X11R4
56433
56434/usr/local/X11/include
56435/usr/local/X11R7/include
56436/usr/local/X11R6/include
56437/usr/local/X11R5/include
56438/usr/local/X11R4/include
56439
56440/usr/local/include/X11
56441/usr/local/include/X11R7
56442/usr/local/include/X11R6
56443/usr/local/include/X11R5
56444/usr/local/include/X11R4
56445
56446/usr/X386/include
56447/usr/x386/include
56448/usr/XFree86/include/X11
56449
56450/usr/include
56451/usr/local/include
56452/usr/unsupported/include
56453/usr/athena/include
56454/usr/local/x11r5/include
56455/usr/lpp/Xamples/include
56456
56457/usr/openwin/include
56458/usr/openwin/share/include'
56459
56460if test "$ac_x_includes" = no; then
56461  # Guess where to find include files, by looking for Xlib.h.
56462  # First, try using that file with no special directory specified.
56463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56464/* end confdefs.h.  */
56465#include <X11/Xlib.h>
56466_ACEOF
56467if ac_fn_cxx_try_cpp "$LINENO"; then :
56468  # We can compile using X headers with no special include directory.
56469ac_x_includes=
56470else
56471  for ac_dir in $ac_x_header_dirs; do
56472  if test -r "$ac_dir/X11/Xlib.h"; then
56473    ac_x_includes=$ac_dir
56474    break
56475  fi
56476done
56477fi
56478rm -f conftest.err conftest.i conftest.$ac_ext
56479fi # $ac_x_includes = no
56480
56481if test "$ac_x_libraries" = no; then
56482  # Check for the libraries.
56483  # See if we find them without any special options.
56484  # Don't add to $LIBS permanently.
56485  ac_save_LIBS=$LIBS
56486  LIBS="-lX11 $LIBS"
56487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56488/* end confdefs.h.  */
56489#include <X11/Xlib.h>
56490int
56491main ()
56492{
56493XrmInitialize ()
56494  ;
56495  return 0;
56496}
56497_ACEOF
56498if ac_fn_cxx_try_link "$LINENO"; then :
56499  LIBS=$ac_save_LIBS
56500# We can link X programs with no special library path.
56501ac_x_libraries=
56502else
56503  LIBS=$ac_save_LIBS
56504for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56505do
56506  # Don't even attempt the hair of trying to link an X program!
56507  for ac_extension in a so sl dylib la dll; do
56508    if test -r "$ac_dir/libX11.$ac_extension"; then
56509      ac_x_libraries=$ac_dir
56510      break 2
56511    fi
56512  done
56513done
56514fi
56515rm -f core conftest.err conftest.$ac_objext \
56516    conftest$ac_exeext conftest.$ac_ext
56517fi # $ac_x_libraries = no
56518
56519case $ac_x_includes,$ac_x_libraries in #(
56520  no,* | *,no | *\'*)
56521    # Didn't find X, or a directory has "'" in its name.
56522    ac_cv_have_x="have_x=no";; #(
56523  *)
56524    # Record where we found X for the cache.
56525    ac_cv_have_x="have_x=yes\
56526	ac_x_includes='$ac_x_includes'\
56527	ac_x_libraries='$ac_x_libraries'"
56528esac
56529fi
56530;; #(
56531    *) have_x=yes;;
56532  esac
56533  eval "$ac_cv_have_x"
56534fi # $with_x != no
56535
56536if test "$have_x" != yes; then
56537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56538$as_echo "$have_x" >&6; }
56539  no_x=yes
56540else
56541  # If each of the values was on the command line, it overrides each guess.
56542  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56543  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56544  # Update the cache value to reflect the command line values.
56545  ac_cv_have_x="have_x=yes\
56546	ac_x_includes='$x_includes'\
56547	ac_x_libraries='$x_libraries'"
56548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56549$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56550fi
56551
56552    if test "$no_x" = yes; then
56553  # Not all programs may use this symbol, but it does not hurt to define it.
56554
56555$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56556
56557  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56558else
56559  if test -n "$x_includes"; then
56560    X_CFLAGS="$X_CFLAGS -I$x_includes"
56561  fi
56562
56563  # It would also be nice to do this for all -L options, not just this one.
56564  if test -n "$x_libraries"; then
56565    X_LIBS="$X_LIBS -L$x_libraries"
56566    # For Solaris; some versions of Sun CC require a space after -R and
56567    # others require no space.  Words are not sufficient . . . .
56568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56569$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56570    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56571    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56572    ac_cxx_werror_flag=yes
56573    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56574/* end confdefs.h.  */
56575
56576int
56577main ()
56578{
56579
56580  ;
56581  return 0;
56582}
56583_ACEOF
56584if ac_fn_cxx_try_link "$LINENO"; then :
56585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56586$as_echo "no" >&6; }
56587       X_LIBS="$X_LIBS -R$x_libraries"
56588else
56589  LIBS="$ac_xsave_LIBS -R $x_libraries"
56590       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56591/* end confdefs.h.  */
56592
56593int
56594main ()
56595{
56596
56597  ;
56598  return 0;
56599}
56600_ACEOF
56601if ac_fn_cxx_try_link "$LINENO"; then :
56602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56603$as_echo "yes" >&6; }
56604	  X_LIBS="$X_LIBS -R $x_libraries"
56605else
56606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56607$as_echo "neither works" >&6; }
56608fi
56609rm -f core conftest.err conftest.$ac_objext \
56610    conftest$ac_exeext conftest.$ac_ext
56611fi
56612rm -f core conftest.err conftest.$ac_objext \
56613    conftest$ac_exeext conftest.$ac_ext
56614    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56615    LIBS=$ac_xsave_LIBS
56616  fi
56617
56618  # Check for system-dependent libraries X programs must link with.
56619  # Do this before checking for the system-independent R6 libraries
56620  # (-lICE), since we may need -lsocket or whatever for X linking.
56621
56622  if test "$ISC" = yes; then
56623    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56624  else
56625    # Martyn Johnson says this is needed for Ultrix, if the X
56626    # libraries were built with DECnet support.  And Karl Berry says
56627    # the Alpha needs dnet_stub (dnet does not exist).
56628    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56629    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56630/* end confdefs.h.  */
56631
56632/* Override any GCC internal prototype to avoid an error.
56633   Use char because int might match the return type of a GCC
56634   builtin and then its argument prototype would still apply.  */
56635#ifdef __cplusplus
56636extern "C"
56637#endif
56638char XOpenDisplay ();
56639int
56640main ()
56641{
56642return XOpenDisplay ();
56643  ;
56644  return 0;
56645}
56646_ACEOF
56647if ac_fn_cxx_try_link "$LINENO"; then :
56648
56649else
56650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56651$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56652if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56653  $as_echo_n "(cached) " >&6
56654else
56655  ac_check_lib_save_LIBS=$LIBS
56656LIBS="-ldnet  $LIBS"
56657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56658/* end confdefs.h.  */
56659
56660/* Override any GCC internal prototype to avoid an error.
56661   Use char because int might match the return type of a GCC
56662   builtin and then its argument prototype would still apply.  */
56663#ifdef __cplusplus
56664extern "C"
56665#endif
56666char dnet_ntoa ();
56667int
56668main ()
56669{
56670return dnet_ntoa ();
56671  ;
56672  return 0;
56673}
56674_ACEOF
56675if ac_fn_cxx_try_link "$LINENO"; then :
56676  ac_cv_lib_dnet_dnet_ntoa=yes
56677else
56678  ac_cv_lib_dnet_dnet_ntoa=no
56679fi
56680rm -f core conftest.err conftest.$ac_objext \
56681    conftest$ac_exeext conftest.$ac_ext
56682LIBS=$ac_check_lib_save_LIBS
56683fi
56684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56685$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56686if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56687  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56688fi
56689
56690    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56692$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56693if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56694  $as_echo_n "(cached) " >&6
56695else
56696  ac_check_lib_save_LIBS=$LIBS
56697LIBS="-ldnet_stub  $LIBS"
56698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56699/* end confdefs.h.  */
56700
56701/* Override any GCC internal prototype to avoid an error.
56702   Use char because int might match the return type of a GCC
56703   builtin and then its argument prototype would still apply.  */
56704#ifdef __cplusplus
56705extern "C"
56706#endif
56707char dnet_ntoa ();
56708int
56709main ()
56710{
56711return dnet_ntoa ();
56712  ;
56713  return 0;
56714}
56715_ACEOF
56716if ac_fn_cxx_try_link "$LINENO"; then :
56717  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56718else
56719  ac_cv_lib_dnet_stub_dnet_ntoa=no
56720fi
56721rm -f core conftest.err conftest.$ac_objext \
56722    conftest$ac_exeext conftest.$ac_ext
56723LIBS=$ac_check_lib_save_LIBS
56724fi
56725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56726$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56727if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56728  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56729fi
56730
56731    fi
56732fi
56733rm -f core conftest.err conftest.$ac_objext \
56734    conftest$ac_exeext conftest.$ac_ext
56735    LIBS="$ac_xsave_LIBS"
56736
56737    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56738    # to get the SysV transport functions.
56739    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56740    # needs -lnsl.
56741    # The nsl library prevents programs from opening the X display
56742    # on Irix 5.2, according to T.E. Dickey.
56743    # The functions gethostbyname, getservbyname, and inet_addr are
56744    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56745    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56746if test "x$ac_cv_func_gethostbyname" = xyes; then :
56747
56748fi
56749
56750    if test $ac_cv_func_gethostbyname = no; then
56751      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56752$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56753if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56754  $as_echo_n "(cached) " >&6
56755else
56756  ac_check_lib_save_LIBS=$LIBS
56757LIBS="-lnsl  $LIBS"
56758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56759/* end confdefs.h.  */
56760
56761/* Override any GCC internal prototype to avoid an error.
56762   Use char because int might match the return type of a GCC
56763   builtin and then its argument prototype would still apply.  */
56764#ifdef __cplusplus
56765extern "C"
56766#endif
56767char gethostbyname ();
56768int
56769main ()
56770{
56771return gethostbyname ();
56772  ;
56773  return 0;
56774}
56775_ACEOF
56776if ac_fn_cxx_try_link "$LINENO"; then :
56777  ac_cv_lib_nsl_gethostbyname=yes
56778else
56779  ac_cv_lib_nsl_gethostbyname=no
56780fi
56781rm -f core conftest.err conftest.$ac_objext \
56782    conftest$ac_exeext conftest.$ac_ext
56783LIBS=$ac_check_lib_save_LIBS
56784fi
56785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56786$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56787if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56788  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56789fi
56790
56791      if test $ac_cv_lib_nsl_gethostbyname = no; then
56792	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56793$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56794if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56795  $as_echo_n "(cached) " >&6
56796else
56797  ac_check_lib_save_LIBS=$LIBS
56798LIBS="-lbsd  $LIBS"
56799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56800/* end confdefs.h.  */
56801
56802/* Override any GCC internal prototype to avoid an error.
56803   Use char because int might match the return type of a GCC
56804   builtin and then its argument prototype would still apply.  */
56805#ifdef __cplusplus
56806extern "C"
56807#endif
56808char gethostbyname ();
56809int
56810main ()
56811{
56812return gethostbyname ();
56813  ;
56814  return 0;
56815}
56816_ACEOF
56817if ac_fn_cxx_try_link "$LINENO"; then :
56818  ac_cv_lib_bsd_gethostbyname=yes
56819else
56820  ac_cv_lib_bsd_gethostbyname=no
56821fi
56822rm -f core conftest.err conftest.$ac_objext \
56823    conftest$ac_exeext conftest.$ac_ext
56824LIBS=$ac_check_lib_save_LIBS
56825fi
56826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56827$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56828if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56829  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56830fi
56831
56832      fi
56833    fi
56834
56835    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56836    # socket/setsockopt and other routines are undefined under SCO ODT
56837    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56838    # on later versions), says Simon Leinen: it contains gethostby*
56839    # variants that don't use the name server (or something).  -lsocket
56840    # must be given before -lnsl if both are needed.  We assume that
56841    # if connect needs -lnsl, so does gethostbyname.
56842    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56843if test "x$ac_cv_func_connect" = xyes; then :
56844
56845fi
56846
56847    if test $ac_cv_func_connect = no; then
56848      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56849$as_echo_n "checking for connect in -lsocket... " >&6; }
56850if ${ac_cv_lib_socket_connect+:} false; then :
56851  $as_echo_n "(cached) " >&6
56852else
56853  ac_check_lib_save_LIBS=$LIBS
56854LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56856/* end confdefs.h.  */
56857
56858/* Override any GCC internal prototype to avoid an error.
56859   Use char because int might match the return type of a GCC
56860   builtin and then its argument prototype would still apply.  */
56861#ifdef __cplusplus
56862extern "C"
56863#endif
56864char connect ();
56865int
56866main ()
56867{
56868return connect ();
56869  ;
56870  return 0;
56871}
56872_ACEOF
56873if ac_fn_cxx_try_link "$LINENO"; then :
56874  ac_cv_lib_socket_connect=yes
56875else
56876  ac_cv_lib_socket_connect=no
56877fi
56878rm -f core conftest.err conftest.$ac_objext \
56879    conftest$ac_exeext conftest.$ac_ext
56880LIBS=$ac_check_lib_save_LIBS
56881fi
56882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56883$as_echo "$ac_cv_lib_socket_connect" >&6; }
56884if test "x$ac_cv_lib_socket_connect" = xyes; then :
56885  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56886fi
56887
56888    fi
56889
56890    # Guillermo Gomez says -lposix is necessary on A/UX.
56891    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56892if test "x$ac_cv_func_remove" = xyes; then :
56893
56894fi
56895
56896    if test $ac_cv_func_remove = no; then
56897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56898$as_echo_n "checking for remove in -lposix... " >&6; }
56899if ${ac_cv_lib_posix_remove+:} false; then :
56900  $as_echo_n "(cached) " >&6
56901else
56902  ac_check_lib_save_LIBS=$LIBS
56903LIBS="-lposix  $LIBS"
56904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56905/* end confdefs.h.  */
56906
56907/* Override any GCC internal prototype to avoid an error.
56908   Use char because int might match the return type of a GCC
56909   builtin and then its argument prototype would still apply.  */
56910#ifdef __cplusplus
56911extern "C"
56912#endif
56913char remove ();
56914int
56915main ()
56916{
56917return remove ();
56918  ;
56919  return 0;
56920}
56921_ACEOF
56922if ac_fn_cxx_try_link "$LINENO"; then :
56923  ac_cv_lib_posix_remove=yes
56924else
56925  ac_cv_lib_posix_remove=no
56926fi
56927rm -f core conftest.err conftest.$ac_objext \
56928    conftest$ac_exeext conftest.$ac_ext
56929LIBS=$ac_check_lib_save_LIBS
56930fi
56931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56932$as_echo "$ac_cv_lib_posix_remove" >&6; }
56933if test "x$ac_cv_lib_posix_remove" = xyes; then :
56934  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56935fi
56936
56937    fi
56938
56939    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56940    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56941if test "x$ac_cv_func_shmat" = xyes; then :
56942
56943fi
56944
56945    if test $ac_cv_func_shmat = no; then
56946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56947$as_echo_n "checking for shmat in -lipc... " >&6; }
56948if ${ac_cv_lib_ipc_shmat+:} false; then :
56949  $as_echo_n "(cached) " >&6
56950else
56951  ac_check_lib_save_LIBS=$LIBS
56952LIBS="-lipc  $LIBS"
56953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56954/* end confdefs.h.  */
56955
56956/* Override any GCC internal prototype to avoid an error.
56957   Use char because int might match the return type of a GCC
56958   builtin and then its argument prototype would still apply.  */
56959#ifdef __cplusplus
56960extern "C"
56961#endif
56962char shmat ();
56963int
56964main ()
56965{
56966return shmat ();
56967  ;
56968  return 0;
56969}
56970_ACEOF
56971if ac_fn_cxx_try_link "$LINENO"; then :
56972  ac_cv_lib_ipc_shmat=yes
56973else
56974  ac_cv_lib_ipc_shmat=no
56975fi
56976rm -f core conftest.err conftest.$ac_objext \
56977    conftest$ac_exeext conftest.$ac_ext
56978LIBS=$ac_check_lib_save_LIBS
56979fi
56980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56981$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56982if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56983  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56984fi
56985
56986    fi
56987  fi
56988
56989  # Check for libraries that X11R6 Xt/Xaw programs need.
56990  ac_save_LDFLAGS=$LDFLAGS
56991  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56992  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56993  # check for ICE first), but we must link in the order -lSM -lICE or
56994  # we get undefined symbols.  So assume we have SM if we have ICE.
56995  # These have to be linked with before -lX11, unlike the other
56996  # libraries we check for below, so use a different variable.
56997  # John Interrante, Karl Berry
56998  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56999$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57000if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57001  $as_echo_n "(cached) " >&6
57002else
57003  ac_check_lib_save_LIBS=$LIBS
57004LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57006/* end confdefs.h.  */
57007
57008/* Override any GCC internal prototype to avoid an error.
57009   Use char because int might match the return type of a GCC
57010   builtin and then its argument prototype would still apply.  */
57011#ifdef __cplusplus
57012extern "C"
57013#endif
57014char IceConnectionNumber ();
57015int
57016main ()
57017{
57018return IceConnectionNumber ();
57019  ;
57020  return 0;
57021}
57022_ACEOF
57023if ac_fn_cxx_try_link "$LINENO"; then :
57024  ac_cv_lib_ICE_IceConnectionNumber=yes
57025else
57026  ac_cv_lib_ICE_IceConnectionNumber=no
57027fi
57028rm -f core conftest.err conftest.$ac_objext \
57029    conftest$ac_exeext conftest.$ac_ext
57030LIBS=$ac_check_lib_save_LIBS
57031fi
57032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57033$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57034if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57035  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57036fi
57037
57038  LDFLAGS=$ac_save_LDFLAGS
57039
57040fi
57041
57042
57043    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57044    # this doesn't make sense so we remove it.
57045    if test "x$COMPILE_TYPE" = xcross; then
57046      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57047    fi
57048
57049    if test "x$no_x" = xyes; then
57050
57051  # Print a helpful message on how to acquire the necessary build dependency.
57052  # x11 is the help tag: freetype, cups, alsa etc
57053  MISSING_DEPENDENCY=x11
57054
57055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57056    cygwin_help $MISSING_DEPENDENCY
57057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57058    msys_help $MISSING_DEPENDENCY
57059  else
57060    PKGHANDLER_COMMAND=
57061
57062    case $PKGHANDLER in
57063      apt-get)
57064        apt_help     $MISSING_DEPENDENCY ;;
57065      yum)
57066        yum_help     $MISSING_DEPENDENCY ;;
57067      brew)
57068        brew_help    $MISSING_DEPENDENCY ;;
57069      port)
57070        port_help    $MISSING_DEPENDENCY ;;
57071      pkgutil)
57072        pkgutil_help $MISSING_DEPENDENCY ;;
57073      pkgadd)
57074        pkgadd_help  $MISSING_DEPENDENCY ;;
57075    esac
57076
57077    if test "x$PKGHANDLER_COMMAND" != x; then
57078      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57079    fi
57080  fi
57081
57082      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57083    fi
57084
57085    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57086      OPENWIN_HOME="/usr/openwin"
57087      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57088      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57089          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57090    fi
57091
57092    ac_ext=c
57093ac_cpp='$CPP $CPPFLAGS'
57094ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57095ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57096ac_compiler_gnu=$ac_cv_c_compiler_gnu
57097
57098    OLD_CFLAGS="$CFLAGS"
57099    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57100
57101    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57102    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57103do :
57104  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57105ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57106          # include <X11/Xlib.h>
57107          # include <X11/Xutil.h>
57108
57109
57110"
57111if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57112  cat >>confdefs.h <<_ACEOF
57113#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57114_ACEOF
57115 X11_HEADERS_OK=yes
57116else
57117  X11_HEADERS_OK=no; break
57118fi
57119
57120done
57121
57122
57123    if test "x$X11_HEADERS_OK" = xno; then
57124
57125  # Print a helpful message on how to acquire the necessary build dependency.
57126  # x11 is the help tag: freetype, cups, alsa etc
57127  MISSING_DEPENDENCY=x11
57128
57129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57130    cygwin_help $MISSING_DEPENDENCY
57131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57132    msys_help $MISSING_DEPENDENCY
57133  else
57134    PKGHANDLER_COMMAND=
57135
57136    case $PKGHANDLER in
57137      apt-get)
57138        apt_help     $MISSING_DEPENDENCY ;;
57139      yum)
57140        yum_help     $MISSING_DEPENDENCY ;;
57141      brew)
57142        brew_help    $MISSING_DEPENDENCY ;;
57143      port)
57144        port_help    $MISSING_DEPENDENCY ;;
57145      pkgutil)
57146        pkgutil_help $MISSING_DEPENDENCY ;;
57147      pkgadd)
57148        pkgadd_help  $MISSING_DEPENDENCY ;;
57149    esac
57150
57151    if test "x$PKGHANDLER_COMMAND" != x; then
57152      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57153    fi
57154  fi
57155
57156      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57157    fi
57158
57159    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57160    # defined in libawt_xawt.
57161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57162$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57163    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57164/* end confdefs.h.  */
57165#include <X11/extensions/Xrender.h>
57166int
57167main ()
57168{
57169XLinearGradient x;
57170  ;
57171  return 0;
57172}
57173_ACEOF
57174if ac_fn_c_try_compile "$LINENO"; then :
57175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57176$as_echo "yes" >&6; }
57177else
57178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57179$as_echo "no" >&6; }
57180         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57181fi
57182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57183
57184    CFLAGS="$OLD_CFLAGS"
57185    ac_ext=cpp
57186ac_cpp='$CXXCPP $CPPFLAGS'
57187ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57188ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57189ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57190
57191  fi # NEEDS_LIB_X11
57192
57193
57194
57195
57196
57197
57198# Check whether --with-cups was given.
57199if test "${with_cups+set}" = set; then :
57200  withval=$with_cups;
57201fi
57202
57203
57204# Check whether --with-cups-include was given.
57205if test "${with_cups_include+set}" = set; then :
57206  withval=$with_cups_include;
57207fi
57208
57209
57210  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57211    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57212        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57213      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57214$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57215    fi
57216    CUPS_CFLAGS=
57217  else
57218    CUPS_FOUND=no
57219
57220    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57221      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57222    fi
57223
57224    if test "x${with_cups}" != x; then
57225      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57226$as_echo_n "checking for cups headers... " >&6; }
57227      if test -s "${with_cups}/include/cups/cups.h"; then
57228        CUPS_CFLAGS="-I${with_cups}/include"
57229        CUPS_FOUND=yes
57230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57231$as_echo "$CUPS_FOUND" >&6; }
57232      else
57233        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57234      fi
57235    fi
57236    if test "x${with_cups_include}" != x; then
57237      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57238$as_echo_n "checking for cups headers... " >&6; }
57239      if test -s "${with_cups_include}/cups/cups.h"; then
57240        CUPS_CFLAGS="-I${with_cups_include}"
57241        CUPS_FOUND=yes
57242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57243$as_echo "$CUPS_FOUND" >&6; }
57244      else
57245        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57246      fi
57247    fi
57248    if test "x$CUPS_FOUND" = xno; then
57249      # Are the cups headers installed in the default /usr/include location?
57250      for ac_header in cups/cups.h cups/ppd.h
57251do :
57252  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57253ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57254if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57255  cat >>confdefs.h <<_ACEOF
57256#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57257_ACEOF
57258
57259          CUPS_FOUND=yes
57260          CUPS_CFLAGS=
57261          DEFAULT_CUPS=yes
57262
57263fi
57264
57265done
57266
57267    fi
57268    if test "x$CUPS_FOUND" = xno; then
57269
57270  # Print a helpful message on how to acquire the necessary build dependency.
57271  # cups is the help tag: freetype, cups, alsa etc
57272  MISSING_DEPENDENCY=cups
57273
57274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57275    cygwin_help $MISSING_DEPENDENCY
57276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57277    msys_help $MISSING_DEPENDENCY
57278  else
57279    PKGHANDLER_COMMAND=
57280
57281    case $PKGHANDLER in
57282      apt-get)
57283        apt_help     $MISSING_DEPENDENCY ;;
57284      yum)
57285        yum_help     $MISSING_DEPENDENCY ;;
57286      brew)
57287        brew_help    $MISSING_DEPENDENCY ;;
57288      port)
57289        port_help    $MISSING_DEPENDENCY ;;
57290      pkgutil)
57291        pkgutil_help $MISSING_DEPENDENCY ;;
57292      pkgadd)
57293        pkgadd_help  $MISSING_DEPENDENCY ;;
57294    esac
57295
57296    if test "x$PKGHANDLER_COMMAND" != x; then
57297      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57298    fi
57299  fi
57300
57301      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57302    fi
57303  fi
57304
57305
57306
57307
57308
57309# Check whether --with-freetype was given.
57310if test "${with_freetype+set}" = set; then :
57311  withval=$with_freetype;
57312fi
57313
57314
57315# Check whether --with-freetype-include was given.
57316if test "${with_freetype_include+set}" = set; then :
57317  withval=$with_freetype_include;
57318fi
57319
57320
57321# Check whether --with-freetype-lib was given.
57322if test "${with_freetype_lib+set}" = set; then :
57323  withval=$with_freetype_lib;
57324fi
57325
57326
57327# Check whether --with-freetype-src was given.
57328if test "${with_freetype_src+set}" = set; then :
57329  withval=$with_freetype_src;
57330fi
57331
57332  # Check whether --enable-freetype-bundling was given.
57333if test "${enable_freetype_bundling+set}" = set; then :
57334  enableval=$enable_freetype_bundling;
57335fi
57336
57337
57338  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57339  FREETYPE_BASE_NAME=freetype
57340  FREETYPE_CFLAGS=
57341  FREETYPE_LIBS=
57342  FREETYPE_BUNDLE_LIB_PATH=
57343
57344  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57345    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57346        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57347        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57348        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57349      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57350$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57351    fi
57352    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57353      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57354$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57355    fi
57356  else
57357    # freetype is needed to build; go get it!
57358
57359    BUNDLE_FREETYPE="$enable_freetype_bundling"
57360
57361    if  test "x$with_freetype_src" != x; then
57362      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57363        # Try to build freetype if --with-freetype-src was given on Windows
57364
57365  FREETYPE_SRC_PATH="$with_freetype_src"
57366  BUILD_FREETYPE=yes
57367
57368  # Check if the freetype sources are acessible..
57369  if ! test -d $FREETYPE_SRC_PATH; then
57370    { $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
57371$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57372    BUILD_FREETYPE=no
57373  fi
57374  # ..and contain a vc2010 project file
57375  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57376  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57377    { $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
57378$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57379    BUILD_FREETYPE=no
57380  fi
57381  # Now check if configure found a version of 'msbuild.exe'
57382  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57383    { $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
57384$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;}
57385    BUILD_FREETYPE=no
57386  fi
57387
57388  # Ready to go..
57389  if test "x$BUILD_FREETYPE" = xyes; then
57390    # msbuild requires trailing slashes for output directories
57391    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57392    freetype_lib_path_unix="$freetype_lib_path"
57393    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57394
57395  unix_path="$vcxproj_path"
57396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57397    windows_path=`$CYGPATH -m "$unix_path"`
57398    vcxproj_path="$windows_path"
57399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57400    windows_path=`cmd //c echo $unix_path`
57401    vcxproj_path="$windows_path"
57402  fi
57403
57404
57405  unix_path="$freetype_lib_path"
57406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57407    windows_path=`$CYGPATH -m "$unix_path"`
57408    freetype_lib_path="$windows_path"
57409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57410    windows_path=`cmd //c echo $unix_path`
57411    freetype_lib_path="$windows_path"
57412  fi
57413
57414
57415  unix_path="$freetype_obj_path"
57416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57417    windows_path=`$CYGPATH -m "$unix_path"`
57418    freetype_obj_path="$windows_path"
57419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57420    windows_path=`cmd //c echo $unix_path`
57421    freetype_obj_path="$windows_path"
57422  fi
57423
57424    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57425      freetype_platform=x64
57426    else
57427      freetype_platform=win32
57428    fi
57429
57430    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57431    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57432    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57433    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57434    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57435$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57436
57437    # First we try to build the freetype.dll
57438    $ECHO -e "@echo off\n"\
57439        "$MSBUILD $vcxproj_path "\
57440        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57441        "/p:Configuration=\"Release Multithreaded\" "\
57442        "/p:Platform=$freetype_platform "\
57443        "/p:ConfigurationType=DynamicLibrary "\
57444        "/p:TargetName=freetype "\
57445        "/p:OutDir=\"$freetype_lib_path\" "\
57446        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57447    cmd /c freetype.bat
57448
57449    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57450      # If that succeeds we also build freetype.lib
57451      $ECHO -e "@echo off\n"\
57452          "$MSBUILD $vcxproj_path "\
57453          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57454          "/p:Configuration=\"Release Multithreaded\" "\
57455          "/p:Platform=$freetype_platform "\
57456          "/p:ConfigurationType=StaticLibrary "\
57457          "/p:TargetName=freetype "\
57458          "/p:OutDir=\"$freetype_lib_path\" "\
57459          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57460      cmd /c freetype.bat
57461
57462      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57463        # Once we build both, lib and dll, set freetype lib and include path appropriately
57464        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57465        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57466        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57467$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57468      else
57469        BUILD_FREETYPE=no
57470      fi
57471    else
57472      BUILD_FREETYPE=no
57473    fi
57474  fi
57475
57476        if test "x$BUILD_FREETYPE" = xyes; then
57477          # Okay, we built it. Check that it works.
57478
57479  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57480  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57481  METHOD="--with-freetype-src"
57482
57483  # Let's start with an optimistic view of the world :-)
57484  FOUND_FREETYPE=yes
57485
57486  # First look for the canonical freetype main include file ft2build.h.
57487  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57488    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57489    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57490    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57491      # Fail.
57492      FOUND_FREETYPE=no
57493    fi
57494  fi
57495
57496  if test "x$FOUND_FREETYPE" = xyes; then
57497    # Include file found, let's continue the sanity check.
57498    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57499$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57500
57501    # Reset to default value
57502    FREETYPE_BASE_NAME=freetype
57503    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57504    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57505      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57506          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57507        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57508        # for the .6 version explicitly.
57509        FREETYPE_BASE_NAME=freetype.6
57510        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57511        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57512$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57513      else
57514        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57515$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57516        FOUND_FREETYPE=no
57517      fi
57518    else
57519      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57520        # On Windows, we will need both .lib and .dll file.
57521        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57522          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57524          FOUND_FREETYPE=no
57525        fi
57526      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57527          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57528        # Found lib in isa dir, use that instead.
57529        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57530        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57531$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57532      fi
57533    fi
57534  fi
57535
57536  if test "x$FOUND_FREETYPE" = xyes; then
57537
57538  # Only process if variable expands to non-empty
57539
57540  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57542
57543  # Input might be given as Windows format, start by converting to
57544  # unix format.
57545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57546  new_path=`$CYGPATH -u "$path"`
57547
57548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57551  # "foo.exe" is OK but "foo" is an error.
57552  #
57553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57554  # It is also a way to make sure we got the proper file name for the real test later on.
57555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57556  if test "x$test_shortpath" = x; then
57557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57558$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57559    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57560  fi
57561
57562  # Call helper function which possibly converts this using DOS-style short mode.
57563  # If so, the updated path is stored in $new_path.
57564
57565  input_path="$new_path"
57566  # Check if we need to convert this using DOS-style short mode. If the path
57567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57568  # take no chances and rewrite it.
57569  # Note: m4 eats our [], so we need to use [ and ] instead.
57570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57571  if test "x$has_forbidden_chars" != x; then
57572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57576      # Going to short mode and back again did indeed matter. Since short mode is
57577      # case insensitive, let's make it lowercase to improve readability.
57578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57579      # Now convert it back to Unix-style (cygpath)
57580      input_path=`$CYGPATH -u "$shortmode_path"`
57581      new_path="$input_path"
57582    fi
57583  fi
57584
57585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57586  if test "x$test_cygdrive_prefix" = x; then
57587    # As a simple fix, exclude /usr/bin since it's not a real path.
57588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57590      # a path prefixed by /cygdrive for fixpath to work.
57591      new_path="$CYGWIN_ROOT_PATH$input_path"
57592    fi
57593  fi
57594
57595
57596  if test "x$path" != "x$new_path"; then
57597    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57600  fi
57601
57602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57603
57604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57605  has_colon=`$ECHO $path | $GREP ^.:`
57606  new_path="$path"
57607  if test "x$has_colon" = x; then
57608    # Not in mixed or Windows style, start by that.
57609    new_path=`cmd //c echo $path`
57610  fi
57611
57612
57613  input_path="$new_path"
57614  # Check if we need to convert this using DOS-style short mode. If the path
57615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57616  # take no chances and rewrite it.
57617  # Note: m4 eats our [], so we need to use [ and ] instead.
57618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57619  if test "x$has_forbidden_chars" != x; then
57620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57622  fi
57623
57624
57625  windows_path="$new_path"
57626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57627    unix_path=`$CYGPATH -u "$windows_path"`
57628    new_path="$unix_path"
57629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57631    new_path="$unix_path"
57632  fi
57633
57634  if test "x$path" != "x$new_path"; then
57635    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57638  fi
57639
57640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57642
57643    else
57644      # We're on a unix platform. Hooray! :)
57645      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57646      has_space=`$ECHO "$path" | $GREP " "`
57647      if test "x$has_space" != x; then
57648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57651      fi
57652
57653      # Use eval to expand a potential ~
57654      eval path="$path"
57655      if test ! -f "$path" && test ! -d "$path"; then
57656        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57657      fi
57658
57659      if test -d "$path"; then
57660        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57661      else
57662        dir="`$DIRNAME "$path"`"
57663        base="`$BASENAME "$path"`"
57664        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57665      fi
57666    fi
57667  fi
57668
57669
57670  # Only process if variable expands to non-empty
57671
57672  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57674
57675  # Input might be given as Windows format, start by converting to
57676  # unix format.
57677  path="$POTENTIAL_FREETYPE_LIB_PATH"
57678  new_path=`$CYGPATH -u "$path"`
57679
57680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57683  # "foo.exe" is OK but "foo" is an error.
57684  #
57685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57686  # It is also a way to make sure we got the proper file name for the real test later on.
57687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57688  if test "x$test_shortpath" = x; then
57689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57690$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57691    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57692  fi
57693
57694  # Call helper function which possibly converts this using DOS-style short mode.
57695  # If so, the updated path is stored in $new_path.
57696
57697  input_path="$new_path"
57698  # Check if we need to convert this using DOS-style short mode. If the path
57699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57700  # take no chances and rewrite it.
57701  # Note: m4 eats our [], so we need to use [ and ] instead.
57702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57703  if test "x$has_forbidden_chars" != x; then
57704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57708      # Going to short mode and back again did indeed matter. Since short mode is
57709      # case insensitive, let's make it lowercase to improve readability.
57710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57711      # Now convert it back to Unix-style (cygpath)
57712      input_path=`$CYGPATH -u "$shortmode_path"`
57713      new_path="$input_path"
57714    fi
57715  fi
57716
57717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57718  if test "x$test_cygdrive_prefix" = x; then
57719    # As a simple fix, exclude /usr/bin since it's not a real path.
57720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57722      # a path prefixed by /cygdrive for fixpath to work.
57723      new_path="$CYGWIN_ROOT_PATH$input_path"
57724    fi
57725  fi
57726
57727
57728  if test "x$path" != "x$new_path"; then
57729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57732  fi
57733
57734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57735
57736  path="$POTENTIAL_FREETYPE_LIB_PATH"
57737  has_colon=`$ECHO $path | $GREP ^.:`
57738  new_path="$path"
57739  if test "x$has_colon" = x; then
57740    # Not in mixed or Windows style, start by that.
57741    new_path=`cmd //c echo $path`
57742  fi
57743
57744
57745  input_path="$new_path"
57746  # Check if we need to convert this using DOS-style short mode. If the path
57747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57748  # take no chances and rewrite it.
57749  # Note: m4 eats our [], so we need to use [ and ] instead.
57750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57751  if test "x$has_forbidden_chars" != x; then
57752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57754  fi
57755
57756
57757  windows_path="$new_path"
57758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57759    unix_path=`$CYGPATH -u "$windows_path"`
57760    new_path="$unix_path"
57761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57763    new_path="$unix_path"
57764  fi
57765
57766  if test "x$path" != "x$new_path"; then
57767    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57769$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57770  fi
57771
57772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57774
57775    else
57776      # We're on a unix platform. Hooray! :)
57777      path="$POTENTIAL_FREETYPE_LIB_PATH"
57778      has_space=`$ECHO "$path" | $GREP " "`
57779      if test "x$has_space" != x; then
57780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57781$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57782        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57783      fi
57784
57785      # Use eval to expand a potential ~
57786      eval path="$path"
57787      if test ! -f "$path" && test ! -d "$path"; then
57788        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57789      fi
57790
57791      if test -d "$path"; then
57792        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57793      else
57794        dir="`$DIRNAME "$path"`"
57795        base="`$BASENAME "$path"`"
57796        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57797      fi
57798    fi
57799  fi
57800
57801
57802    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57804$as_echo_n "checking for freetype includes... " >&6; }
57805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57806$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57807    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57809$as_echo_n "checking for freetype libraries... " >&6; }
57810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57811$as_echo "$FREETYPE_LIB_PATH" >&6; }
57812  fi
57813
57814          if test "x$FOUND_FREETYPE" != xyes; then
57815            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57816          fi
57817        else
57818          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57819$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57820          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57821        fi
57822      else
57823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57824$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57825      fi
57826    fi
57827
57828    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57829      # User has specified settings
57830
57831      if test "x$BUNDLE_FREETYPE" = x; then
57832        # If not specified, default is to bundle freetype
57833        BUNDLE_FREETYPE=yes
57834      fi
57835
57836      if test "x$with_freetype" != x; then
57837        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57838        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57839      fi
57840
57841      # Allow --with-freetype-lib and --with-freetype-include to override
57842      if test "x$with_freetype_include" != x; then
57843        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57844      fi
57845      if test "x$with_freetype_lib" != x; then
57846        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57847      fi
57848
57849      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57850        # Okay, we got it. Check that it works.
57851
57852  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57853  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57854  METHOD="--with-freetype"
57855
57856  # Let's start with an optimistic view of the world :-)
57857  FOUND_FREETYPE=yes
57858
57859  # First look for the canonical freetype main include file ft2build.h.
57860  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57861    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57862    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57863    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57864      # Fail.
57865      FOUND_FREETYPE=no
57866    fi
57867  fi
57868
57869  if test "x$FOUND_FREETYPE" = xyes; then
57870    # Include file found, let's continue the sanity check.
57871    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57872$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57873
57874    # Reset to default value
57875    FREETYPE_BASE_NAME=freetype
57876    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57877    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57878      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57879          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57880        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57881        # for the .6 version explicitly.
57882        FREETYPE_BASE_NAME=freetype.6
57883        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57884        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57885$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57886      else
57887        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57888$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57889        FOUND_FREETYPE=no
57890      fi
57891    else
57892      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57893        # On Windows, we will need both .lib and .dll file.
57894        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57895          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57896$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57897          FOUND_FREETYPE=no
57898        fi
57899      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57900          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57901        # Found lib in isa dir, use that instead.
57902        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57903        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57904$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57905      fi
57906    fi
57907  fi
57908
57909  if test "x$FOUND_FREETYPE" = xyes; then
57910
57911  # Only process if variable expands to non-empty
57912
57913  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57915
57916  # Input might be given as Windows format, start by converting to
57917  # unix format.
57918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57919  new_path=`$CYGPATH -u "$path"`
57920
57921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57924  # "foo.exe" is OK but "foo" is an error.
57925  #
57926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57927  # It is also a way to make sure we got the proper file name for the real test later on.
57928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57929  if test "x$test_shortpath" = x; then
57930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57933  fi
57934
57935  # Call helper function which possibly converts this using DOS-style short mode.
57936  # If so, the updated path is stored in $new_path.
57937
57938  input_path="$new_path"
57939  # Check if we need to convert this using DOS-style short mode. If the path
57940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57941  # take no chances and rewrite it.
57942  # Note: m4 eats our [], so we need to use [ and ] instead.
57943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57944  if test "x$has_forbidden_chars" != x; then
57945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57949      # Going to short mode and back again did indeed matter. Since short mode is
57950      # case insensitive, let's make it lowercase to improve readability.
57951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57952      # Now convert it back to Unix-style (cygpath)
57953      input_path=`$CYGPATH -u "$shortmode_path"`
57954      new_path="$input_path"
57955    fi
57956  fi
57957
57958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57959  if test "x$test_cygdrive_prefix" = x; then
57960    # As a simple fix, exclude /usr/bin since it's not a real path.
57961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57963      # a path prefixed by /cygdrive for fixpath to work.
57964      new_path="$CYGWIN_ROOT_PATH$input_path"
57965    fi
57966  fi
57967
57968
57969  if test "x$path" != "x$new_path"; then
57970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57973  fi
57974
57975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57976
57977  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57978  has_colon=`$ECHO $path | $GREP ^.:`
57979  new_path="$path"
57980  if test "x$has_colon" = x; then
57981    # Not in mixed or Windows style, start by that.
57982    new_path=`cmd //c echo $path`
57983  fi
57984
57985
57986  input_path="$new_path"
57987  # Check if we need to convert this using DOS-style short mode. If the path
57988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57989  # take no chances and rewrite it.
57990  # Note: m4 eats our [], so we need to use [ and ] instead.
57991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57992  if test "x$has_forbidden_chars" != x; then
57993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57995  fi
57996
57997
57998  windows_path="$new_path"
57999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58000    unix_path=`$CYGPATH -u "$windows_path"`
58001    new_path="$unix_path"
58002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58004    new_path="$unix_path"
58005  fi
58006
58007  if test "x$path" != "x$new_path"; then
58008    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58011  fi
58012
58013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58015
58016    else
58017      # We're on a unix platform. Hooray! :)
58018      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58019      has_space=`$ECHO "$path" | $GREP " "`
58020      if test "x$has_space" != x; then
58021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58024      fi
58025
58026      # Use eval to expand a potential ~
58027      eval path="$path"
58028      if test ! -f "$path" && test ! -d "$path"; then
58029        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58030      fi
58031
58032      if test -d "$path"; then
58033        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58034      else
58035        dir="`$DIRNAME "$path"`"
58036        base="`$BASENAME "$path"`"
58037        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58038      fi
58039    fi
58040  fi
58041
58042
58043  # Only process if variable expands to non-empty
58044
58045  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58047
58048  # Input might be given as Windows format, start by converting to
58049  # unix format.
58050  path="$POTENTIAL_FREETYPE_LIB_PATH"
58051  new_path=`$CYGPATH -u "$path"`
58052
58053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58056  # "foo.exe" is OK but "foo" is an error.
58057  #
58058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58059  # It is also a way to make sure we got the proper file name for the real test later on.
58060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58061  if test "x$test_shortpath" = x; then
58062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58064    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58065  fi
58066
58067  # Call helper function which possibly converts this using DOS-style short mode.
58068  # If so, the updated path is stored in $new_path.
58069
58070  input_path="$new_path"
58071  # Check if we need to convert this using DOS-style short mode. If the path
58072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58073  # take no chances and rewrite it.
58074  # Note: m4 eats our [], so we need to use [ and ] instead.
58075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58076  if test "x$has_forbidden_chars" != x; then
58077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58081      # Going to short mode and back again did indeed matter. Since short mode is
58082      # case insensitive, let's make it lowercase to improve readability.
58083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58084      # Now convert it back to Unix-style (cygpath)
58085      input_path=`$CYGPATH -u "$shortmode_path"`
58086      new_path="$input_path"
58087    fi
58088  fi
58089
58090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58091  if test "x$test_cygdrive_prefix" = x; then
58092    # As a simple fix, exclude /usr/bin since it's not a real path.
58093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58095      # a path prefixed by /cygdrive for fixpath to work.
58096      new_path="$CYGWIN_ROOT_PATH$input_path"
58097    fi
58098  fi
58099
58100
58101  if test "x$path" != "x$new_path"; then
58102    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58105  fi
58106
58107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58108
58109  path="$POTENTIAL_FREETYPE_LIB_PATH"
58110  has_colon=`$ECHO $path | $GREP ^.:`
58111  new_path="$path"
58112  if test "x$has_colon" = x; then
58113    # Not in mixed or Windows style, start by that.
58114    new_path=`cmd //c echo $path`
58115  fi
58116
58117
58118  input_path="$new_path"
58119  # Check if we need to convert this using DOS-style short mode. If the path
58120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58121  # take no chances and rewrite it.
58122  # Note: m4 eats our [], so we need to use [ and ] instead.
58123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58124  if test "x$has_forbidden_chars" != x; then
58125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58127  fi
58128
58129
58130  windows_path="$new_path"
58131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58132    unix_path=`$CYGPATH -u "$windows_path"`
58133    new_path="$unix_path"
58134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58136    new_path="$unix_path"
58137  fi
58138
58139  if test "x$path" != "x$new_path"; then
58140    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58143  fi
58144
58145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58147
58148    else
58149      # We're on a unix platform. Hooray! :)
58150      path="$POTENTIAL_FREETYPE_LIB_PATH"
58151      has_space=`$ECHO "$path" | $GREP " "`
58152      if test "x$has_space" != x; then
58153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58154$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58156      fi
58157
58158      # Use eval to expand a potential ~
58159      eval path="$path"
58160      if test ! -f "$path" && test ! -d "$path"; then
58161        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58162      fi
58163
58164      if test -d "$path"; then
58165        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58166      else
58167        dir="`$DIRNAME "$path"`"
58168        base="`$BASENAME "$path"`"
58169        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58170      fi
58171    fi
58172  fi
58173
58174
58175    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58177$as_echo_n "checking for freetype includes... " >&6; }
58178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58179$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58180    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58182$as_echo_n "checking for freetype libraries... " >&6; }
58183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58184$as_echo "$FREETYPE_LIB_PATH" >&6; }
58185  fi
58186
58187        if test "x$FOUND_FREETYPE" != xyes; then
58188          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58189        fi
58190      else
58191        # User specified only one of lib or include. This is an error.
58192        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58193          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58194$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58195          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58196        else
58197          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58198$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58199          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58200        fi
58201      fi
58202    else
58203      # User did not specify settings, but we need freetype. Try to locate it.
58204
58205      if test "x$BUNDLE_FREETYPE" = x; then
58206        # If not specified, default is to bundle freetype only on windows
58207        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58208          BUNDLE_FREETYPE=yes
58209        else
58210          BUNDLE_FREETYPE=no
58211        fi
58212      fi
58213
58214      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58215      if test "x$SYSROOT" = x; then
58216        if test "x$FOUND_FREETYPE" != xyes; then
58217          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58218          if test "x$PKG_CONFIG" != x; then
58219
58220pkg_failed=no
58221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58222$as_echo_n "checking for FREETYPE... " >&6; }
58223
58224if test -n "$FREETYPE_CFLAGS"; then
58225    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58226 elif test -n "$PKG_CONFIG"; then
58227    if test -n "$PKG_CONFIG" && \
58228    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58229  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58230  ac_status=$?
58231  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58232  test $ac_status = 0; }; then
58233  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58234else
58235  pkg_failed=yes
58236fi
58237 else
58238    pkg_failed=untried
58239fi
58240if test -n "$FREETYPE_LIBS"; then
58241    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58242 elif test -n "$PKG_CONFIG"; then
58243    if test -n "$PKG_CONFIG" && \
58244    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58245  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58246  ac_status=$?
58247  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58248  test $ac_status = 0; }; then
58249  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58250else
58251  pkg_failed=yes
58252fi
58253 else
58254    pkg_failed=untried
58255fi
58256
58257
58258
58259if test $pkg_failed = yes; then
58260
58261if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58262        _pkg_short_errors_supported=yes
58263else
58264        _pkg_short_errors_supported=no
58265fi
58266        if test $_pkg_short_errors_supported = yes; then
58267	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58268        else
58269	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58270        fi
58271	# Put the nasty error message in config.log where it belongs
58272	echo "$FREETYPE_PKG_ERRORS" >&5
58273
58274	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58275$as_echo "no" >&6; }
58276                FOUND_FREETYPE=no
58277elif test $pkg_failed = untried; then
58278	FOUND_FREETYPE=no
58279else
58280	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58281	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58283$as_echo "yes" >&6; }
58284	FOUND_FREETYPE=yes
58285fi
58286            if test "x$FOUND_FREETYPE" = xyes; then
58287              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58288              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58289              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58290              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58291                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58292              fi
58293              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58294              if test "x$BUNDLE_FREETYPE" = xyes; then
58295                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58296$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58297                FOUND_FREETYPE=no
58298              else
58299                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58300$as_echo_n "checking for freetype... " >&6; }
58301                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58302$as_echo "yes (using pkg-config)" >&6; }
58303              fi
58304            fi
58305          fi
58306        fi
58307      fi
58308
58309      if test "x$FOUND_FREETYPE" != xyes; then
58310        # Check in well-known locations
58311        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58312          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58313
58314  windows_path="$FREETYPE_BASE_DIR"
58315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58316    unix_path=`$CYGPATH -u "$windows_path"`
58317    FREETYPE_BASE_DIR="$unix_path"
58318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58320    FREETYPE_BASE_DIR="$unix_path"
58321  fi
58322
58323
58324  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58325  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58326  METHOD="well-known location"
58327
58328  # Let's start with an optimistic view of the world :-)
58329  FOUND_FREETYPE=yes
58330
58331  # First look for the canonical freetype main include file ft2build.h.
58332  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58333    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58334    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58335    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58336      # Fail.
58337      FOUND_FREETYPE=no
58338    fi
58339  fi
58340
58341  if test "x$FOUND_FREETYPE" = xyes; then
58342    # Include file found, let's continue the sanity check.
58343    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58344$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58345
58346    # Reset to default value
58347    FREETYPE_BASE_NAME=freetype
58348    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58349    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58350      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58351          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58352        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58353        # for the .6 version explicitly.
58354        FREETYPE_BASE_NAME=freetype.6
58355        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58356        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58357$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58358      else
58359        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58360$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58361        FOUND_FREETYPE=no
58362      fi
58363    else
58364      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58365        # On Windows, we will need both .lib and .dll file.
58366        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58367          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58368$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58369          FOUND_FREETYPE=no
58370        fi
58371      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58372          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58373        # Found lib in isa dir, use that instead.
58374        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58375        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58376$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58377      fi
58378    fi
58379  fi
58380
58381  if test "x$FOUND_FREETYPE" = xyes; then
58382
58383  # Only process if variable expands to non-empty
58384
58385  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58387
58388  # Input might be given as Windows format, start by converting to
58389  # unix format.
58390  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58391  new_path=`$CYGPATH -u "$path"`
58392
58393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58396  # "foo.exe" is OK but "foo" is an error.
58397  #
58398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58399  # It is also a way to make sure we got the proper file name for the real test later on.
58400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58401  if test "x$test_shortpath" = x; then
58402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58404    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58405  fi
58406
58407  # Call helper function which possibly converts this using DOS-style short mode.
58408  # If so, the updated path is stored in $new_path.
58409
58410  input_path="$new_path"
58411  # Check if we need to convert this using DOS-style short mode. If the path
58412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58413  # take no chances and rewrite it.
58414  # Note: m4 eats our [], so we need to use [ and ] instead.
58415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58416  if test "x$has_forbidden_chars" != x; then
58417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58421      # Going to short mode and back again did indeed matter. Since short mode is
58422      # case insensitive, let's make it lowercase to improve readability.
58423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58424      # Now convert it back to Unix-style (cygpath)
58425      input_path=`$CYGPATH -u "$shortmode_path"`
58426      new_path="$input_path"
58427    fi
58428  fi
58429
58430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58431  if test "x$test_cygdrive_prefix" = x; then
58432    # As a simple fix, exclude /usr/bin since it's not a real path.
58433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58435      # a path prefixed by /cygdrive for fixpath to work.
58436      new_path="$CYGWIN_ROOT_PATH$input_path"
58437    fi
58438  fi
58439
58440
58441  if test "x$path" != "x$new_path"; then
58442    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58444$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58445  fi
58446
58447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58448
58449  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58450  has_colon=`$ECHO $path | $GREP ^.:`
58451  new_path="$path"
58452  if test "x$has_colon" = x; then
58453    # Not in mixed or Windows style, start by that.
58454    new_path=`cmd //c echo $path`
58455  fi
58456
58457
58458  input_path="$new_path"
58459  # Check if we need to convert this using DOS-style short mode. If the path
58460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58461  # take no chances and rewrite it.
58462  # Note: m4 eats our [], so we need to use [ and ] instead.
58463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58464  if test "x$has_forbidden_chars" != x; then
58465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58467  fi
58468
58469
58470  windows_path="$new_path"
58471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58472    unix_path=`$CYGPATH -u "$windows_path"`
58473    new_path="$unix_path"
58474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58476    new_path="$unix_path"
58477  fi
58478
58479  if test "x$path" != "x$new_path"; then
58480    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58483  fi
58484
58485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58487
58488    else
58489      # We're on a unix platform. Hooray! :)
58490      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58491      has_space=`$ECHO "$path" | $GREP " "`
58492      if test "x$has_space" != x; then
58493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58496      fi
58497
58498      # Use eval to expand a potential ~
58499      eval path="$path"
58500      if test ! -f "$path" && test ! -d "$path"; then
58501        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58502      fi
58503
58504      if test -d "$path"; then
58505        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58506      else
58507        dir="`$DIRNAME "$path"`"
58508        base="`$BASENAME "$path"`"
58509        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58510      fi
58511    fi
58512  fi
58513
58514
58515  # Only process if variable expands to non-empty
58516
58517  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58519
58520  # Input might be given as Windows format, start by converting to
58521  # unix format.
58522  path="$POTENTIAL_FREETYPE_LIB_PATH"
58523  new_path=`$CYGPATH -u "$path"`
58524
58525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58528  # "foo.exe" is OK but "foo" is an error.
58529  #
58530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58531  # It is also a way to make sure we got the proper file name for the real test later on.
58532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58533  if test "x$test_shortpath" = x; then
58534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58536    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58537  fi
58538
58539  # Call helper function which possibly converts this using DOS-style short mode.
58540  # If so, the updated path is stored in $new_path.
58541
58542  input_path="$new_path"
58543  # Check if we need to convert this using DOS-style short mode. If the path
58544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58545  # take no chances and rewrite it.
58546  # Note: m4 eats our [], so we need to use [ and ] instead.
58547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58548  if test "x$has_forbidden_chars" != x; then
58549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58553      # Going to short mode and back again did indeed matter. Since short mode is
58554      # case insensitive, let's make it lowercase to improve readability.
58555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58556      # Now convert it back to Unix-style (cygpath)
58557      input_path=`$CYGPATH -u "$shortmode_path"`
58558      new_path="$input_path"
58559    fi
58560  fi
58561
58562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58563  if test "x$test_cygdrive_prefix" = x; then
58564    # As a simple fix, exclude /usr/bin since it's not a real path.
58565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58567      # a path prefixed by /cygdrive for fixpath to work.
58568      new_path="$CYGWIN_ROOT_PATH$input_path"
58569    fi
58570  fi
58571
58572
58573  if test "x$path" != "x$new_path"; then
58574    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58576$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58577  fi
58578
58579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58580
58581  path="$POTENTIAL_FREETYPE_LIB_PATH"
58582  has_colon=`$ECHO $path | $GREP ^.:`
58583  new_path="$path"
58584  if test "x$has_colon" = x; then
58585    # Not in mixed or Windows style, start by that.
58586    new_path=`cmd //c echo $path`
58587  fi
58588
58589
58590  input_path="$new_path"
58591  # Check if we need to convert this using DOS-style short mode. If the path
58592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58593  # take no chances and rewrite it.
58594  # Note: m4 eats our [], so we need to use [ and ] instead.
58595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58596  if test "x$has_forbidden_chars" != x; then
58597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58599  fi
58600
58601
58602  windows_path="$new_path"
58603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58604    unix_path=`$CYGPATH -u "$windows_path"`
58605    new_path="$unix_path"
58606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58608    new_path="$unix_path"
58609  fi
58610
58611  if test "x$path" != "x$new_path"; then
58612    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58615  fi
58616
58617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58619
58620    else
58621      # We're on a unix platform. Hooray! :)
58622      path="$POTENTIAL_FREETYPE_LIB_PATH"
58623      has_space=`$ECHO "$path" | $GREP " "`
58624      if test "x$has_space" != x; then
58625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58628      fi
58629
58630      # Use eval to expand a potential ~
58631      eval path="$path"
58632      if test ! -f "$path" && test ! -d "$path"; then
58633        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58634      fi
58635
58636      if test -d "$path"; then
58637        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58638      else
58639        dir="`$DIRNAME "$path"`"
58640        base="`$BASENAME "$path"`"
58641        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58642      fi
58643    fi
58644  fi
58645
58646
58647    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58649$as_echo_n "checking for freetype includes... " >&6; }
58650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58651$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58652    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58654$as_echo_n "checking for freetype libraries... " >&6; }
58655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58656$as_echo "$FREETYPE_LIB_PATH" >&6; }
58657  fi
58658
58659          if test "x$FOUND_FREETYPE" != xyes; then
58660            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58661
58662  windows_path="$FREETYPE_BASE_DIR"
58663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58664    unix_path=`$CYGPATH -u "$windows_path"`
58665    FREETYPE_BASE_DIR="$unix_path"
58666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58668    FREETYPE_BASE_DIR="$unix_path"
58669  fi
58670
58671
58672  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58673  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58674  METHOD="well-known location"
58675
58676  # Let's start with an optimistic view of the world :-)
58677  FOUND_FREETYPE=yes
58678
58679  # First look for the canonical freetype main include file ft2build.h.
58680  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58681    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58682    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58683    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58684      # Fail.
58685      FOUND_FREETYPE=no
58686    fi
58687  fi
58688
58689  if test "x$FOUND_FREETYPE" = xyes; then
58690    # Include file found, let's continue the sanity check.
58691    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58692$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58693
58694    # Reset to default value
58695    FREETYPE_BASE_NAME=freetype
58696    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58697    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58698      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58699          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58700        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58701        # for the .6 version explicitly.
58702        FREETYPE_BASE_NAME=freetype.6
58703        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58704        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58705$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58706      else
58707        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58708$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58709        FOUND_FREETYPE=no
58710      fi
58711    else
58712      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58713        # On Windows, we will need both .lib and .dll file.
58714        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58715          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58716$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58717          FOUND_FREETYPE=no
58718        fi
58719      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58720          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58721        # Found lib in isa dir, use that instead.
58722        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58723        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58724$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58725      fi
58726    fi
58727  fi
58728
58729  if test "x$FOUND_FREETYPE" = xyes; then
58730
58731  # Only process if variable expands to non-empty
58732
58733  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58735
58736  # Input might be given as Windows format, start by converting to
58737  # unix format.
58738  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58739  new_path=`$CYGPATH -u "$path"`
58740
58741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58744  # "foo.exe" is OK but "foo" is an error.
58745  #
58746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58747  # It is also a way to make sure we got the proper file name for the real test later on.
58748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58749  if test "x$test_shortpath" = x; then
58750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58751$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58752    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58753  fi
58754
58755  # Call helper function which possibly converts this using DOS-style short mode.
58756  # If so, the updated path is stored in $new_path.
58757
58758  input_path="$new_path"
58759  # Check if we need to convert this using DOS-style short mode. If the path
58760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58761  # take no chances and rewrite it.
58762  # Note: m4 eats our [], so we need to use [ and ] instead.
58763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58764  if test "x$has_forbidden_chars" != x; then
58765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58769      # Going to short mode and back again did indeed matter. Since short mode is
58770      # case insensitive, let's make it lowercase to improve readability.
58771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58772      # Now convert it back to Unix-style (cygpath)
58773      input_path=`$CYGPATH -u "$shortmode_path"`
58774      new_path="$input_path"
58775    fi
58776  fi
58777
58778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58779  if test "x$test_cygdrive_prefix" = x; then
58780    # As a simple fix, exclude /usr/bin since it's not a real path.
58781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58783      # a path prefixed by /cygdrive for fixpath to work.
58784      new_path="$CYGWIN_ROOT_PATH$input_path"
58785    fi
58786  fi
58787
58788
58789  if test "x$path" != "x$new_path"; then
58790    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58792$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58793  fi
58794
58795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58796
58797  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58798  has_colon=`$ECHO $path | $GREP ^.:`
58799  new_path="$path"
58800  if test "x$has_colon" = x; then
58801    # Not in mixed or Windows style, start by that.
58802    new_path=`cmd //c echo $path`
58803  fi
58804
58805
58806  input_path="$new_path"
58807  # Check if we need to convert this using DOS-style short mode. If the path
58808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58809  # take no chances and rewrite it.
58810  # Note: m4 eats our [], so we need to use [ and ] instead.
58811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58812  if test "x$has_forbidden_chars" != x; then
58813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58815  fi
58816
58817
58818  windows_path="$new_path"
58819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58820    unix_path=`$CYGPATH -u "$windows_path"`
58821    new_path="$unix_path"
58822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58824    new_path="$unix_path"
58825  fi
58826
58827  if test "x$path" != "x$new_path"; then
58828    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58830$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58831  fi
58832
58833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58835
58836    else
58837      # We're on a unix platform. Hooray! :)
58838      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58839      has_space=`$ECHO "$path" | $GREP " "`
58840      if test "x$has_space" != x; then
58841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58844      fi
58845
58846      # Use eval to expand a potential ~
58847      eval path="$path"
58848      if test ! -f "$path" && test ! -d "$path"; then
58849        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58850      fi
58851
58852      if test -d "$path"; then
58853        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58854      else
58855        dir="`$DIRNAME "$path"`"
58856        base="`$BASENAME "$path"`"
58857        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58858      fi
58859    fi
58860  fi
58861
58862
58863  # Only process if variable expands to non-empty
58864
58865  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58867
58868  # Input might be given as Windows format, start by converting to
58869  # unix format.
58870  path="$POTENTIAL_FREETYPE_LIB_PATH"
58871  new_path=`$CYGPATH -u "$path"`
58872
58873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58876  # "foo.exe" is OK but "foo" is an error.
58877  #
58878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58879  # It is also a way to make sure we got the proper file name for the real test later on.
58880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58881  if test "x$test_shortpath" = x; then
58882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58883$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58884    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58885  fi
58886
58887  # Call helper function which possibly converts this using DOS-style short mode.
58888  # If so, the updated path is stored in $new_path.
58889
58890  input_path="$new_path"
58891  # Check if we need to convert this using DOS-style short mode. If the path
58892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58893  # take no chances and rewrite it.
58894  # Note: m4 eats our [], so we need to use [ and ] instead.
58895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58896  if test "x$has_forbidden_chars" != x; then
58897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58901      # Going to short mode and back again did indeed matter. Since short mode is
58902      # case insensitive, let's make it lowercase to improve readability.
58903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58904      # Now convert it back to Unix-style (cygpath)
58905      input_path=`$CYGPATH -u "$shortmode_path"`
58906      new_path="$input_path"
58907    fi
58908  fi
58909
58910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58911  if test "x$test_cygdrive_prefix" = x; then
58912    # As a simple fix, exclude /usr/bin since it's not a real path.
58913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58915      # a path prefixed by /cygdrive for fixpath to work.
58916      new_path="$CYGWIN_ROOT_PATH$input_path"
58917    fi
58918  fi
58919
58920
58921  if test "x$path" != "x$new_path"; then
58922    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58925  fi
58926
58927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58928
58929  path="$POTENTIAL_FREETYPE_LIB_PATH"
58930  has_colon=`$ECHO $path | $GREP ^.:`
58931  new_path="$path"
58932  if test "x$has_colon" = x; then
58933    # Not in mixed or Windows style, start by that.
58934    new_path=`cmd //c echo $path`
58935  fi
58936
58937
58938  input_path="$new_path"
58939  # Check if we need to convert this using DOS-style short mode. If the path
58940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58941  # take no chances and rewrite it.
58942  # Note: m4 eats our [], so we need to use [ and ] instead.
58943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58944  if test "x$has_forbidden_chars" != x; then
58945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58947  fi
58948
58949
58950  windows_path="$new_path"
58951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58952    unix_path=`$CYGPATH -u "$windows_path"`
58953    new_path="$unix_path"
58954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58956    new_path="$unix_path"
58957  fi
58958
58959  if test "x$path" != "x$new_path"; then
58960    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58962$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58963  fi
58964
58965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58967
58968    else
58969      # We're on a unix platform. Hooray! :)
58970      path="$POTENTIAL_FREETYPE_LIB_PATH"
58971      has_space=`$ECHO "$path" | $GREP " "`
58972      if test "x$has_space" != x; then
58973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58976      fi
58977
58978      # Use eval to expand a potential ~
58979      eval path="$path"
58980      if test ! -f "$path" && test ! -d "$path"; then
58981        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58982      fi
58983
58984      if test -d "$path"; then
58985        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58986      else
58987        dir="`$DIRNAME "$path"`"
58988        base="`$BASENAME "$path"`"
58989        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58990      fi
58991    fi
58992  fi
58993
58994
58995    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58997$as_echo_n "checking for freetype includes... " >&6; }
58998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58999$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59000    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59002$as_echo_n "checking for freetype libraries... " >&6; }
59003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59004$as_echo "$FREETYPE_LIB_PATH" >&6; }
59005  fi
59006
59007          fi
59008          if test "x$FOUND_FREETYPE" != xyes; then
59009            FREETYPE_BASE_DIR="$HOME/freetype"
59010
59011  windows_path="$FREETYPE_BASE_DIR"
59012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59013    unix_path=`$CYGPATH -u "$windows_path"`
59014    FREETYPE_BASE_DIR="$unix_path"
59015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59017    FREETYPE_BASE_DIR="$unix_path"
59018  fi
59019
59020            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59021
59022  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59023  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59024  METHOD="well-known location"
59025
59026  # Let's start with an optimistic view of the world :-)
59027  FOUND_FREETYPE=yes
59028
59029  # First look for the canonical freetype main include file ft2build.h.
59030  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59031    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59032    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59033    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59034      # Fail.
59035      FOUND_FREETYPE=no
59036    fi
59037  fi
59038
59039  if test "x$FOUND_FREETYPE" = xyes; then
59040    # Include file found, let's continue the sanity check.
59041    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59042$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59043
59044    # Reset to default value
59045    FREETYPE_BASE_NAME=freetype
59046    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59047    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59048      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59049          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59050        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59051        # for the .6 version explicitly.
59052        FREETYPE_BASE_NAME=freetype.6
59053        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59054        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59055$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59056      else
59057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59058$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59059        FOUND_FREETYPE=no
59060      fi
59061    else
59062      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59063        # On Windows, we will need both .lib and .dll file.
59064        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59065          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59066$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59067          FOUND_FREETYPE=no
59068        fi
59069      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59070          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59071        # Found lib in isa dir, use that instead.
59072        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59073        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59074$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59075      fi
59076    fi
59077  fi
59078
59079  if test "x$FOUND_FREETYPE" = xyes; then
59080
59081  # Only process if variable expands to non-empty
59082
59083  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59084    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59085
59086  # Input might be given as Windows format, start by converting to
59087  # unix format.
59088  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59089  new_path=`$CYGPATH -u "$path"`
59090
59091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59094  # "foo.exe" is OK but "foo" is an error.
59095  #
59096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59097  # It is also a way to make sure we got the proper file name for the real test later on.
59098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59099  if test "x$test_shortpath" = x; then
59100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59102    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59103  fi
59104
59105  # Call helper function which possibly converts this using DOS-style short mode.
59106  # If so, the updated path is stored in $new_path.
59107
59108  input_path="$new_path"
59109  # Check if we need to convert this using DOS-style short mode. If the path
59110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59111  # take no chances and rewrite it.
59112  # Note: m4 eats our [], so we need to use [ and ] instead.
59113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59114  if test "x$has_forbidden_chars" != x; then
59115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59119      # Going to short mode and back again did indeed matter. Since short mode is
59120      # case insensitive, let's make it lowercase to improve readability.
59121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59122      # Now convert it back to Unix-style (cygpath)
59123      input_path=`$CYGPATH -u "$shortmode_path"`
59124      new_path="$input_path"
59125    fi
59126  fi
59127
59128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59129  if test "x$test_cygdrive_prefix" = x; then
59130    # As a simple fix, exclude /usr/bin since it's not a real path.
59131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59133      # a path prefixed by /cygdrive for fixpath to work.
59134      new_path="$CYGWIN_ROOT_PATH$input_path"
59135    fi
59136  fi
59137
59138
59139  if test "x$path" != "x$new_path"; then
59140    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59143  fi
59144
59145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59146
59147  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59148  has_colon=`$ECHO $path | $GREP ^.:`
59149  new_path="$path"
59150  if test "x$has_colon" = x; then
59151    # Not in mixed or Windows style, start by that.
59152    new_path=`cmd //c echo $path`
59153  fi
59154
59155
59156  input_path="$new_path"
59157  # Check if we need to convert this using DOS-style short mode. If the path
59158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59159  # take no chances and rewrite it.
59160  # Note: m4 eats our [], so we need to use [ and ] instead.
59161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59162  if test "x$has_forbidden_chars" != x; then
59163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59165  fi
59166
59167
59168  windows_path="$new_path"
59169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59170    unix_path=`$CYGPATH -u "$windows_path"`
59171    new_path="$unix_path"
59172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59174    new_path="$unix_path"
59175  fi
59176
59177  if test "x$path" != "x$new_path"; then
59178    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59181  fi
59182
59183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59185
59186    else
59187      # We're on a unix platform. Hooray! :)
59188      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59189      has_space=`$ECHO "$path" | $GREP " "`
59190      if test "x$has_space" != x; then
59191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59193        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59194      fi
59195
59196      # Use eval to expand a potential ~
59197      eval path="$path"
59198      if test ! -f "$path" && test ! -d "$path"; then
59199        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59200      fi
59201
59202      if test -d "$path"; then
59203        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59204      else
59205        dir="`$DIRNAME "$path"`"
59206        base="`$BASENAME "$path"`"
59207        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59208      fi
59209    fi
59210  fi
59211
59212
59213  # Only process if variable expands to non-empty
59214
59215  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59217
59218  # Input might be given as Windows format, start by converting to
59219  # unix format.
59220  path="$POTENTIAL_FREETYPE_LIB_PATH"
59221  new_path=`$CYGPATH -u "$path"`
59222
59223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59226  # "foo.exe" is OK but "foo" is an error.
59227  #
59228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59229  # It is also a way to make sure we got the proper file name for the real test later on.
59230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59231  if test "x$test_shortpath" = x; then
59232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59233$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59234    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59235  fi
59236
59237  # Call helper function which possibly converts this using DOS-style short mode.
59238  # If so, the updated path is stored in $new_path.
59239
59240  input_path="$new_path"
59241  # Check if we need to convert this using DOS-style short mode. If the path
59242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59243  # take no chances and rewrite it.
59244  # Note: m4 eats our [], so we need to use [ and ] instead.
59245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59246  if test "x$has_forbidden_chars" != x; then
59247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59251      # Going to short mode and back again did indeed matter. Since short mode is
59252      # case insensitive, let's make it lowercase to improve readability.
59253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59254      # Now convert it back to Unix-style (cygpath)
59255      input_path=`$CYGPATH -u "$shortmode_path"`
59256      new_path="$input_path"
59257    fi
59258  fi
59259
59260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59261  if test "x$test_cygdrive_prefix" = x; then
59262    # As a simple fix, exclude /usr/bin since it's not a real path.
59263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59265      # a path prefixed by /cygdrive for fixpath to work.
59266      new_path="$CYGWIN_ROOT_PATH$input_path"
59267    fi
59268  fi
59269
59270
59271  if test "x$path" != "x$new_path"; then
59272    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59275  fi
59276
59277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59278
59279  path="$POTENTIAL_FREETYPE_LIB_PATH"
59280  has_colon=`$ECHO $path | $GREP ^.:`
59281  new_path="$path"
59282  if test "x$has_colon" = x; then
59283    # Not in mixed or Windows style, start by that.
59284    new_path=`cmd //c echo $path`
59285  fi
59286
59287
59288  input_path="$new_path"
59289  # Check if we need to convert this using DOS-style short mode. If the path
59290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59291  # take no chances and rewrite it.
59292  # Note: m4 eats our [], so we need to use [ and ] instead.
59293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59294  if test "x$has_forbidden_chars" != x; then
59295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59297  fi
59298
59299
59300  windows_path="$new_path"
59301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59302    unix_path=`$CYGPATH -u "$windows_path"`
59303    new_path="$unix_path"
59304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59306    new_path="$unix_path"
59307  fi
59308
59309  if test "x$path" != "x$new_path"; then
59310    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59312$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59313  fi
59314
59315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59317
59318    else
59319      # We're on a unix platform. Hooray! :)
59320      path="$POTENTIAL_FREETYPE_LIB_PATH"
59321      has_space=`$ECHO "$path" | $GREP " "`
59322      if test "x$has_space" != x; then
59323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59326      fi
59327
59328      # Use eval to expand a potential ~
59329      eval path="$path"
59330      if test ! -f "$path" && test ! -d "$path"; then
59331        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59332      fi
59333
59334      if test -d "$path"; then
59335        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59336      else
59337        dir="`$DIRNAME "$path"`"
59338        base="`$BASENAME "$path"`"
59339        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59340      fi
59341    fi
59342  fi
59343
59344
59345    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59347$as_echo_n "checking for freetype includes... " >&6; }
59348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59349$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59350    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59351    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59352$as_echo_n "checking for freetype libraries... " >&6; }
59353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59354$as_echo "$FREETYPE_LIB_PATH" >&6; }
59355  fi
59356
59357            else
59358
59359  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59360  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59361  METHOD="well-known location"
59362
59363  # Let's start with an optimistic view of the world :-)
59364  FOUND_FREETYPE=yes
59365
59366  # First look for the canonical freetype main include file ft2build.h.
59367  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59368    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59369    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59370    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59371      # Fail.
59372      FOUND_FREETYPE=no
59373    fi
59374  fi
59375
59376  if test "x$FOUND_FREETYPE" = xyes; then
59377    # Include file found, let's continue the sanity check.
59378    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59379$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59380
59381    # Reset to default value
59382    FREETYPE_BASE_NAME=freetype
59383    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59384    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59385      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59386          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59387        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59388        # for the .6 version explicitly.
59389        FREETYPE_BASE_NAME=freetype.6
59390        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59391        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59392$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59393      else
59394        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59395$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59396        FOUND_FREETYPE=no
59397      fi
59398    else
59399      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59400        # On Windows, we will need both .lib and .dll file.
59401        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59402          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59403$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59404          FOUND_FREETYPE=no
59405        fi
59406      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59407          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59408        # Found lib in isa dir, use that instead.
59409        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59410        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59411$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59412      fi
59413    fi
59414  fi
59415
59416  if test "x$FOUND_FREETYPE" = xyes; then
59417
59418  # Only process if variable expands to non-empty
59419
59420  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59421    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59422
59423  # Input might be given as Windows format, start by converting to
59424  # unix format.
59425  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59426  new_path=`$CYGPATH -u "$path"`
59427
59428  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59429  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59430  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59431  # "foo.exe" is OK but "foo" is an error.
59432  #
59433  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59434  # It is also a way to make sure we got the proper file name for the real test later on.
59435  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59436  if test "x$test_shortpath" = x; then
59437    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59438$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59439    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59440  fi
59441
59442  # Call helper function which possibly converts this using DOS-style short mode.
59443  # If so, the updated path is stored in $new_path.
59444
59445  input_path="$new_path"
59446  # Check if we need to convert this using DOS-style short mode. If the path
59447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59448  # take no chances and rewrite it.
59449  # Note: m4 eats our [], so we need to use [ and ] instead.
59450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59451  if test "x$has_forbidden_chars" != x; then
59452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59453    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59454    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59455    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59456      # Going to short mode and back again did indeed matter. Since short mode is
59457      # case insensitive, let's make it lowercase to improve readability.
59458      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59459      # Now convert it back to Unix-style (cygpath)
59460      input_path=`$CYGPATH -u "$shortmode_path"`
59461      new_path="$input_path"
59462    fi
59463  fi
59464
59465  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59466  if test "x$test_cygdrive_prefix" = x; then
59467    # As a simple fix, exclude /usr/bin since it's not a real path.
59468    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59469      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59470      # a path prefixed by /cygdrive for fixpath to work.
59471      new_path="$CYGWIN_ROOT_PATH$input_path"
59472    fi
59473  fi
59474
59475
59476  if test "x$path" != "x$new_path"; then
59477    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59479$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59480  fi
59481
59482    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59483
59484  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59485  has_colon=`$ECHO $path | $GREP ^.:`
59486  new_path="$path"
59487  if test "x$has_colon" = x; then
59488    # Not in mixed or Windows style, start by that.
59489    new_path=`cmd //c echo $path`
59490  fi
59491
59492
59493  input_path="$new_path"
59494  # Check if we need to convert this using DOS-style short mode. If the path
59495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59496  # take no chances and rewrite it.
59497  # Note: m4 eats our [], so we need to use [ and ] instead.
59498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59499  if test "x$has_forbidden_chars" != x; then
59500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59502  fi
59503
59504
59505  windows_path="$new_path"
59506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59507    unix_path=`$CYGPATH -u "$windows_path"`
59508    new_path="$unix_path"
59509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59511    new_path="$unix_path"
59512  fi
59513
59514  if test "x$path" != "x$new_path"; then
59515    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59517$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59518  fi
59519
59520  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59521  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59522
59523    else
59524      # We're on a unix platform. Hooray! :)
59525      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59526      has_space=`$ECHO "$path" | $GREP " "`
59527      if test "x$has_space" != x; then
59528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59529$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59530        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59531      fi
59532
59533      # Use eval to expand a potential ~
59534      eval path="$path"
59535      if test ! -f "$path" && test ! -d "$path"; then
59536        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59537      fi
59538
59539      if test -d "$path"; then
59540        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59541      else
59542        dir="`$DIRNAME "$path"`"
59543        base="`$BASENAME "$path"`"
59544        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59545      fi
59546    fi
59547  fi
59548
59549
59550  # Only process if variable expands to non-empty
59551
59552  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59554
59555  # Input might be given as Windows format, start by converting to
59556  # unix format.
59557  path="$POTENTIAL_FREETYPE_LIB_PATH"
59558  new_path=`$CYGPATH -u "$path"`
59559
59560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59563  # "foo.exe" is OK but "foo" is an error.
59564  #
59565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59566  # It is also a way to make sure we got the proper file name for the real test later on.
59567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59568  if test "x$test_shortpath" = x; then
59569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59571    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59572  fi
59573
59574  # Call helper function which possibly converts this using DOS-style short mode.
59575  # If so, the updated path is stored in $new_path.
59576
59577  input_path="$new_path"
59578  # Check if we need to convert this using DOS-style short mode. If the path
59579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59580  # take no chances and rewrite it.
59581  # Note: m4 eats our [], so we need to use [ and ] instead.
59582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59583  if test "x$has_forbidden_chars" != x; then
59584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59588      # Going to short mode and back again did indeed matter. Since short mode is
59589      # case insensitive, let's make it lowercase to improve readability.
59590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59591      # Now convert it back to Unix-style (cygpath)
59592      input_path=`$CYGPATH -u "$shortmode_path"`
59593      new_path="$input_path"
59594    fi
59595  fi
59596
59597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59598  if test "x$test_cygdrive_prefix" = x; then
59599    # As a simple fix, exclude /usr/bin since it's not a real path.
59600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59602      # a path prefixed by /cygdrive for fixpath to work.
59603      new_path="$CYGWIN_ROOT_PATH$input_path"
59604    fi
59605  fi
59606
59607
59608  if test "x$path" != "x$new_path"; then
59609    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59612  fi
59613
59614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59615
59616  path="$POTENTIAL_FREETYPE_LIB_PATH"
59617  has_colon=`$ECHO $path | $GREP ^.:`
59618  new_path="$path"
59619  if test "x$has_colon" = x; then
59620    # Not in mixed or Windows style, start by that.
59621    new_path=`cmd //c echo $path`
59622  fi
59623
59624
59625  input_path="$new_path"
59626  # Check if we need to convert this using DOS-style short mode. If the path
59627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59628  # take no chances and rewrite it.
59629  # Note: m4 eats our [], so we need to use [ and ] instead.
59630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59631  if test "x$has_forbidden_chars" != x; then
59632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59634  fi
59635
59636
59637  windows_path="$new_path"
59638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59639    unix_path=`$CYGPATH -u "$windows_path"`
59640    new_path="$unix_path"
59641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59643    new_path="$unix_path"
59644  fi
59645
59646  if test "x$path" != "x$new_path"; then
59647    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59649$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59650  fi
59651
59652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59654
59655    else
59656      # We're on a unix platform. Hooray! :)
59657      path="$POTENTIAL_FREETYPE_LIB_PATH"
59658      has_space=`$ECHO "$path" | $GREP " "`
59659      if test "x$has_space" != x; then
59660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59662        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59663      fi
59664
59665      # Use eval to expand a potential ~
59666      eval path="$path"
59667      if test ! -f "$path" && test ! -d "$path"; then
59668        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59669      fi
59670
59671      if test -d "$path"; then
59672        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59673      else
59674        dir="`$DIRNAME "$path"`"
59675        base="`$BASENAME "$path"`"
59676        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59677      fi
59678    fi
59679  fi
59680
59681
59682    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59684$as_echo_n "checking for freetype includes... " >&6; }
59685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59686$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59687    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59689$as_echo_n "checking for freetype libraries... " >&6; }
59690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59691$as_echo "$FREETYPE_LIB_PATH" >&6; }
59692  fi
59693
59694            fi
59695            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59696                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59697              # Source is available, as a last resort try to build freetype in default location
59698
59699  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59700  BUILD_FREETYPE=yes
59701
59702  # Check if the freetype sources are acessible..
59703  if ! test -d $FREETYPE_SRC_PATH; then
59704    { $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
59705$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59706    BUILD_FREETYPE=no
59707  fi
59708  # ..and contain a vc2010 project file
59709  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59710  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59711    { $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
59712$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59713    BUILD_FREETYPE=no
59714  fi
59715  # Now check if configure found a version of 'msbuild.exe'
59716  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59717    { $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
59718$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;}
59719    BUILD_FREETYPE=no
59720  fi
59721
59722  # Ready to go..
59723  if test "x$BUILD_FREETYPE" = xyes; then
59724    # msbuild requires trailing slashes for output directories
59725    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59726    freetype_lib_path_unix="$freetype_lib_path"
59727    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59728
59729  unix_path="$vcxproj_path"
59730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59731    windows_path=`$CYGPATH -m "$unix_path"`
59732    vcxproj_path="$windows_path"
59733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59734    windows_path=`cmd //c echo $unix_path`
59735    vcxproj_path="$windows_path"
59736  fi
59737
59738
59739  unix_path="$freetype_lib_path"
59740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59741    windows_path=`$CYGPATH -m "$unix_path"`
59742    freetype_lib_path="$windows_path"
59743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59744    windows_path=`cmd //c echo $unix_path`
59745    freetype_lib_path="$windows_path"
59746  fi
59747
59748
59749  unix_path="$freetype_obj_path"
59750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59751    windows_path=`$CYGPATH -m "$unix_path"`
59752    freetype_obj_path="$windows_path"
59753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59754    windows_path=`cmd //c echo $unix_path`
59755    freetype_obj_path="$windows_path"
59756  fi
59757
59758    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59759      freetype_platform=x64
59760    else
59761      freetype_platform=win32
59762    fi
59763
59764    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59765    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59766    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59767    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59768    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59769$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59770
59771    # First we try to build the freetype.dll
59772    $ECHO -e "@echo off\n"\
59773        "$MSBUILD $vcxproj_path "\
59774        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59775        "/p:Configuration=\"Release Multithreaded\" "\
59776        "/p:Platform=$freetype_platform "\
59777        "/p:ConfigurationType=DynamicLibrary "\
59778        "/p:TargetName=freetype "\
59779        "/p:OutDir=\"$freetype_lib_path\" "\
59780        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59781    cmd /c freetype.bat
59782
59783    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59784      # If that succeeds we also build freetype.lib
59785      $ECHO -e "@echo off\n"\
59786          "$MSBUILD $vcxproj_path "\
59787          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59788          "/p:Configuration=\"Release Multithreaded\" "\
59789          "/p:Platform=$freetype_platform "\
59790          "/p:ConfigurationType=StaticLibrary "\
59791          "/p:TargetName=freetype "\
59792          "/p:OutDir=\"$freetype_lib_path\" "\
59793          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59794      cmd /c freetype.bat
59795
59796      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59797        # Once we build both, lib and dll, set freetype lib and include path appropriately
59798        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59799        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59800        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59801$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59802      else
59803        BUILD_FREETYPE=no
59804      fi
59805    else
59806      BUILD_FREETYPE=no
59807    fi
59808  fi
59809
59810              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59811
59812  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59813  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59814  METHOD="well-known location"
59815
59816  # Let's start with an optimistic view of the world :-)
59817  FOUND_FREETYPE=yes
59818
59819  # First look for the canonical freetype main include file ft2build.h.
59820  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59821    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59822    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59823    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59824      # Fail.
59825      FOUND_FREETYPE=no
59826    fi
59827  fi
59828
59829  if test "x$FOUND_FREETYPE" = xyes; then
59830    # Include file found, let's continue the sanity check.
59831    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59832$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59833
59834    # Reset to default value
59835    FREETYPE_BASE_NAME=freetype
59836    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59837    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59838      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59839          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59840        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59841        # for the .6 version explicitly.
59842        FREETYPE_BASE_NAME=freetype.6
59843        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59844        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59845$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59846      else
59847        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59848$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59849        FOUND_FREETYPE=no
59850      fi
59851    else
59852      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59853        # On Windows, we will need both .lib and .dll file.
59854        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59855          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59856$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59857          FOUND_FREETYPE=no
59858        fi
59859      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59860          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59861        # Found lib in isa dir, use that instead.
59862        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59863        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59864$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59865      fi
59866    fi
59867  fi
59868
59869  if test "x$FOUND_FREETYPE" = xyes; then
59870
59871  # Only process if variable expands to non-empty
59872
59873  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59875
59876  # Input might be given as Windows format, start by converting to
59877  # unix format.
59878  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59879  new_path=`$CYGPATH -u "$path"`
59880
59881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59884  # "foo.exe" is OK but "foo" is an error.
59885  #
59886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59887  # It is also a way to make sure we got the proper file name for the real test later on.
59888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59889  if test "x$test_shortpath" = x; then
59890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59892    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59893  fi
59894
59895  # Call helper function which possibly converts this using DOS-style short mode.
59896  # If so, the updated path is stored in $new_path.
59897
59898  input_path="$new_path"
59899  # Check if we need to convert this using DOS-style short mode. If the path
59900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59901  # take no chances and rewrite it.
59902  # Note: m4 eats our [], so we need to use [ and ] instead.
59903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59904  if test "x$has_forbidden_chars" != x; then
59905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59909      # Going to short mode and back again did indeed matter. Since short mode is
59910      # case insensitive, let's make it lowercase to improve readability.
59911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59912      # Now convert it back to Unix-style (cygpath)
59913      input_path=`$CYGPATH -u "$shortmode_path"`
59914      new_path="$input_path"
59915    fi
59916  fi
59917
59918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59919  if test "x$test_cygdrive_prefix" = x; then
59920    # As a simple fix, exclude /usr/bin since it's not a real path.
59921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59923      # a path prefixed by /cygdrive for fixpath to work.
59924      new_path="$CYGWIN_ROOT_PATH$input_path"
59925    fi
59926  fi
59927
59928
59929  if test "x$path" != "x$new_path"; then
59930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59933  fi
59934
59935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59936
59937  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59938  has_colon=`$ECHO $path | $GREP ^.:`
59939  new_path="$path"
59940  if test "x$has_colon" = x; then
59941    # Not in mixed or Windows style, start by that.
59942    new_path=`cmd //c echo $path`
59943  fi
59944
59945
59946  input_path="$new_path"
59947  # Check if we need to convert this using DOS-style short mode. If the path
59948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59949  # take no chances and rewrite it.
59950  # Note: m4 eats our [], so we need to use [ and ] instead.
59951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59952  if test "x$has_forbidden_chars" != x; then
59953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59955  fi
59956
59957
59958  windows_path="$new_path"
59959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59960    unix_path=`$CYGPATH -u "$windows_path"`
59961    new_path="$unix_path"
59962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59964    new_path="$unix_path"
59965  fi
59966
59967  if test "x$path" != "x$new_path"; then
59968    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59971  fi
59972
59973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59975
59976    else
59977      # We're on a unix platform. Hooray! :)
59978      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59979      has_space=`$ECHO "$path" | $GREP " "`
59980      if test "x$has_space" != x; then
59981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59984      fi
59985
59986      # Use eval to expand a potential ~
59987      eval path="$path"
59988      if test ! -f "$path" && test ! -d "$path"; then
59989        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59990      fi
59991
59992      if test -d "$path"; then
59993        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59994      else
59995        dir="`$DIRNAME "$path"`"
59996        base="`$BASENAME "$path"`"
59997        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59998      fi
59999    fi
60000  fi
60001
60002
60003  # Only process if variable expands to non-empty
60004
60005  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60007
60008  # Input might be given as Windows format, start by converting to
60009  # unix format.
60010  path="$POTENTIAL_FREETYPE_LIB_PATH"
60011  new_path=`$CYGPATH -u "$path"`
60012
60013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60016  # "foo.exe" is OK but "foo" is an error.
60017  #
60018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60019  # It is also a way to make sure we got the proper file name for the real test later on.
60020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60021  if test "x$test_shortpath" = x; then
60022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60024    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60025  fi
60026
60027  # Call helper function which possibly converts this using DOS-style short mode.
60028  # If so, the updated path is stored in $new_path.
60029
60030  input_path="$new_path"
60031  # Check if we need to convert this using DOS-style short mode. If the path
60032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60033  # take no chances and rewrite it.
60034  # Note: m4 eats our [], so we need to use [ and ] instead.
60035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60036  if test "x$has_forbidden_chars" != x; then
60037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60041      # Going to short mode and back again did indeed matter. Since short mode is
60042      # case insensitive, let's make it lowercase to improve readability.
60043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60044      # Now convert it back to Unix-style (cygpath)
60045      input_path=`$CYGPATH -u "$shortmode_path"`
60046      new_path="$input_path"
60047    fi
60048  fi
60049
60050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60051  if test "x$test_cygdrive_prefix" = x; then
60052    # As a simple fix, exclude /usr/bin since it's not a real path.
60053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60055      # a path prefixed by /cygdrive for fixpath to work.
60056      new_path="$CYGWIN_ROOT_PATH$input_path"
60057    fi
60058  fi
60059
60060
60061  if test "x$path" != "x$new_path"; then
60062    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60065  fi
60066
60067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60068
60069  path="$POTENTIAL_FREETYPE_LIB_PATH"
60070  has_colon=`$ECHO $path | $GREP ^.:`
60071  new_path="$path"
60072  if test "x$has_colon" = x; then
60073    # Not in mixed or Windows style, start by that.
60074    new_path=`cmd //c echo $path`
60075  fi
60076
60077
60078  input_path="$new_path"
60079  # Check if we need to convert this using DOS-style short mode. If the path
60080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60081  # take no chances and rewrite it.
60082  # Note: m4 eats our [], so we need to use [ and ] instead.
60083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60084  if test "x$has_forbidden_chars" != x; then
60085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60087  fi
60088
60089
60090  windows_path="$new_path"
60091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60092    unix_path=`$CYGPATH -u "$windows_path"`
60093    new_path="$unix_path"
60094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60096    new_path="$unix_path"
60097  fi
60098
60099  if test "x$path" != "x$new_path"; then
60100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60103  fi
60104
60105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60107
60108    else
60109      # We're on a unix platform. Hooray! :)
60110      path="$POTENTIAL_FREETYPE_LIB_PATH"
60111      has_space=`$ECHO "$path" | $GREP " "`
60112      if test "x$has_space" != x; then
60113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60116      fi
60117
60118      # Use eval to expand a potential ~
60119      eval path="$path"
60120      if test ! -f "$path" && test ! -d "$path"; then
60121        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60122      fi
60123
60124      if test -d "$path"; then
60125        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60126      else
60127        dir="`$DIRNAME "$path"`"
60128        base="`$BASENAME "$path"`"
60129        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60130      fi
60131    fi
60132  fi
60133
60134
60135    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60137$as_echo_n "checking for freetype includes... " >&6; }
60138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60139$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60140    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60142$as_echo_n "checking for freetype libraries... " >&6; }
60143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60144$as_echo "$FREETYPE_LIB_PATH" >&6; }
60145  fi
60146
60147              else
60148
60149  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60150  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60151  METHOD="well-known location"
60152
60153  # Let's start with an optimistic view of the world :-)
60154  FOUND_FREETYPE=yes
60155
60156  # First look for the canonical freetype main include file ft2build.h.
60157  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60158    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60159    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60160    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60161      # Fail.
60162      FOUND_FREETYPE=no
60163    fi
60164  fi
60165
60166  if test "x$FOUND_FREETYPE" = xyes; then
60167    # Include file found, let's continue the sanity check.
60168    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60169$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60170
60171    # Reset to default value
60172    FREETYPE_BASE_NAME=freetype
60173    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60174    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60175      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60176          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60177        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60178        # for the .6 version explicitly.
60179        FREETYPE_BASE_NAME=freetype.6
60180        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60181        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60182$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60183      else
60184        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60185$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60186        FOUND_FREETYPE=no
60187      fi
60188    else
60189      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60190        # On Windows, we will need both .lib and .dll file.
60191        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60192          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60193$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60194          FOUND_FREETYPE=no
60195        fi
60196      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60197          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60198        # Found lib in isa dir, use that instead.
60199        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60200        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60201$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60202      fi
60203    fi
60204  fi
60205
60206  if test "x$FOUND_FREETYPE" = xyes; then
60207
60208  # Only process if variable expands to non-empty
60209
60210  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60212
60213  # Input might be given as Windows format, start by converting to
60214  # unix format.
60215  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60216  new_path=`$CYGPATH -u "$path"`
60217
60218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60221  # "foo.exe" is OK but "foo" is an error.
60222  #
60223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60224  # It is also a way to make sure we got the proper file name for the real test later on.
60225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60226  if test "x$test_shortpath" = x; then
60227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60228$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60229    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60230  fi
60231
60232  # Call helper function which possibly converts this using DOS-style short mode.
60233  # If so, the updated path is stored in $new_path.
60234
60235  input_path="$new_path"
60236  # Check if we need to convert this using DOS-style short mode. If the path
60237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60238  # take no chances and rewrite it.
60239  # Note: m4 eats our [], so we need to use [ and ] instead.
60240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60241  if test "x$has_forbidden_chars" != x; then
60242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60246      # Going to short mode and back again did indeed matter. Since short mode is
60247      # case insensitive, let's make it lowercase to improve readability.
60248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60249      # Now convert it back to Unix-style (cygpath)
60250      input_path=`$CYGPATH -u "$shortmode_path"`
60251      new_path="$input_path"
60252    fi
60253  fi
60254
60255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60256  if test "x$test_cygdrive_prefix" = x; then
60257    # As a simple fix, exclude /usr/bin since it's not a real path.
60258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60260      # a path prefixed by /cygdrive for fixpath to work.
60261      new_path="$CYGWIN_ROOT_PATH$input_path"
60262    fi
60263  fi
60264
60265
60266  if test "x$path" != "x$new_path"; then
60267    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60270  fi
60271
60272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60273
60274  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60275  has_colon=`$ECHO $path | $GREP ^.:`
60276  new_path="$path"
60277  if test "x$has_colon" = x; then
60278    # Not in mixed or Windows style, start by that.
60279    new_path=`cmd //c echo $path`
60280  fi
60281
60282
60283  input_path="$new_path"
60284  # Check if we need to convert this using DOS-style short mode. If the path
60285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60286  # take no chances and rewrite it.
60287  # Note: m4 eats our [], so we need to use [ and ] instead.
60288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60289  if test "x$has_forbidden_chars" != x; then
60290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60292  fi
60293
60294
60295  windows_path="$new_path"
60296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60297    unix_path=`$CYGPATH -u "$windows_path"`
60298    new_path="$unix_path"
60299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60301    new_path="$unix_path"
60302  fi
60303
60304  if test "x$path" != "x$new_path"; then
60305    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60308  fi
60309
60310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60312
60313    else
60314      # We're on a unix platform. Hooray! :)
60315      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60316      has_space=`$ECHO "$path" | $GREP " "`
60317      if test "x$has_space" != x; then
60318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60321      fi
60322
60323      # Use eval to expand a potential ~
60324      eval path="$path"
60325      if test ! -f "$path" && test ! -d "$path"; then
60326        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60327      fi
60328
60329      if test -d "$path"; then
60330        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60331      else
60332        dir="`$DIRNAME "$path"`"
60333        base="`$BASENAME "$path"`"
60334        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60335      fi
60336    fi
60337  fi
60338
60339
60340  # Only process if variable expands to non-empty
60341
60342  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60344
60345  # Input might be given as Windows format, start by converting to
60346  # unix format.
60347  path="$POTENTIAL_FREETYPE_LIB_PATH"
60348  new_path=`$CYGPATH -u "$path"`
60349
60350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60353  # "foo.exe" is OK but "foo" is an error.
60354  #
60355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60356  # It is also a way to make sure we got the proper file name for the real test later on.
60357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60358  if test "x$test_shortpath" = x; then
60359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60361    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60362  fi
60363
60364  # Call helper function which possibly converts this using DOS-style short mode.
60365  # If so, the updated path is stored in $new_path.
60366
60367  input_path="$new_path"
60368  # Check if we need to convert this using DOS-style short mode. If the path
60369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60370  # take no chances and rewrite it.
60371  # Note: m4 eats our [], so we need to use [ and ] instead.
60372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60373  if test "x$has_forbidden_chars" != x; then
60374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60378      # Going to short mode and back again did indeed matter. Since short mode is
60379      # case insensitive, let's make it lowercase to improve readability.
60380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60381      # Now convert it back to Unix-style (cygpath)
60382      input_path=`$CYGPATH -u "$shortmode_path"`
60383      new_path="$input_path"
60384    fi
60385  fi
60386
60387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60388  if test "x$test_cygdrive_prefix" = x; then
60389    # As a simple fix, exclude /usr/bin since it's not a real path.
60390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60392      # a path prefixed by /cygdrive for fixpath to work.
60393      new_path="$CYGWIN_ROOT_PATH$input_path"
60394    fi
60395  fi
60396
60397
60398  if test "x$path" != "x$new_path"; then
60399    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60402  fi
60403
60404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60405
60406  path="$POTENTIAL_FREETYPE_LIB_PATH"
60407  has_colon=`$ECHO $path | $GREP ^.:`
60408  new_path="$path"
60409  if test "x$has_colon" = x; then
60410    # Not in mixed or Windows style, start by that.
60411    new_path=`cmd //c echo $path`
60412  fi
60413
60414
60415  input_path="$new_path"
60416  # Check if we need to convert this using DOS-style short mode. If the path
60417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60418  # take no chances and rewrite it.
60419  # Note: m4 eats our [], so we need to use [ and ] instead.
60420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60421  if test "x$has_forbidden_chars" != x; then
60422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60424  fi
60425
60426
60427  windows_path="$new_path"
60428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60429    unix_path=`$CYGPATH -u "$windows_path"`
60430    new_path="$unix_path"
60431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60433    new_path="$unix_path"
60434  fi
60435
60436  if test "x$path" != "x$new_path"; then
60437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60440  fi
60441
60442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60444
60445    else
60446      # We're on a unix platform. Hooray! :)
60447      path="$POTENTIAL_FREETYPE_LIB_PATH"
60448      has_space=`$ECHO "$path" | $GREP " "`
60449      if test "x$has_space" != x; then
60450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60453      fi
60454
60455      # Use eval to expand a potential ~
60456      eval path="$path"
60457      if test ! -f "$path" && test ! -d "$path"; then
60458        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60459      fi
60460
60461      if test -d "$path"; then
60462        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60463      else
60464        dir="`$DIRNAME "$path"`"
60465        base="`$BASENAME "$path"`"
60466        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60467      fi
60468    fi
60469  fi
60470
60471
60472    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60474$as_echo_n "checking for freetype includes... " >&6; }
60475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60476$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60477    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60479$as_echo_n "checking for freetype libraries... " >&6; }
60480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60481$as_echo "$FREETYPE_LIB_PATH" >&6; }
60482  fi
60483
60484              fi
60485            fi
60486          fi
60487        else
60488          FREETYPE_BASE_DIR="$SYSROOT/usr"
60489
60490  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60491  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60492  METHOD="well-known location"
60493
60494  # Let's start with an optimistic view of the world :-)
60495  FOUND_FREETYPE=yes
60496
60497  # First look for the canonical freetype main include file ft2build.h.
60498  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60499    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60500    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60501    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60502      # Fail.
60503      FOUND_FREETYPE=no
60504    fi
60505  fi
60506
60507  if test "x$FOUND_FREETYPE" = xyes; then
60508    # Include file found, let's continue the sanity check.
60509    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60510$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60511
60512    # Reset to default value
60513    FREETYPE_BASE_NAME=freetype
60514    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60515    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60516      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60517          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60518        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60519        # for the .6 version explicitly.
60520        FREETYPE_BASE_NAME=freetype.6
60521        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60522        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60523$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60524      else
60525        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60526$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60527        FOUND_FREETYPE=no
60528      fi
60529    else
60530      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60531        # On Windows, we will need both .lib and .dll file.
60532        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60533          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60534$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60535          FOUND_FREETYPE=no
60536        fi
60537      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60538          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60539        # Found lib in isa dir, use that instead.
60540        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60541        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60542$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60543      fi
60544    fi
60545  fi
60546
60547  if test "x$FOUND_FREETYPE" = xyes; then
60548
60549  # Only process if variable expands to non-empty
60550
60551  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60553
60554  # Input might be given as Windows format, start by converting to
60555  # unix format.
60556  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60557  new_path=`$CYGPATH -u "$path"`
60558
60559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60562  # "foo.exe" is OK but "foo" is an error.
60563  #
60564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60565  # It is also a way to make sure we got the proper file name for the real test later on.
60566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60567  if test "x$test_shortpath" = x; then
60568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60569$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60570    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60571  fi
60572
60573  # Call helper function which possibly converts this using DOS-style short mode.
60574  # If so, the updated path is stored in $new_path.
60575
60576  input_path="$new_path"
60577  # Check if we need to convert this using DOS-style short mode. If the path
60578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60579  # take no chances and rewrite it.
60580  # Note: m4 eats our [], so we need to use [ and ] instead.
60581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60582  if test "x$has_forbidden_chars" != x; then
60583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60587      # Going to short mode and back again did indeed matter. Since short mode is
60588      # case insensitive, let's make it lowercase to improve readability.
60589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60590      # Now convert it back to Unix-style (cygpath)
60591      input_path=`$CYGPATH -u "$shortmode_path"`
60592      new_path="$input_path"
60593    fi
60594  fi
60595
60596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60597  if test "x$test_cygdrive_prefix" = x; then
60598    # As a simple fix, exclude /usr/bin since it's not a real path.
60599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60601      # a path prefixed by /cygdrive for fixpath to work.
60602      new_path="$CYGWIN_ROOT_PATH$input_path"
60603    fi
60604  fi
60605
60606
60607  if test "x$path" != "x$new_path"; then
60608    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60611  fi
60612
60613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60614
60615  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60616  has_colon=`$ECHO $path | $GREP ^.:`
60617  new_path="$path"
60618  if test "x$has_colon" = x; then
60619    # Not in mixed or Windows style, start by that.
60620    new_path=`cmd //c echo $path`
60621  fi
60622
60623
60624  input_path="$new_path"
60625  # Check if we need to convert this using DOS-style short mode. If the path
60626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60627  # take no chances and rewrite it.
60628  # Note: m4 eats our [], so we need to use [ and ] instead.
60629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60630  if test "x$has_forbidden_chars" != x; then
60631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60633  fi
60634
60635
60636  windows_path="$new_path"
60637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60638    unix_path=`$CYGPATH -u "$windows_path"`
60639    new_path="$unix_path"
60640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60642    new_path="$unix_path"
60643  fi
60644
60645  if test "x$path" != "x$new_path"; then
60646    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60648$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60649  fi
60650
60651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60653
60654    else
60655      # We're on a unix platform. Hooray! :)
60656      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60657      has_space=`$ECHO "$path" | $GREP " "`
60658      if test "x$has_space" != x; then
60659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60660$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60662      fi
60663
60664      # Use eval to expand a potential ~
60665      eval path="$path"
60666      if test ! -f "$path" && test ! -d "$path"; then
60667        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60668      fi
60669
60670      if test -d "$path"; then
60671        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60672      else
60673        dir="`$DIRNAME "$path"`"
60674        base="`$BASENAME "$path"`"
60675        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60676      fi
60677    fi
60678  fi
60679
60680
60681  # Only process if variable expands to non-empty
60682
60683  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60685
60686  # Input might be given as Windows format, start by converting to
60687  # unix format.
60688  path="$POTENTIAL_FREETYPE_LIB_PATH"
60689  new_path=`$CYGPATH -u "$path"`
60690
60691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60694  # "foo.exe" is OK but "foo" is an error.
60695  #
60696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60697  # It is also a way to make sure we got the proper file name for the real test later on.
60698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60699  if test "x$test_shortpath" = x; then
60700    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60701$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60702    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60703  fi
60704
60705  # Call helper function which possibly converts this using DOS-style short mode.
60706  # If so, the updated path is stored in $new_path.
60707
60708  input_path="$new_path"
60709  # Check if we need to convert this using DOS-style short mode. If the path
60710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60711  # take no chances and rewrite it.
60712  # Note: m4 eats our [], so we need to use [ and ] instead.
60713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60714  if test "x$has_forbidden_chars" != x; then
60715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60719      # Going to short mode and back again did indeed matter. Since short mode is
60720      # case insensitive, let's make it lowercase to improve readability.
60721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60722      # Now convert it back to Unix-style (cygpath)
60723      input_path=`$CYGPATH -u "$shortmode_path"`
60724      new_path="$input_path"
60725    fi
60726  fi
60727
60728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60729  if test "x$test_cygdrive_prefix" = x; then
60730    # As a simple fix, exclude /usr/bin since it's not a real path.
60731    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60733      # a path prefixed by /cygdrive for fixpath to work.
60734      new_path="$CYGWIN_ROOT_PATH$input_path"
60735    fi
60736  fi
60737
60738
60739  if test "x$path" != "x$new_path"; then
60740    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60742$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60743  fi
60744
60745    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60746
60747  path="$POTENTIAL_FREETYPE_LIB_PATH"
60748  has_colon=`$ECHO $path | $GREP ^.:`
60749  new_path="$path"
60750  if test "x$has_colon" = x; then
60751    # Not in mixed or Windows style, start by that.
60752    new_path=`cmd //c echo $path`
60753  fi
60754
60755
60756  input_path="$new_path"
60757  # Check if we need to convert this using DOS-style short mode. If the path
60758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60759  # take no chances and rewrite it.
60760  # Note: m4 eats our [], so we need to use [ and ] instead.
60761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60762  if test "x$has_forbidden_chars" != x; then
60763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60765  fi
60766
60767
60768  windows_path="$new_path"
60769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60770    unix_path=`$CYGPATH -u "$windows_path"`
60771    new_path="$unix_path"
60772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60774    new_path="$unix_path"
60775  fi
60776
60777  if test "x$path" != "x$new_path"; then
60778    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60780$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60781  fi
60782
60783  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60784  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60785
60786    else
60787      # We're on a unix platform. Hooray! :)
60788      path="$POTENTIAL_FREETYPE_LIB_PATH"
60789      has_space=`$ECHO "$path" | $GREP " "`
60790      if test "x$has_space" != x; then
60791        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60792$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60793        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60794      fi
60795
60796      # Use eval to expand a potential ~
60797      eval path="$path"
60798      if test ! -f "$path" && test ! -d "$path"; then
60799        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60800      fi
60801
60802      if test -d "$path"; then
60803        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60804      else
60805        dir="`$DIRNAME "$path"`"
60806        base="`$BASENAME "$path"`"
60807        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60808      fi
60809    fi
60810  fi
60811
60812
60813    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60815$as_echo_n "checking for freetype includes... " >&6; }
60816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60817$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60818    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60820$as_echo_n "checking for freetype libraries... " >&6; }
60821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60822$as_echo "$FREETYPE_LIB_PATH" >&6; }
60823  fi
60824
60825
60826          if test "x$FOUND_FREETYPE" != xyes; then
60827            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60828
60829  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60830  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60831  METHOD="well-known location"
60832
60833  # Let's start with an optimistic view of the world :-)
60834  FOUND_FREETYPE=yes
60835
60836  # First look for the canonical freetype main include file ft2build.h.
60837  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60838    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60839    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60840    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60841      # Fail.
60842      FOUND_FREETYPE=no
60843    fi
60844  fi
60845
60846  if test "x$FOUND_FREETYPE" = xyes; then
60847    # Include file found, let's continue the sanity check.
60848    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60849$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60850
60851    # Reset to default value
60852    FREETYPE_BASE_NAME=freetype
60853    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60854    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60855      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60856          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60857        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60858        # for the .6 version explicitly.
60859        FREETYPE_BASE_NAME=freetype.6
60860        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60861        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60862$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60863      else
60864        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60865$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60866        FOUND_FREETYPE=no
60867      fi
60868    else
60869      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60870        # On Windows, we will need both .lib and .dll file.
60871        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60872          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60873$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60874          FOUND_FREETYPE=no
60875        fi
60876      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60877          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60878        # Found lib in isa dir, use that instead.
60879        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60880        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60881$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60882      fi
60883    fi
60884  fi
60885
60886  if test "x$FOUND_FREETYPE" = xyes; then
60887
60888  # Only process if variable expands to non-empty
60889
60890  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60892
60893  # Input might be given as Windows format, start by converting to
60894  # unix format.
60895  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60896  new_path=`$CYGPATH -u "$path"`
60897
60898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60901  # "foo.exe" is OK but "foo" is an error.
60902  #
60903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60904  # It is also a way to make sure we got the proper file name for the real test later on.
60905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60906  if test "x$test_shortpath" = x; then
60907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60909    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60910  fi
60911
60912  # Call helper function which possibly converts this using DOS-style short mode.
60913  # If so, the updated path is stored in $new_path.
60914
60915  input_path="$new_path"
60916  # Check if we need to convert this using DOS-style short mode. If the path
60917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60918  # take no chances and rewrite it.
60919  # Note: m4 eats our [], so we need to use [ and ] instead.
60920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60921  if test "x$has_forbidden_chars" != x; then
60922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60926      # Going to short mode and back again did indeed matter. Since short mode is
60927      # case insensitive, let's make it lowercase to improve readability.
60928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60929      # Now convert it back to Unix-style (cygpath)
60930      input_path=`$CYGPATH -u "$shortmode_path"`
60931      new_path="$input_path"
60932    fi
60933  fi
60934
60935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60936  if test "x$test_cygdrive_prefix" = x; then
60937    # As a simple fix, exclude /usr/bin since it's not a real path.
60938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60940      # a path prefixed by /cygdrive for fixpath to work.
60941      new_path="$CYGWIN_ROOT_PATH$input_path"
60942    fi
60943  fi
60944
60945
60946  if test "x$path" != "x$new_path"; then
60947    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60949$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60950  fi
60951
60952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60953
60954  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60955  has_colon=`$ECHO $path | $GREP ^.:`
60956  new_path="$path"
60957  if test "x$has_colon" = x; then
60958    # Not in mixed or Windows style, start by that.
60959    new_path=`cmd //c echo $path`
60960  fi
60961
60962
60963  input_path="$new_path"
60964  # Check if we need to convert this using DOS-style short mode. If the path
60965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60966  # take no chances and rewrite it.
60967  # Note: m4 eats our [], so we need to use [ and ] instead.
60968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60969  if test "x$has_forbidden_chars" != x; then
60970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60972  fi
60973
60974
60975  windows_path="$new_path"
60976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60977    unix_path=`$CYGPATH -u "$windows_path"`
60978    new_path="$unix_path"
60979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60981    new_path="$unix_path"
60982  fi
60983
60984  if test "x$path" != "x$new_path"; then
60985    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60987$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60988  fi
60989
60990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60992
60993    else
60994      # We're on a unix platform. Hooray! :)
60995      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60996      has_space=`$ECHO "$path" | $GREP " "`
60997      if test "x$has_space" != x; then
60998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60999$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61000        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61001      fi
61002
61003      # Use eval to expand a potential ~
61004      eval path="$path"
61005      if test ! -f "$path" && test ! -d "$path"; then
61006        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61007      fi
61008
61009      if test -d "$path"; then
61010        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61011      else
61012        dir="`$DIRNAME "$path"`"
61013        base="`$BASENAME "$path"`"
61014        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61015      fi
61016    fi
61017  fi
61018
61019
61020  # Only process if variable expands to non-empty
61021
61022  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61024
61025  # Input might be given as Windows format, start by converting to
61026  # unix format.
61027  path="$POTENTIAL_FREETYPE_LIB_PATH"
61028  new_path=`$CYGPATH -u "$path"`
61029
61030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61033  # "foo.exe" is OK but "foo" is an error.
61034  #
61035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61036  # It is also a way to make sure we got the proper file name for the real test later on.
61037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61038  if test "x$test_shortpath" = x; then
61039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61040$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61041    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61042  fi
61043
61044  # Call helper function which possibly converts this using DOS-style short mode.
61045  # If so, the updated path is stored in $new_path.
61046
61047  input_path="$new_path"
61048  # Check if we need to convert this using DOS-style short mode. If the path
61049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61050  # take no chances and rewrite it.
61051  # Note: m4 eats our [], so we need to use [ and ] instead.
61052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61053  if test "x$has_forbidden_chars" != x; then
61054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61058      # Going to short mode and back again did indeed matter. Since short mode is
61059      # case insensitive, let's make it lowercase to improve readability.
61060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61061      # Now convert it back to Unix-style (cygpath)
61062      input_path=`$CYGPATH -u "$shortmode_path"`
61063      new_path="$input_path"
61064    fi
61065  fi
61066
61067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61068  if test "x$test_cygdrive_prefix" = x; then
61069    # As a simple fix, exclude /usr/bin since it's not a real path.
61070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61072      # a path prefixed by /cygdrive for fixpath to work.
61073      new_path="$CYGWIN_ROOT_PATH$input_path"
61074    fi
61075  fi
61076
61077
61078  if test "x$path" != "x$new_path"; then
61079    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61081$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61082  fi
61083
61084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61085
61086  path="$POTENTIAL_FREETYPE_LIB_PATH"
61087  has_colon=`$ECHO $path | $GREP ^.:`
61088  new_path="$path"
61089  if test "x$has_colon" = x; then
61090    # Not in mixed or Windows style, start by that.
61091    new_path=`cmd //c echo $path`
61092  fi
61093
61094
61095  input_path="$new_path"
61096  # Check if we need to convert this using DOS-style short mode. If the path
61097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61098  # take no chances and rewrite it.
61099  # Note: m4 eats our [], so we need to use [ and ] instead.
61100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61101  if test "x$has_forbidden_chars" != x; then
61102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61104  fi
61105
61106
61107  windows_path="$new_path"
61108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61109    unix_path=`$CYGPATH -u "$windows_path"`
61110    new_path="$unix_path"
61111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61113    new_path="$unix_path"
61114  fi
61115
61116  if test "x$path" != "x$new_path"; then
61117    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61119$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61120  fi
61121
61122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61124
61125    else
61126      # We're on a unix platform. Hooray! :)
61127      path="$POTENTIAL_FREETYPE_LIB_PATH"
61128      has_space=`$ECHO "$path" | $GREP " "`
61129      if test "x$has_space" != x; then
61130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61131$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61133      fi
61134
61135      # Use eval to expand a potential ~
61136      eval path="$path"
61137      if test ! -f "$path" && test ! -d "$path"; then
61138        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61139      fi
61140
61141      if test -d "$path"; then
61142        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61143      else
61144        dir="`$DIRNAME "$path"`"
61145        base="`$BASENAME "$path"`"
61146        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61147      fi
61148    fi
61149  fi
61150
61151
61152    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61153    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61154$as_echo_n "checking for freetype includes... " >&6; }
61155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61156$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61157    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61159$as_echo_n "checking for freetype libraries... " >&6; }
61160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61161$as_echo "$FREETYPE_LIB_PATH" >&6; }
61162  fi
61163
61164          fi
61165          if test "x$FOUND_FREETYPE" != xyes; then
61166            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61167
61168  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61169  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61170  METHOD="well-known location"
61171
61172  # Let's start with an optimistic view of the world :-)
61173  FOUND_FREETYPE=yes
61174
61175  # First look for the canonical freetype main include file ft2build.h.
61176  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61177    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61178    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61179    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61180      # Fail.
61181      FOUND_FREETYPE=no
61182    fi
61183  fi
61184
61185  if test "x$FOUND_FREETYPE" = xyes; then
61186    # Include file found, let's continue the sanity check.
61187    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61188$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61189
61190    # Reset to default value
61191    FREETYPE_BASE_NAME=freetype
61192    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61193    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61194      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61195          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61196        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61197        # for the .6 version explicitly.
61198        FREETYPE_BASE_NAME=freetype.6
61199        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61200        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61201$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61202      else
61203        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61204$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61205        FOUND_FREETYPE=no
61206      fi
61207    else
61208      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61209        # On Windows, we will need both .lib and .dll file.
61210        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61211          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61212$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61213          FOUND_FREETYPE=no
61214        fi
61215      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61216          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61217        # Found lib in isa dir, use that instead.
61218        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61219        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61220$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61221      fi
61222    fi
61223  fi
61224
61225  if test "x$FOUND_FREETYPE" = xyes; then
61226
61227  # Only process if variable expands to non-empty
61228
61229  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61231
61232  # Input might be given as Windows format, start by converting to
61233  # unix format.
61234  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61235  new_path=`$CYGPATH -u "$path"`
61236
61237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61240  # "foo.exe" is OK but "foo" is an error.
61241  #
61242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61243  # It is also a way to make sure we got the proper file name for the real test later on.
61244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61245  if test "x$test_shortpath" = x; then
61246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61247$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61248    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61249  fi
61250
61251  # Call helper function which possibly converts this using DOS-style short mode.
61252  # If so, the updated path is stored in $new_path.
61253
61254  input_path="$new_path"
61255  # Check if we need to convert this using DOS-style short mode. If the path
61256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61257  # take no chances and rewrite it.
61258  # Note: m4 eats our [], so we need to use [ and ] instead.
61259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61260  if test "x$has_forbidden_chars" != x; then
61261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61265      # Going to short mode and back again did indeed matter. Since short mode is
61266      # case insensitive, let's make it lowercase to improve readability.
61267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61268      # Now convert it back to Unix-style (cygpath)
61269      input_path=`$CYGPATH -u "$shortmode_path"`
61270      new_path="$input_path"
61271    fi
61272  fi
61273
61274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61275  if test "x$test_cygdrive_prefix" = x; then
61276    # As a simple fix, exclude /usr/bin since it's not a real path.
61277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61279      # a path prefixed by /cygdrive for fixpath to work.
61280      new_path="$CYGWIN_ROOT_PATH$input_path"
61281    fi
61282  fi
61283
61284
61285  if test "x$path" != "x$new_path"; then
61286    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61288$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61289  fi
61290
61291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61292
61293  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61294  has_colon=`$ECHO $path | $GREP ^.:`
61295  new_path="$path"
61296  if test "x$has_colon" = x; then
61297    # Not in mixed or Windows style, start by that.
61298    new_path=`cmd //c echo $path`
61299  fi
61300
61301
61302  input_path="$new_path"
61303  # Check if we need to convert this using DOS-style short mode. If the path
61304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61305  # take no chances and rewrite it.
61306  # Note: m4 eats our [], so we need to use [ and ] instead.
61307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61308  if test "x$has_forbidden_chars" != x; then
61309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61311  fi
61312
61313
61314  windows_path="$new_path"
61315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61316    unix_path=`$CYGPATH -u "$windows_path"`
61317    new_path="$unix_path"
61318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61320    new_path="$unix_path"
61321  fi
61322
61323  if test "x$path" != "x$new_path"; then
61324    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61326$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61327  fi
61328
61329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61331
61332    else
61333      # We're on a unix platform. Hooray! :)
61334      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61335      has_space=`$ECHO "$path" | $GREP " "`
61336      if test "x$has_space" != x; then
61337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61340      fi
61341
61342      # Use eval to expand a potential ~
61343      eval path="$path"
61344      if test ! -f "$path" && test ! -d "$path"; then
61345        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61346      fi
61347
61348      if test -d "$path"; then
61349        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61350      else
61351        dir="`$DIRNAME "$path"`"
61352        base="`$BASENAME "$path"`"
61353        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61354      fi
61355    fi
61356  fi
61357
61358
61359  # Only process if variable expands to non-empty
61360
61361  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61363
61364  # Input might be given as Windows format, start by converting to
61365  # unix format.
61366  path="$POTENTIAL_FREETYPE_LIB_PATH"
61367  new_path=`$CYGPATH -u "$path"`
61368
61369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61372  # "foo.exe" is OK but "foo" is an error.
61373  #
61374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61375  # It is also a way to make sure we got the proper file name for the real test later on.
61376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61377  if test "x$test_shortpath" = x; then
61378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61380    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61381  fi
61382
61383  # Call helper function which possibly converts this using DOS-style short mode.
61384  # If so, the updated path is stored in $new_path.
61385
61386  input_path="$new_path"
61387  # Check if we need to convert this using DOS-style short mode. If the path
61388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61389  # take no chances and rewrite it.
61390  # Note: m4 eats our [], so we need to use [ and ] instead.
61391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61392  if test "x$has_forbidden_chars" != x; then
61393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61397      # Going to short mode and back again did indeed matter. Since short mode is
61398      # case insensitive, let's make it lowercase to improve readability.
61399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61400      # Now convert it back to Unix-style (cygpath)
61401      input_path=`$CYGPATH -u "$shortmode_path"`
61402      new_path="$input_path"
61403    fi
61404  fi
61405
61406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61407  if test "x$test_cygdrive_prefix" = x; then
61408    # As a simple fix, exclude /usr/bin since it's not a real path.
61409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61411      # a path prefixed by /cygdrive for fixpath to work.
61412      new_path="$CYGWIN_ROOT_PATH$input_path"
61413    fi
61414  fi
61415
61416
61417  if test "x$path" != "x$new_path"; then
61418    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61420$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61421  fi
61422
61423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61424
61425  path="$POTENTIAL_FREETYPE_LIB_PATH"
61426  has_colon=`$ECHO $path | $GREP ^.:`
61427  new_path="$path"
61428  if test "x$has_colon" = x; then
61429    # Not in mixed or Windows style, start by that.
61430    new_path=`cmd //c echo $path`
61431  fi
61432
61433
61434  input_path="$new_path"
61435  # Check if we need to convert this using DOS-style short mode. If the path
61436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61437  # take no chances and rewrite it.
61438  # Note: m4 eats our [], so we need to use [ and ] instead.
61439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61440  if test "x$has_forbidden_chars" != x; then
61441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61443  fi
61444
61445
61446  windows_path="$new_path"
61447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61448    unix_path=`$CYGPATH -u "$windows_path"`
61449    new_path="$unix_path"
61450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61452    new_path="$unix_path"
61453  fi
61454
61455  if test "x$path" != "x$new_path"; then
61456    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61458$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61459  fi
61460
61461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61463
61464    else
61465      # We're on a unix platform. Hooray! :)
61466      path="$POTENTIAL_FREETYPE_LIB_PATH"
61467      has_space=`$ECHO "$path" | $GREP " "`
61468      if test "x$has_space" != x; then
61469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61470$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61472      fi
61473
61474      # Use eval to expand a potential ~
61475      eval path="$path"
61476      if test ! -f "$path" && test ! -d "$path"; then
61477        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61478      fi
61479
61480      if test -d "$path"; then
61481        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61482      else
61483        dir="`$DIRNAME "$path"`"
61484        base="`$BASENAME "$path"`"
61485        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61486      fi
61487    fi
61488  fi
61489
61490
61491    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61492    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61493$as_echo_n "checking for freetype includes... " >&6; }
61494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61495$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61496    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61498$as_echo_n "checking for freetype libraries... " >&6; }
61499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61500$as_echo "$FREETYPE_LIB_PATH" >&6; }
61501  fi
61502
61503          fi
61504
61505          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61506            if test "x$FOUND_FREETYPE" != xyes; then
61507              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61508              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61509
61510  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61511  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61512  METHOD="well-known location"
61513
61514  # Let's start with an optimistic view of the world :-)
61515  FOUND_FREETYPE=yes
61516
61517  # First look for the canonical freetype main include file ft2build.h.
61518  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61519    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61520    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61521    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61522      # Fail.
61523      FOUND_FREETYPE=no
61524    fi
61525  fi
61526
61527  if test "x$FOUND_FREETYPE" = xyes; then
61528    # Include file found, let's continue the sanity check.
61529    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61530$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61531
61532    # Reset to default value
61533    FREETYPE_BASE_NAME=freetype
61534    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61535    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61536      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61537          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61538        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61539        # for the .6 version explicitly.
61540        FREETYPE_BASE_NAME=freetype.6
61541        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61542        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61543$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61544      else
61545        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61546$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61547        FOUND_FREETYPE=no
61548      fi
61549    else
61550      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61551        # On Windows, we will need both .lib and .dll file.
61552        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61553          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61554$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61555          FOUND_FREETYPE=no
61556        fi
61557      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61558          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61559        # Found lib in isa dir, use that instead.
61560        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61561        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61562$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61563      fi
61564    fi
61565  fi
61566
61567  if test "x$FOUND_FREETYPE" = xyes; then
61568
61569  # Only process if variable expands to non-empty
61570
61571  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61573
61574  # Input might be given as Windows format, start by converting to
61575  # unix format.
61576  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61577  new_path=`$CYGPATH -u "$path"`
61578
61579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61582  # "foo.exe" is OK but "foo" is an error.
61583  #
61584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61585  # It is also a way to make sure we got the proper file name for the real test later on.
61586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61587  if test "x$test_shortpath" = x; then
61588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61590    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61591  fi
61592
61593  # Call helper function which possibly converts this using DOS-style short mode.
61594  # If so, the updated path is stored in $new_path.
61595
61596  input_path="$new_path"
61597  # Check if we need to convert this using DOS-style short mode. If the path
61598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61599  # take no chances and rewrite it.
61600  # Note: m4 eats our [], so we need to use [ and ] instead.
61601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61602  if test "x$has_forbidden_chars" != x; then
61603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61607      # Going to short mode and back again did indeed matter. Since short mode is
61608      # case insensitive, let's make it lowercase to improve readability.
61609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61610      # Now convert it back to Unix-style (cygpath)
61611      input_path=`$CYGPATH -u "$shortmode_path"`
61612      new_path="$input_path"
61613    fi
61614  fi
61615
61616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61617  if test "x$test_cygdrive_prefix" = x; then
61618    # As a simple fix, exclude /usr/bin since it's not a real path.
61619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61621      # a path prefixed by /cygdrive for fixpath to work.
61622      new_path="$CYGWIN_ROOT_PATH$input_path"
61623    fi
61624  fi
61625
61626
61627  if test "x$path" != "x$new_path"; then
61628    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61630$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61631  fi
61632
61633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61634
61635  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61636  has_colon=`$ECHO $path | $GREP ^.:`
61637  new_path="$path"
61638  if test "x$has_colon" = x; then
61639    # Not in mixed or Windows style, start by that.
61640    new_path=`cmd //c echo $path`
61641  fi
61642
61643
61644  input_path="$new_path"
61645  # Check if we need to convert this using DOS-style short mode. If the path
61646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61647  # take no chances and rewrite it.
61648  # Note: m4 eats our [], so we need to use [ and ] instead.
61649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61650  if test "x$has_forbidden_chars" != x; then
61651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61653  fi
61654
61655
61656  windows_path="$new_path"
61657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61658    unix_path=`$CYGPATH -u "$windows_path"`
61659    new_path="$unix_path"
61660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61662    new_path="$unix_path"
61663  fi
61664
61665  if test "x$path" != "x$new_path"; then
61666    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61669  fi
61670
61671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61673
61674    else
61675      # We're on a unix platform. Hooray! :)
61676      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61677      has_space=`$ECHO "$path" | $GREP " "`
61678      if test "x$has_space" != x; then
61679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61680$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61682      fi
61683
61684      # Use eval to expand a potential ~
61685      eval path="$path"
61686      if test ! -f "$path" && test ! -d "$path"; then
61687        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61688      fi
61689
61690      if test -d "$path"; then
61691        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61692      else
61693        dir="`$DIRNAME "$path"`"
61694        base="`$BASENAME "$path"`"
61695        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61696      fi
61697    fi
61698  fi
61699
61700
61701  # Only process if variable expands to non-empty
61702
61703  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61705
61706  # Input might be given as Windows format, start by converting to
61707  # unix format.
61708  path="$POTENTIAL_FREETYPE_LIB_PATH"
61709  new_path=`$CYGPATH -u "$path"`
61710
61711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61714  # "foo.exe" is OK but "foo" is an error.
61715  #
61716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61717  # It is also a way to make sure we got the proper file name for the real test later on.
61718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61719  if test "x$test_shortpath" = x; then
61720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61722    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61723  fi
61724
61725  # Call helper function which possibly converts this using DOS-style short mode.
61726  # If so, the updated path is stored in $new_path.
61727
61728  input_path="$new_path"
61729  # Check if we need to convert this using DOS-style short mode. If the path
61730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61731  # take no chances and rewrite it.
61732  # Note: m4 eats our [], so we need to use [ and ] instead.
61733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61734  if test "x$has_forbidden_chars" != x; then
61735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61739      # Going to short mode and back again did indeed matter. Since short mode is
61740      # case insensitive, let's make it lowercase to improve readability.
61741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61742      # Now convert it back to Unix-style (cygpath)
61743      input_path=`$CYGPATH -u "$shortmode_path"`
61744      new_path="$input_path"
61745    fi
61746  fi
61747
61748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61749  if test "x$test_cygdrive_prefix" = x; then
61750    # As a simple fix, exclude /usr/bin since it's not a real path.
61751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61753      # a path prefixed by /cygdrive for fixpath to work.
61754      new_path="$CYGWIN_ROOT_PATH$input_path"
61755    fi
61756  fi
61757
61758
61759  if test "x$path" != "x$new_path"; then
61760    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61762$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61763  fi
61764
61765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61766
61767  path="$POTENTIAL_FREETYPE_LIB_PATH"
61768  has_colon=`$ECHO $path | $GREP ^.:`
61769  new_path="$path"
61770  if test "x$has_colon" = x; then
61771    # Not in mixed or Windows style, start by that.
61772    new_path=`cmd //c echo $path`
61773  fi
61774
61775
61776  input_path="$new_path"
61777  # Check if we need to convert this using DOS-style short mode. If the path
61778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61779  # take no chances and rewrite it.
61780  # Note: m4 eats our [], so we need to use [ and ] instead.
61781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61782  if test "x$has_forbidden_chars" != x; then
61783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61785  fi
61786
61787
61788  windows_path="$new_path"
61789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61790    unix_path=`$CYGPATH -u "$windows_path"`
61791    new_path="$unix_path"
61792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61794    new_path="$unix_path"
61795  fi
61796
61797  if test "x$path" != "x$new_path"; then
61798    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61801  fi
61802
61803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61805
61806    else
61807      # We're on a unix platform. Hooray! :)
61808      path="$POTENTIAL_FREETYPE_LIB_PATH"
61809      has_space=`$ECHO "$path" | $GREP " "`
61810      if test "x$has_space" != x; then
61811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61812$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61814      fi
61815
61816      # Use eval to expand a potential ~
61817      eval path="$path"
61818      if test ! -f "$path" && test ! -d "$path"; then
61819        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61820      fi
61821
61822      if test -d "$path"; then
61823        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61824      else
61825        dir="`$DIRNAME "$path"`"
61826        base="`$BASENAME "$path"`"
61827        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61828      fi
61829    fi
61830  fi
61831
61832
61833    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61835$as_echo_n "checking for freetype includes... " >&6; }
61836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61837$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61838    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61840$as_echo_n "checking for freetype libraries... " >&6; }
61841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61842$as_echo "$FREETYPE_LIB_PATH" >&6; }
61843  fi
61844
61845            fi
61846          fi
61847
61848          if test "x$FOUND_FREETYPE" != xyes; then
61849            FREETYPE_BASE_DIR="$SYSROOT/usr"
61850            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61851
61852  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61853  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61854  METHOD="well-known location"
61855
61856  # Let's start with an optimistic view of the world :-)
61857  FOUND_FREETYPE=yes
61858
61859  # First look for the canonical freetype main include file ft2build.h.
61860  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61861    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61862    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61863    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61864      # Fail.
61865      FOUND_FREETYPE=no
61866    fi
61867  fi
61868
61869  if test "x$FOUND_FREETYPE" = xyes; then
61870    # Include file found, let's continue the sanity check.
61871    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61872$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61873
61874    # Reset to default value
61875    FREETYPE_BASE_NAME=freetype
61876    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61877    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61878      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61879          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61880        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61881        # for the .6 version explicitly.
61882        FREETYPE_BASE_NAME=freetype.6
61883        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61884        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61885$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61886      else
61887        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61888$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61889        FOUND_FREETYPE=no
61890      fi
61891    else
61892      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61893        # On Windows, we will need both .lib and .dll file.
61894        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61895          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61896$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61897          FOUND_FREETYPE=no
61898        fi
61899      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61900          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61901        # Found lib in isa dir, use that instead.
61902        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61903        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61904$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61905      fi
61906    fi
61907  fi
61908
61909  if test "x$FOUND_FREETYPE" = xyes; then
61910
61911  # Only process if variable expands to non-empty
61912
61913  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61915
61916  # Input might be given as Windows format, start by converting to
61917  # unix format.
61918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61919  new_path=`$CYGPATH -u "$path"`
61920
61921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61924  # "foo.exe" is OK but "foo" is an error.
61925  #
61926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61927  # It is also a way to make sure we got the proper file name for the real test later on.
61928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61929  if test "x$test_shortpath" = x; then
61930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61933  fi
61934
61935  # Call helper function which possibly converts this using DOS-style short mode.
61936  # If so, the updated path is stored in $new_path.
61937
61938  input_path="$new_path"
61939  # Check if we need to convert this using DOS-style short mode. If the path
61940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61941  # take no chances and rewrite it.
61942  # Note: m4 eats our [], so we need to use [ and ] instead.
61943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61944  if test "x$has_forbidden_chars" != x; then
61945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61949      # Going to short mode and back again did indeed matter. Since short mode is
61950      # case insensitive, let's make it lowercase to improve readability.
61951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61952      # Now convert it back to Unix-style (cygpath)
61953      input_path=`$CYGPATH -u "$shortmode_path"`
61954      new_path="$input_path"
61955    fi
61956  fi
61957
61958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61959  if test "x$test_cygdrive_prefix" = x; then
61960    # As a simple fix, exclude /usr/bin since it's not a real path.
61961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61963      # a path prefixed by /cygdrive for fixpath to work.
61964      new_path="$CYGWIN_ROOT_PATH$input_path"
61965    fi
61966  fi
61967
61968
61969  if test "x$path" != "x$new_path"; then
61970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61973  fi
61974
61975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61976
61977  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61978  has_colon=`$ECHO $path | $GREP ^.:`
61979  new_path="$path"
61980  if test "x$has_colon" = x; then
61981    # Not in mixed or Windows style, start by that.
61982    new_path=`cmd //c echo $path`
61983  fi
61984
61985
61986  input_path="$new_path"
61987  # Check if we need to convert this using DOS-style short mode. If the path
61988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61989  # take no chances and rewrite it.
61990  # Note: m4 eats our [], so we need to use [ and ] instead.
61991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61992  if test "x$has_forbidden_chars" != x; then
61993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61995  fi
61996
61997
61998  windows_path="$new_path"
61999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62000    unix_path=`$CYGPATH -u "$windows_path"`
62001    new_path="$unix_path"
62002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62004    new_path="$unix_path"
62005  fi
62006
62007  if test "x$path" != "x$new_path"; then
62008    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62011  fi
62012
62013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62015
62016    else
62017      # We're on a unix platform. Hooray! :)
62018      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62019      has_space=`$ECHO "$path" | $GREP " "`
62020      if test "x$has_space" != x; then
62021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62024      fi
62025
62026      # Use eval to expand a potential ~
62027      eval path="$path"
62028      if test ! -f "$path" && test ! -d "$path"; then
62029        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62030      fi
62031
62032      if test -d "$path"; then
62033        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62034      else
62035        dir="`$DIRNAME "$path"`"
62036        base="`$BASENAME "$path"`"
62037        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62038      fi
62039    fi
62040  fi
62041
62042
62043  # Only process if variable expands to non-empty
62044
62045  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62047
62048  # Input might be given as Windows format, start by converting to
62049  # unix format.
62050  path="$POTENTIAL_FREETYPE_LIB_PATH"
62051  new_path=`$CYGPATH -u "$path"`
62052
62053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62056  # "foo.exe" is OK but "foo" is an error.
62057  #
62058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62059  # It is also a way to make sure we got the proper file name for the real test later on.
62060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62061  if test "x$test_shortpath" = x; then
62062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62064    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62065  fi
62066
62067  # Call helper function which possibly converts this using DOS-style short mode.
62068  # If so, the updated path is stored in $new_path.
62069
62070  input_path="$new_path"
62071  # Check if we need to convert this using DOS-style short mode. If the path
62072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62073  # take no chances and rewrite it.
62074  # Note: m4 eats our [], so we need to use [ and ] instead.
62075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62076  if test "x$has_forbidden_chars" != x; then
62077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62081      # Going to short mode and back again did indeed matter. Since short mode is
62082      # case insensitive, let's make it lowercase to improve readability.
62083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62084      # Now convert it back to Unix-style (cygpath)
62085      input_path=`$CYGPATH -u "$shortmode_path"`
62086      new_path="$input_path"
62087    fi
62088  fi
62089
62090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62091  if test "x$test_cygdrive_prefix" = x; then
62092    # As a simple fix, exclude /usr/bin since it's not a real path.
62093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62095      # a path prefixed by /cygdrive for fixpath to work.
62096      new_path="$CYGWIN_ROOT_PATH$input_path"
62097    fi
62098  fi
62099
62100
62101  if test "x$path" != "x$new_path"; then
62102    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62105  fi
62106
62107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62108
62109  path="$POTENTIAL_FREETYPE_LIB_PATH"
62110  has_colon=`$ECHO $path | $GREP ^.:`
62111  new_path="$path"
62112  if test "x$has_colon" = x; then
62113    # Not in mixed or Windows style, start by that.
62114    new_path=`cmd //c echo $path`
62115  fi
62116
62117
62118  input_path="$new_path"
62119  # Check if we need to convert this using DOS-style short mode. If the path
62120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62121  # take no chances and rewrite it.
62122  # Note: m4 eats our [], so we need to use [ and ] instead.
62123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62124  if test "x$has_forbidden_chars" != x; then
62125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62127  fi
62128
62129
62130  windows_path="$new_path"
62131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62132    unix_path=`$CYGPATH -u "$windows_path"`
62133    new_path="$unix_path"
62134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62136    new_path="$unix_path"
62137  fi
62138
62139  if test "x$path" != "x$new_path"; then
62140    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62143  fi
62144
62145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62147
62148    else
62149      # We're on a unix platform. Hooray! :)
62150      path="$POTENTIAL_FREETYPE_LIB_PATH"
62151      has_space=`$ECHO "$path" | $GREP " "`
62152      if test "x$has_space" != x; then
62153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62154$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62156      fi
62157
62158      # Use eval to expand a potential ~
62159      eval path="$path"
62160      if test ! -f "$path" && test ! -d "$path"; then
62161        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62162      fi
62163
62164      if test -d "$path"; then
62165        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62166      else
62167        dir="`$DIRNAME "$path"`"
62168        base="`$BASENAME "$path"`"
62169        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62170      fi
62171    fi
62172  fi
62173
62174
62175    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62177$as_echo_n "checking for freetype includes... " >&6; }
62178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62179$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62180    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62182$as_echo_n "checking for freetype libraries... " >&6; }
62183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62184$as_echo "$FREETYPE_LIB_PATH" >&6; }
62185  fi
62186
62187            else
62188
62189  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62190  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62191  METHOD="well-known location"
62192
62193  # Let's start with an optimistic view of the world :-)
62194  FOUND_FREETYPE=yes
62195
62196  # First look for the canonical freetype main include file ft2build.h.
62197  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62198    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62199    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62200    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62201      # Fail.
62202      FOUND_FREETYPE=no
62203    fi
62204  fi
62205
62206  if test "x$FOUND_FREETYPE" = xyes; then
62207    # Include file found, let's continue the sanity check.
62208    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62209$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62210
62211    # Reset to default value
62212    FREETYPE_BASE_NAME=freetype
62213    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62214    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62215      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62216          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62217        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62218        # for the .6 version explicitly.
62219        FREETYPE_BASE_NAME=freetype.6
62220        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62221        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62222$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62223      else
62224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62225$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62226        FOUND_FREETYPE=no
62227      fi
62228    else
62229      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62230        # On Windows, we will need both .lib and .dll file.
62231        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62232          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62233$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62234          FOUND_FREETYPE=no
62235        fi
62236      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62237          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62238        # Found lib in isa dir, use that instead.
62239        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62240        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62241$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62242      fi
62243    fi
62244  fi
62245
62246  if test "x$FOUND_FREETYPE" = xyes; then
62247
62248  # Only process if variable expands to non-empty
62249
62250  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62251    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62252
62253  # Input might be given as Windows format, start by converting to
62254  # unix format.
62255  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62256  new_path=`$CYGPATH -u "$path"`
62257
62258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62261  # "foo.exe" is OK but "foo" is an error.
62262  #
62263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62264  # It is also a way to make sure we got the proper file name for the real test later on.
62265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62266  if test "x$test_shortpath" = x; then
62267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62268$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62269    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62270  fi
62271
62272  # Call helper function which possibly converts this using DOS-style short mode.
62273  # If so, the updated path is stored in $new_path.
62274
62275  input_path="$new_path"
62276  # Check if we need to convert this using DOS-style short mode. If the path
62277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62278  # take no chances and rewrite it.
62279  # Note: m4 eats our [], so we need to use [ and ] instead.
62280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62281  if test "x$has_forbidden_chars" != x; then
62282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62286      # Going to short mode and back again did indeed matter. Since short mode is
62287      # case insensitive, let's make it lowercase to improve readability.
62288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62289      # Now convert it back to Unix-style (cygpath)
62290      input_path=`$CYGPATH -u "$shortmode_path"`
62291      new_path="$input_path"
62292    fi
62293  fi
62294
62295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62296  if test "x$test_cygdrive_prefix" = x; then
62297    # As a simple fix, exclude /usr/bin since it's not a real path.
62298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62300      # a path prefixed by /cygdrive for fixpath to work.
62301      new_path="$CYGWIN_ROOT_PATH$input_path"
62302    fi
62303  fi
62304
62305
62306  if test "x$path" != "x$new_path"; then
62307    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62309$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62310  fi
62311
62312    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62313
62314  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62315  has_colon=`$ECHO $path | $GREP ^.:`
62316  new_path="$path"
62317  if test "x$has_colon" = x; then
62318    # Not in mixed or Windows style, start by that.
62319    new_path=`cmd //c echo $path`
62320  fi
62321
62322
62323  input_path="$new_path"
62324  # Check if we need to convert this using DOS-style short mode. If the path
62325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62326  # take no chances and rewrite it.
62327  # Note: m4 eats our [], so we need to use [ and ] instead.
62328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62329  if test "x$has_forbidden_chars" != x; then
62330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62332  fi
62333
62334
62335  windows_path="$new_path"
62336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62337    unix_path=`$CYGPATH -u "$windows_path"`
62338    new_path="$unix_path"
62339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62341    new_path="$unix_path"
62342  fi
62343
62344  if test "x$path" != "x$new_path"; then
62345    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62347$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62348  fi
62349
62350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62352
62353    else
62354      # We're on a unix platform. Hooray! :)
62355      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62356      has_space=`$ECHO "$path" | $GREP " "`
62357      if test "x$has_space" != x; then
62358        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62359$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62360        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62361      fi
62362
62363      # Use eval to expand a potential ~
62364      eval path="$path"
62365      if test ! -f "$path" && test ! -d "$path"; then
62366        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62367      fi
62368
62369      if test -d "$path"; then
62370        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62371      else
62372        dir="`$DIRNAME "$path"`"
62373        base="`$BASENAME "$path"`"
62374        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62375      fi
62376    fi
62377  fi
62378
62379
62380  # Only process if variable expands to non-empty
62381
62382  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62384
62385  # Input might be given as Windows format, start by converting to
62386  # unix format.
62387  path="$POTENTIAL_FREETYPE_LIB_PATH"
62388  new_path=`$CYGPATH -u "$path"`
62389
62390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62393  # "foo.exe" is OK but "foo" is an error.
62394  #
62395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62396  # It is also a way to make sure we got the proper file name for the real test later on.
62397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62398  if test "x$test_shortpath" = x; then
62399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62400$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62401    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62402  fi
62403
62404  # Call helper function which possibly converts this using DOS-style short mode.
62405  # If so, the updated path is stored in $new_path.
62406
62407  input_path="$new_path"
62408  # Check if we need to convert this using DOS-style short mode. If the path
62409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62410  # take no chances and rewrite it.
62411  # Note: m4 eats our [], so we need to use [ and ] instead.
62412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62413  if test "x$has_forbidden_chars" != x; then
62414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62418      # Going to short mode and back again did indeed matter. Since short mode is
62419      # case insensitive, let's make it lowercase to improve readability.
62420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62421      # Now convert it back to Unix-style (cygpath)
62422      input_path=`$CYGPATH -u "$shortmode_path"`
62423      new_path="$input_path"
62424    fi
62425  fi
62426
62427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62428  if test "x$test_cygdrive_prefix" = x; then
62429    # As a simple fix, exclude /usr/bin since it's not a real path.
62430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62432      # a path prefixed by /cygdrive for fixpath to work.
62433      new_path="$CYGWIN_ROOT_PATH$input_path"
62434    fi
62435  fi
62436
62437
62438  if test "x$path" != "x$new_path"; then
62439    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62441$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62442  fi
62443
62444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62445
62446  path="$POTENTIAL_FREETYPE_LIB_PATH"
62447  has_colon=`$ECHO $path | $GREP ^.:`
62448  new_path="$path"
62449  if test "x$has_colon" = x; then
62450    # Not in mixed or Windows style, start by that.
62451    new_path=`cmd //c echo $path`
62452  fi
62453
62454
62455  input_path="$new_path"
62456  # Check if we need to convert this using DOS-style short mode. If the path
62457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62458  # take no chances and rewrite it.
62459  # Note: m4 eats our [], so we need to use [ and ] instead.
62460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62461  if test "x$has_forbidden_chars" != x; then
62462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62464  fi
62465
62466
62467  windows_path="$new_path"
62468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62469    unix_path=`$CYGPATH -u "$windows_path"`
62470    new_path="$unix_path"
62471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62473    new_path="$unix_path"
62474  fi
62475
62476  if test "x$path" != "x$new_path"; then
62477    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62479$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62480  fi
62481
62482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62484
62485    else
62486      # We're on a unix platform. Hooray! :)
62487      path="$POTENTIAL_FREETYPE_LIB_PATH"
62488      has_space=`$ECHO "$path" | $GREP " "`
62489      if test "x$has_space" != x; then
62490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62491$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62493      fi
62494
62495      # Use eval to expand a potential ~
62496      eval path="$path"
62497      if test ! -f "$path" && test ! -d "$path"; then
62498        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62499      fi
62500
62501      if test -d "$path"; then
62502        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62503      else
62504        dir="`$DIRNAME "$path"`"
62505        base="`$BASENAME "$path"`"
62506        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62507      fi
62508    fi
62509  fi
62510
62511
62512    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62514$as_echo_n "checking for freetype includes... " >&6; }
62515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62516$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62517    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62519$as_echo_n "checking for freetype libraries... " >&6; }
62520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62521$as_echo "$FREETYPE_LIB_PATH" >&6; }
62522  fi
62523
62524              if test "x$FOUND_FREETYPE" != xyes; then
62525
62526  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62527  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62528  METHOD="well-known location"
62529
62530  # Let's start with an optimistic view of the world :-)
62531  FOUND_FREETYPE=yes
62532
62533  # First look for the canonical freetype main include file ft2build.h.
62534  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62535    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62536    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62537    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62538      # Fail.
62539      FOUND_FREETYPE=no
62540    fi
62541  fi
62542
62543  if test "x$FOUND_FREETYPE" = xyes; then
62544    # Include file found, let's continue the sanity check.
62545    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62546$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62547
62548    # Reset to default value
62549    FREETYPE_BASE_NAME=freetype
62550    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62551    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62552      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62553          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62554        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62555        # for the .6 version explicitly.
62556        FREETYPE_BASE_NAME=freetype.6
62557        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62558        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62559$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62560      else
62561        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62562$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62563        FOUND_FREETYPE=no
62564      fi
62565    else
62566      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62567        # On Windows, we will need both .lib and .dll file.
62568        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62569          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62570$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62571          FOUND_FREETYPE=no
62572        fi
62573      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62574          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62575        # Found lib in isa dir, use that instead.
62576        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62577        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62578$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62579      fi
62580    fi
62581  fi
62582
62583  if test "x$FOUND_FREETYPE" = xyes; then
62584
62585  # Only process if variable expands to non-empty
62586
62587  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62589
62590  # Input might be given as Windows format, start by converting to
62591  # unix format.
62592  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62593  new_path=`$CYGPATH -u "$path"`
62594
62595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62598  # "foo.exe" is OK but "foo" is an error.
62599  #
62600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62601  # It is also a way to make sure we got the proper file name for the real test later on.
62602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62603  if test "x$test_shortpath" = x; then
62604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62606    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62607  fi
62608
62609  # Call helper function which possibly converts this using DOS-style short mode.
62610  # If so, the updated path is stored in $new_path.
62611
62612  input_path="$new_path"
62613  # Check if we need to convert this using DOS-style short mode. If the path
62614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62615  # take no chances and rewrite it.
62616  # Note: m4 eats our [], so we need to use [ and ] instead.
62617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62618  if test "x$has_forbidden_chars" != x; then
62619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62623      # Going to short mode and back again did indeed matter. Since short mode is
62624      # case insensitive, let's make it lowercase to improve readability.
62625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62626      # Now convert it back to Unix-style (cygpath)
62627      input_path=`$CYGPATH -u "$shortmode_path"`
62628      new_path="$input_path"
62629    fi
62630  fi
62631
62632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62633  if test "x$test_cygdrive_prefix" = x; then
62634    # As a simple fix, exclude /usr/bin since it's not a real path.
62635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62637      # a path prefixed by /cygdrive for fixpath to work.
62638      new_path="$CYGWIN_ROOT_PATH$input_path"
62639    fi
62640  fi
62641
62642
62643  if test "x$path" != "x$new_path"; then
62644    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62646$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62647  fi
62648
62649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62650
62651  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62652  has_colon=`$ECHO $path | $GREP ^.:`
62653  new_path="$path"
62654  if test "x$has_colon" = x; then
62655    # Not in mixed or Windows style, start by that.
62656    new_path=`cmd //c echo $path`
62657  fi
62658
62659
62660  input_path="$new_path"
62661  # Check if we need to convert this using DOS-style short mode. If the path
62662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62663  # take no chances and rewrite it.
62664  # Note: m4 eats our [], so we need to use [ and ] instead.
62665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62666  if test "x$has_forbidden_chars" != x; then
62667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62669  fi
62670
62671
62672  windows_path="$new_path"
62673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62674    unix_path=`$CYGPATH -u "$windows_path"`
62675    new_path="$unix_path"
62676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62678    new_path="$unix_path"
62679  fi
62680
62681  if test "x$path" != "x$new_path"; then
62682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62685  fi
62686
62687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62689
62690    else
62691      # We're on a unix platform. Hooray! :)
62692      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62693      has_space=`$ECHO "$path" | $GREP " "`
62694      if test "x$has_space" != x; then
62695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62698      fi
62699
62700      # Use eval to expand a potential ~
62701      eval path="$path"
62702      if test ! -f "$path" && test ! -d "$path"; then
62703        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62704      fi
62705
62706      if test -d "$path"; then
62707        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62708      else
62709        dir="`$DIRNAME "$path"`"
62710        base="`$BASENAME "$path"`"
62711        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62712      fi
62713    fi
62714  fi
62715
62716
62717  # Only process if variable expands to non-empty
62718
62719  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62721
62722  # Input might be given as Windows format, start by converting to
62723  # unix format.
62724  path="$POTENTIAL_FREETYPE_LIB_PATH"
62725  new_path=`$CYGPATH -u "$path"`
62726
62727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62730  # "foo.exe" is OK but "foo" is an error.
62731  #
62732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62733  # It is also a way to make sure we got the proper file name for the real test later on.
62734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62735  if test "x$test_shortpath" = x; then
62736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62738    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62739  fi
62740
62741  # Call helper function which possibly converts this using DOS-style short mode.
62742  # If so, the updated path is stored in $new_path.
62743
62744  input_path="$new_path"
62745  # Check if we need to convert this using DOS-style short mode. If the path
62746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62747  # take no chances and rewrite it.
62748  # Note: m4 eats our [], so we need to use [ and ] instead.
62749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62750  if test "x$has_forbidden_chars" != x; then
62751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62755      # Going to short mode and back again did indeed matter. Since short mode is
62756      # case insensitive, let's make it lowercase to improve readability.
62757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62758      # Now convert it back to Unix-style (cygpath)
62759      input_path=`$CYGPATH -u "$shortmode_path"`
62760      new_path="$input_path"
62761    fi
62762  fi
62763
62764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62765  if test "x$test_cygdrive_prefix" = x; then
62766    # As a simple fix, exclude /usr/bin since it's not a real path.
62767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62769      # a path prefixed by /cygdrive for fixpath to work.
62770      new_path="$CYGWIN_ROOT_PATH$input_path"
62771    fi
62772  fi
62773
62774
62775  if test "x$path" != "x$new_path"; then
62776    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62778$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62779  fi
62780
62781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62782
62783  path="$POTENTIAL_FREETYPE_LIB_PATH"
62784  has_colon=`$ECHO $path | $GREP ^.:`
62785  new_path="$path"
62786  if test "x$has_colon" = x; then
62787    # Not in mixed or Windows style, start by that.
62788    new_path=`cmd //c echo $path`
62789  fi
62790
62791
62792  input_path="$new_path"
62793  # Check if we need to convert this using DOS-style short mode. If the path
62794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62795  # take no chances and rewrite it.
62796  # Note: m4 eats our [], so we need to use [ and ] instead.
62797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62798  if test "x$has_forbidden_chars" != x; then
62799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62801  fi
62802
62803
62804  windows_path="$new_path"
62805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62806    unix_path=`$CYGPATH -u "$windows_path"`
62807    new_path="$unix_path"
62808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62810    new_path="$unix_path"
62811  fi
62812
62813  if test "x$path" != "x$new_path"; then
62814    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62816$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62817  fi
62818
62819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62821
62822    else
62823      # We're on a unix platform. Hooray! :)
62824      path="$POTENTIAL_FREETYPE_LIB_PATH"
62825      has_space=`$ECHO "$path" | $GREP " "`
62826      if test "x$has_space" != x; then
62827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62828$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62830      fi
62831
62832      # Use eval to expand a potential ~
62833      eval path="$path"
62834      if test ! -f "$path" && test ! -d "$path"; then
62835        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62836      fi
62837
62838      if test -d "$path"; then
62839        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62840      else
62841        dir="`$DIRNAME "$path"`"
62842        base="`$BASENAME "$path"`"
62843        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62844      fi
62845    fi
62846  fi
62847
62848
62849    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62851$as_echo_n "checking for freetype includes... " >&6; }
62852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62853$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62854    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62856$as_echo_n "checking for freetype libraries... " >&6; }
62857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62858$as_echo "$FREETYPE_LIB_PATH" >&6; }
62859  fi
62860
62861              fi
62862            fi
62863          fi
62864        fi
62865      fi # end check in well-known locations
62866
62867      if test "x$FOUND_FREETYPE" != xyes; then
62868
62869  # Print a helpful message on how to acquire the necessary build dependency.
62870  # freetype is the help tag: freetype, cups, alsa etc
62871  MISSING_DEPENDENCY=freetype
62872
62873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62874    cygwin_help $MISSING_DEPENDENCY
62875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62876    msys_help $MISSING_DEPENDENCY
62877  else
62878    PKGHANDLER_COMMAND=
62879
62880    case $PKGHANDLER in
62881      apt-get)
62882        apt_help     $MISSING_DEPENDENCY ;;
62883      yum)
62884        yum_help     $MISSING_DEPENDENCY ;;
62885      brew)
62886        brew_help    $MISSING_DEPENDENCY ;;
62887      port)
62888        port_help    $MISSING_DEPENDENCY ;;
62889      pkgutil)
62890        pkgutil_help $MISSING_DEPENDENCY ;;
62891      pkgadd)
62892        pkgadd_help  $MISSING_DEPENDENCY ;;
62893    esac
62894
62895    if test "x$PKGHANDLER_COMMAND" != x; then
62896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62897    fi
62898  fi
62899
62900        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62901      fi
62902    fi # end user specified settings
62903
62904    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62905    if test "x$FREETYPE_CFLAGS" = x; then
62906
62907  # Only process if variable expands to non-empty
62908
62909  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62911
62912  # Input might be given as Windows format, start by converting to
62913  # unix format.
62914  path="$FREETYPE_INCLUDE_PATH"
62915  new_path=`$CYGPATH -u "$path"`
62916
62917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62920  # "foo.exe" is OK but "foo" is an error.
62921  #
62922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62923  # It is also a way to make sure we got the proper file name for the real test later on.
62924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62925  if test "x$test_shortpath" = x; then
62926    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62927$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62928    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62929  fi
62930
62931  # Call helper function which possibly converts this using DOS-style short mode.
62932  # If so, the updated path is stored in $new_path.
62933
62934  input_path="$new_path"
62935  # Check if we need to convert this using DOS-style short mode. If the path
62936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62937  # take no chances and rewrite it.
62938  # Note: m4 eats our [], so we need to use [ and ] instead.
62939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62940  if test "x$has_forbidden_chars" != x; then
62941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62942    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62943    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62944    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62945      # Going to short mode and back again did indeed matter. Since short mode is
62946      # case insensitive, let's make it lowercase to improve readability.
62947      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62948      # Now convert it back to Unix-style (cygpath)
62949      input_path=`$CYGPATH -u "$shortmode_path"`
62950      new_path="$input_path"
62951    fi
62952  fi
62953
62954  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62955  if test "x$test_cygdrive_prefix" = x; then
62956    # As a simple fix, exclude /usr/bin since it's not a real path.
62957    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62958      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62959      # a path prefixed by /cygdrive for fixpath to work.
62960      new_path="$CYGWIN_ROOT_PATH$input_path"
62961    fi
62962  fi
62963
62964
62965  if test "x$path" != "x$new_path"; then
62966    FREETYPE_INCLUDE_PATH="$new_path"
62967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62968$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62969  fi
62970
62971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62972
62973  path="$FREETYPE_INCLUDE_PATH"
62974  has_colon=`$ECHO $path | $GREP ^.:`
62975  new_path="$path"
62976  if test "x$has_colon" = x; then
62977    # Not in mixed or Windows style, start by that.
62978    new_path=`cmd //c echo $path`
62979  fi
62980
62981
62982  input_path="$new_path"
62983  # Check if we need to convert this using DOS-style short mode. If the path
62984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62985  # take no chances and rewrite it.
62986  # Note: m4 eats our [], so we need to use [ and ] instead.
62987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62988  if test "x$has_forbidden_chars" != x; then
62989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62991  fi
62992
62993
62994  windows_path="$new_path"
62995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62996    unix_path=`$CYGPATH -u "$windows_path"`
62997    new_path="$unix_path"
62998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63000    new_path="$unix_path"
63001  fi
63002
63003  if test "x$path" != "x$new_path"; then
63004    FREETYPE_INCLUDE_PATH="$new_path"
63005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63006$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63007  fi
63008
63009  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63010  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63011
63012    else
63013      # We're on a unix platform. Hooray! :)
63014      path="$FREETYPE_INCLUDE_PATH"
63015      has_space=`$ECHO "$path" | $GREP " "`
63016      if test "x$has_space" != x; then
63017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63018$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63019        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63020      fi
63021
63022      # Use eval to expand a potential ~
63023      eval path="$path"
63024      if test ! -f "$path" && test ! -d "$path"; then
63025        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63026      fi
63027
63028      if test -d "$path"; then
63029        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63030      else
63031        dir="`$DIRNAME "$path"`"
63032        base="`$BASENAME "$path"`"
63033        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63034      fi
63035    fi
63036  fi
63037
63038      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63039        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63040      else
63041        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63042      fi
63043    fi
63044
63045    if test "x$FREETYPE_LIBS" = x; then
63046
63047  # Only process if variable expands to non-empty
63048
63049  if test "x$FREETYPE_LIB_PATH" != x; then
63050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63051
63052  # Input might be given as Windows format, start by converting to
63053  # unix format.
63054  path="$FREETYPE_LIB_PATH"
63055  new_path=`$CYGPATH -u "$path"`
63056
63057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63060  # "foo.exe" is OK but "foo" is an error.
63061  #
63062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63063  # It is also a way to make sure we got the proper file name for the real test later on.
63064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63065  if test "x$test_shortpath" = x; then
63066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63067$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63068    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63069  fi
63070
63071  # Call helper function which possibly converts this using DOS-style short mode.
63072  # If so, the updated path is stored in $new_path.
63073
63074  input_path="$new_path"
63075  # Check if we need to convert this using DOS-style short mode. If the path
63076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63077  # take no chances and rewrite it.
63078  # Note: m4 eats our [], so we need to use [ and ] instead.
63079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63080  if test "x$has_forbidden_chars" != x; then
63081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63085      # Going to short mode and back again did indeed matter. Since short mode is
63086      # case insensitive, let's make it lowercase to improve readability.
63087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63088      # Now convert it back to Unix-style (cygpath)
63089      input_path=`$CYGPATH -u "$shortmode_path"`
63090      new_path="$input_path"
63091    fi
63092  fi
63093
63094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63095  if test "x$test_cygdrive_prefix" = x; then
63096    # As a simple fix, exclude /usr/bin since it's not a real path.
63097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63099      # a path prefixed by /cygdrive for fixpath to work.
63100      new_path="$CYGWIN_ROOT_PATH$input_path"
63101    fi
63102  fi
63103
63104
63105  if test "x$path" != "x$new_path"; then
63106    FREETYPE_LIB_PATH="$new_path"
63107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63108$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63109  fi
63110
63111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63112
63113  path="$FREETYPE_LIB_PATH"
63114  has_colon=`$ECHO $path | $GREP ^.:`
63115  new_path="$path"
63116  if test "x$has_colon" = x; then
63117    # Not in mixed or Windows style, start by that.
63118    new_path=`cmd //c echo $path`
63119  fi
63120
63121
63122  input_path="$new_path"
63123  # Check if we need to convert this using DOS-style short mode. If the path
63124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63125  # take no chances and rewrite it.
63126  # Note: m4 eats our [], so we need to use [ and ] instead.
63127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63128  if test "x$has_forbidden_chars" != x; then
63129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63131  fi
63132
63133
63134  windows_path="$new_path"
63135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63136    unix_path=`$CYGPATH -u "$windows_path"`
63137    new_path="$unix_path"
63138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63140    new_path="$unix_path"
63141  fi
63142
63143  if test "x$path" != "x$new_path"; then
63144    FREETYPE_LIB_PATH="$new_path"
63145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63146$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63147  fi
63148
63149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63151
63152    else
63153      # We're on a unix platform. Hooray! :)
63154      path="$FREETYPE_LIB_PATH"
63155      has_space=`$ECHO "$path" | $GREP " "`
63156      if test "x$has_space" != x; then
63157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63158$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63160      fi
63161
63162      # Use eval to expand a potential ~
63163      eval path="$path"
63164      if test ! -f "$path" && test ! -d "$path"; then
63165        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63166      fi
63167
63168      if test -d "$path"; then
63169        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63170      else
63171        dir="`$DIRNAME "$path"`"
63172        base="`$BASENAME "$path"`"
63173        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63174      fi
63175    fi
63176  fi
63177
63178      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63179        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63180      else
63181        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63182      fi
63183    fi
63184
63185    # Try to compile it
63186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63187$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63188    ac_ext=cpp
63189ac_cpp='$CXXCPP $CPPFLAGS'
63190ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63191ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63192ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63193
63194    PREV_CXXCFLAGS="$CXXFLAGS"
63195    PREV_LIBS="$LIBS"
63196    PREV_CXX="$CXX"
63197    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63198    LIBS="$LIBS $FREETYPE_LIBS"
63199    CXX="$FIXPATH $CXX"
63200    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63201/* end confdefs.h.  */
63202
63203          #include<ft2build.h>
63204          #include FT_FREETYPE_H
63205          int main () {
63206            FT_Init_FreeType(NULL);
63207            return 0;
63208          }
63209
63210_ACEOF
63211if ac_fn_cxx_try_link "$LINENO"; then :
63212
63213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63214$as_echo "yes" >&6; }
63215
63216else
63217
63218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63219$as_echo "no" >&6; }
63220          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63221$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63222          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63223$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63224
63225
63226  # Print a helpful message on how to acquire the necessary build dependency.
63227  # freetype is the help tag: freetype, cups, alsa etc
63228  MISSING_DEPENDENCY=freetype
63229
63230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63231    cygwin_help $MISSING_DEPENDENCY
63232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63233    msys_help $MISSING_DEPENDENCY
63234  else
63235    PKGHANDLER_COMMAND=
63236
63237    case $PKGHANDLER in
63238      apt-get)
63239        apt_help     $MISSING_DEPENDENCY ;;
63240      yum)
63241        yum_help     $MISSING_DEPENDENCY ;;
63242      brew)
63243        brew_help    $MISSING_DEPENDENCY ;;
63244      port)
63245        port_help    $MISSING_DEPENDENCY ;;
63246      pkgutil)
63247        pkgutil_help $MISSING_DEPENDENCY ;;
63248      pkgadd)
63249        pkgadd_help  $MISSING_DEPENDENCY ;;
63250    esac
63251
63252    if test "x$PKGHANDLER_COMMAND" != x; then
63253      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63254    fi
63255  fi
63256
63257
63258          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63259
63260
63261fi
63262rm -f core conftest.err conftest.$ac_objext \
63263    conftest$ac_exeext conftest.$ac_ext
63264    CXXCFLAGS="$PREV_CXXFLAGS"
63265    LIBS="$PREV_LIBS"
63266    CXX="$PREV_CXX"
63267    ac_ext=cpp
63268ac_cpp='$CXXCPP $CPPFLAGS'
63269ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63270ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63271ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63272
63273
63274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63275$as_echo_n "checking if we should bundle freetype... " >&6; }
63276    if test "x$BUNDLE_FREETYPE" = xyes; then
63277      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63278    fi
63279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63280$as_echo "$BUNDLE_FREETYPE" >&6; }
63281
63282  fi # end freetype needed
63283
63284
63285
63286
63287
63288
63289
63290# Check whether --with-alsa was given.
63291if test "${with_alsa+set}" = set; then :
63292  withval=$with_alsa;
63293fi
63294
63295
63296# Check whether --with-alsa-include was given.
63297if test "${with_alsa_include+set}" = set; then :
63298  withval=$with_alsa_include;
63299fi
63300
63301
63302# Check whether --with-alsa-lib was given.
63303if test "${with_alsa_lib+set}" = set; then :
63304  withval=$with_alsa_lib;
63305fi
63306
63307
63308  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63309    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63310        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63311        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63312      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63313$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63314    fi
63315    ALSA_CFLAGS=
63316    ALSA_LIBS=
63317  else
63318    ALSA_FOUND=no
63319
63320    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63321      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63322    fi
63323
63324    if test "x${with_alsa}" != x; then
63325      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63326      ALSA_CFLAGS="-I${with_alsa}/include"
63327      ALSA_FOUND=yes
63328    fi
63329    if test "x${with_alsa_include}" != x; then
63330      ALSA_CFLAGS="-I${with_alsa_include}"
63331      ALSA_FOUND=yes
63332    fi
63333    if test "x${with_alsa_lib}" != x; then
63334      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63335      ALSA_FOUND=yes
63336    fi
63337    # Do not try pkg-config if we have a sysroot set.
63338    if test "x$SYSROOT" = x; then
63339      if test "x$ALSA_FOUND" = xno; then
63340
63341pkg_failed=no
63342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63343$as_echo_n "checking for ALSA... " >&6; }
63344
63345if test -n "$ALSA_CFLAGS"; then
63346    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63347 elif test -n "$PKG_CONFIG"; then
63348    if test -n "$PKG_CONFIG" && \
63349    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63350  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63351  ac_status=$?
63352  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63353  test $ac_status = 0; }; then
63354  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63355else
63356  pkg_failed=yes
63357fi
63358 else
63359    pkg_failed=untried
63360fi
63361if test -n "$ALSA_LIBS"; then
63362    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63363 elif test -n "$PKG_CONFIG"; then
63364    if test -n "$PKG_CONFIG" && \
63365    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63366  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63367  ac_status=$?
63368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63369  test $ac_status = 0; }; then
63370  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63371else
63372  pkg_failed=yes
63373fi
63374 else
63375    pkg_failed=untried
63376fi
63377
63378
63379
63380if test $pkg_failed = yes; then
63381
63382if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63383        _pkg_short_errors_supported=yes
63384else
63385        _pkg_short_errors_supported=no
63386fi
63387        if test $_pkg_short_errors_supported = yes; then
63388	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63389        else
63390	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63391        fi
63392	# Put the nasty error message in config.log where it belongs
63393	echo "$ALSA_PKG_ERRORS" >&5
63394
63395	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63396$as_echo "no" >&6; }
63397                ALSA_FOUND=no
63398elif test $pkg_failed = untried; then
63399	ALSA_FOUND=no
63400else
63401	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63402	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63404$as_echo "yes" >&6; }
63405	ALSA_FOUND=yes
63406fi
63407      fi
63408    fi
63409    if test "x$ALSA_FOUND" = xno; then
63410      for ac_header in alsa/asoundlib.h
63411do :
63412  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63413if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63414  cat >>confdefs.h <<_ACEOF
63415#define HAVE_ALSA_ASOUNDLIB_H 1
63416_ACEOF
63417
63418            ALSA_FOUND=yes
63419            ALSA_CFLAGS=-Iignoreme
63420            ALSA_LIBS=-lasound
63421            DEFAULT_ALSA=yes
63422
63423else
63424  ALSA_FOUND=no
63425
63426fi
63427
63428done
63429
63430    fi
63431    if test "x$ALSA_FOUND" = xno; then
63432
63433  # Print a helpful message on how to acquire the necessary build dependency.
63434  # alsa is the help tag: freetype, cups, alsa etc
63435  MISSING_DEPENDENCY=alsa
63436
63437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63438    cygwin_help $MISSING_DEPENDENCY
63439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63440    msys_help $MISSING_DEPENDENCY
63441  else
63442    PKGHANDLER_COMMAND=
63443
63444    case $PKGHANDLER in
63445      apt-get)
63446        apt_help     $MISSING_DEPENDENCY ;;
63447      yum)
63448        yum_help     $MISSING_DEPENDENCY ;;
63449      brew)
63450        brew_help    $MISSING_DEPENDENCY ;;
63451      port)
63452        port_help    $MISSING_DEPENDENCY ;;
63453      pkgutil)
63454        pkgutil_help $MISSING_DEPENDENCY ;;
63455      pkgadd)
63456        pkgadd_help  $MISSING_DEPENDENCY ;;
63457    esac
63458
63459    if test "x$PKGHANDLER_COMMAND" != x; then
63460      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63461    fi
63462  fi
63463
63464      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63465    fi
63466  fi
63467
63468
63469
63470
63471
63472
63473# Check whether --with-libffi was given.
63474if test "${with_libffi+set}" = set; then :
63475  withval=$with_libffi;
63476fi
63477
63478
63479# Check whether --with-libffi-include was given.
63480if test "${with_libffi_include+set}" = set; then :
63481  withval=$with_libffi_include;
63482fi
63483
63484
63485# Check whether --with-libffi-lib was given.
63486if test "${with_libffi_lib+set}" = set; then :
63487  withval=$with_libffi_lib;
63488fi
63489
63490  # Check whether --enable-libffi-bundling was given.
63491if test "${enable_libffi_bundling+set}" = set; then :
63492  enableval=$enable_libffi_bundling;
63493fi
63494
63495
63496  if test "x$NEEDS_LIB_FFI" = xfalse; then
63497    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63498        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63499        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63500      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63501$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63502    fi
63503    LIBFFI_CFLAGS=
63504    LIBFFI_LIBS=
63505  else
63506    LIBFFI_FOUND=no
63507
63508    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63509      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63510    fi
63511
63512    if test "x${with_libffi}" != x; then
63513      LIBFFI_LIB_PATH="${with_libffi}/lib"
63514      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63515      LIBFFI_CFLAGS="-I${with_libffi}/include"
63516      LIBFFI_FOUND=yes
63517    fi
63518    if test "x${with_libffi_include}" != x; then
63519      LIBFFI_CFLAGS="-I${with_libffi_include}"
63520      LIBFFI_FOUND=yes
63521    fi
63522    if test "x${with_libffi_lib}" != x; then
63523      LIBFFI_LIB_PATH="${with_libffi_lib}"
63524      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63525      LIBFFI_FOUND=yes
63526    fi
63527    # Do not try pkg-config if we have a sysroot set.
63528    if test "x$SYSROOT" = x; then
63529      if test "x$LIBFFI_FOUND" = xno; then
63530        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63531
63532pkg_failed=no
63533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63534$as_echo_n "checking for LIBFFI... " >&6; }
63535
63536if test -n "$LIBFFI_CFLAGS"; then
63537    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63538 elif test -n "$PKG_CONFIG"; then
63539    if test -n "$PKG_CONFIG" && \
63540    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63541  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63542  ac_status=$?
63543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63544  test $ac_status = 0; }; then
63545  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63546else
63547  pkg_failed=yes
63548fi
63549 else
63550    pkg_failed=untried
63551fi
63552if test -n "$LIBFFI_LIBS"; then
63553    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63554 elif test -n "$PKG_CONFIG"; then
63555    if test -n "$PKG_CONFIG" && \
63556    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63557  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63558  ac_status=$?
63559  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63560  test $ac_status = 0; }; then
63561  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63562else
63563  pkg_failed=yes
63564fi
63565 else
63566    pkg_failed=untried
63567fi
63568
63569
63570
63571if test $pkg_failed = yes; then
63572
63573if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63574        _pkg_short_errors_supported=yes
63575else
63576        _pkg_short_errors_supported=no
63577fi
63578        if test $_pkg_short_errors_supported = yes; then
63579	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63580        else
63581	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63582        fi
63583	# Put the nasty error message in config.log where it belongs
63584	echo "$LIBFFI_PKG_ERRORS" >&5
63585
63586	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63587$as_echo "no" >&6; }
63588                LIBFFI_FOUND=no
63589elif test $pkg_failed = untried; then
63590	LIBFFI_FOUND=no
63591else
63592	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63593	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63595$as_echo "yes" >&6; }
63596	LIBFFI_FOUND=yes
63597fi
63598      fi
63599    fi
63600    if test "x$LIBFFI_FOUND" = xno; then
63601      for ac_header in ffi.h
63602do :
63603  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63604if test "x$ac_cv_header_ffi_h" = xyes; then :
63605  cat >>confdefs.h <<_ACEOF
63606#define HAVE_FFI_H 1
63607_ACEOF
63608
63609            LIBFFI_FOUND=yes
63610            LIBFFI_CFLAGS=
63611            LIBFFI_LIBS=-lffi
63612
63613else
63614  LIBFFI_FOUND=no
63615
63616fi
63617
63618done
63619
63620    fi
63621    if test "x$LIBFFI_FOUND" = xno; then
63622
63623  # Print a helpful message on how to acquire the necessary build dependency.
63624  # ffi is the help tag: freetype, cups, alsa etc
63625  MISSING_DEPENDENCY=ffi
63626
63627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63628    cygwin_help $MISSING_DEPENDENCY
63629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63630    msys_help $MISSING_DEPENDENCY
63631  else
63632    PKGHANDLER_COMMAND=
63633
63634    case $PKGHANDLER in
63635      apt-get)
63636        apt_help     $MISSING_DEPENDENCY ;;
63637      yum)
63638        yum_help     $MISSING_DEPENDENCY ;;
63639      brew)
63640        brew_help    $MISSING_DEPENDENCY ;;
63641      port)
63642        port_help    $MISSING_DEPENDENCY ;;
63643      pkgutil)
63644        pkgutil_help $MISSING_DEPENDENCY ;;
63645      pkgadd)
63646        pkgadd_help  $MISSING_DEPENDENCY ;;
63647    esac
63648
63649    if test "x$PKGHANDLER_COMMAND" != x; then
63650      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63651    fi
63652  fi
63653
63654      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63655    fi
63656
63657    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63658$as_echo_n "checking if libffi works... " >&6; }
63659    ac_ext=c
63660ac_cpp='$CPP $CPPFLAGS'
63661ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63662ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63663ac_compiler_gnu=$ac_cv_c_compiler_gnu
63664
63665    OLD_CFLAGS="$CFLAGS"
63666    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63667    OLD_LIBS="$LIBS"
63668    LIBS="$LIBS $LIBFFI_LIBS"
63669    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63670/* end confdefs.h.  */
63671#include <ffi.h>
63672int
63673main ()
63674{
63675
63676          ffi_call(NULL, NULL, NULL, NULL);
63677          return 0;
63678
63679  ;
63680  return 0;
63681}
63682_ACEOF
63683if ac_fn_c_try_link "$LINENO"; then :
63684  LIBFFI_WORKS=yes
63685else
63686  LIBFFI_WORKS=no
63687
63688fi
63689rm -f core conftest.err conftest.$ac_objext \
63690    conftest$ac_exeext conftest.$ac_ext
63691    CFLAGS="$OLD_CFLAGS"
63692    LIBS="$OLD_LIBS"
63693    ac_ext=cpp
63694ac_cpp='$CXXCPP $CPPFLAGS'
63695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63698
63699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63700$as_echo "$LIBFFI_WORKS" >&6; }
63701
63702    if test "x$LIBFFI_WORKS" = xno; then
63703
63704  # Print a helpful message on how to acquire the necessary build dependency.
63705  # ffi is the help tag: freetype, cups, alsa etc
63706  MISSING_DEPENDENCY=ffi
63707
63708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63709    cygwin_help $MISSING_DEPENDENCY
63710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63711    msys_help $MISSING_DEPENDENCY
63712  else
63713    PKGHANDLER_COMMAND=
63714
63715    case $PKGHANDLER in
63716      apt-get)
63717        apt_help     $MISSING_DEPENDENCY ;;
63718      yum)
63719        yum_help     $MISSING_DEPENDENCY ;;
63720      brew)
63721        brew_help    $MISSING_DEPENDENCY ;;
63722      port)
63723        port_help    $MISSING_DEPENDENCY ;;
63724      pkgutil)
63725        pkgutil_help $MISSING_DEPENDENCY ;;
63726      pkgadd)
63727        pkgadd_help  $MISSING_DEPENDENCY ;;
63728    esac
63729
63730    if test "x$PKGHANDLER_COMMAND" != x; then
63731      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63732    fi
63733  fi
63734
63735      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63736    fi
63737
63738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63739$as_echo_n "checking if libffi should be bundled... " >&6; }
63740    if test "x$enable_libffi_bundling" = "x"; then
63741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63742$as_echo "no" >&6; }
63743      ENABLE_LIBFFI_BUNDLING=false
63744    elif  test "x$enable_libffi_bundling" = "xno"; then
63745      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63746$as_echo "no, forced" >&6; }
63747      ENABLE_LIBFFI_BUNDLING=false
63748    elif  test "x$enable_libffi_bundling" = "xyes"; then
63749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63750$as_echo "yes, forced" >&6; }
63751      ENABLE_LIBFFI_BUNDLING=true
63752    else
63753      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63754    fi
63755
63756    # Find the libffi.so.X to bundle
63757    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63759$as_echo_n "checking for libffi lib file location... " >&6; }
63760      if test "x${LIBFFI_LIB_PATH}" != x; then
63761        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63762          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63763        else
63764          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63765        fi
63766      else
63767        # If we don't have an explicit path, look in a few obvious places
63768        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63769          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63770            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63771          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63772            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63773          else
63774            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63775          fi
63776        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63777          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63778            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63779          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63780            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63781          else
63782            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63783          fi
63784        else
63785          # Fallback on the default /usr/lib dir
63786          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63787            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63788          else
63789            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63790          fi
63791        fi
63792      fi
63793      # Make sure the wildcard is evaluated
63794      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63796$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63797    fi
63798  fi
63799
63800
63801
63802
63803
63804
63805
63806  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63807    # Extract the first word of "llvm-config", so it can be a program name with args.
63808set dummy llvm-config; ac_word=$2
63809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63810$as_echo_n "checking for $ac_word... " >&6; }
63811if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63812  $as_echo_n "(cached) " >&6
63813else
63814  if test -n "$LLVM_CONFIG"; then
63815  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63816else
63817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63818for as_dir in $PATH
63819do
63820  IFS=$as_save_IFS
63821  test -z "$as_dir" && as_dir=.
63822    for ac_exec_ext in '' $ac_executable_extensions; do
63823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63824    ac_cv_prog_LLVM_CONFIG="llvm-config"
63825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63826    break 2
63827  fi
63828done
63829  done
63830IFS=$as_save_IFS
63831
63832fi
63833fi
63834LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63835if test -n "$LLVM_CONFIG"; then
63836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63837$as_echo "$LLVM_CONFIG" >&6; }
63838else
63839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63840$as_echo "no" >&6; }
63841fi
63842
63843
63844
63845    if test "x$LLVM_CONFIG" != xllvm-config; then
63846      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63847    fi
63848
63849    llvm_components="jit mcjit engine nativecodegen native"
63850    unset LLVM_CFLAGS
63851    for flag in $("$LLVM_CONFIG" --cxxflags); do
63852      if echo "${flag}" | grep -q '^-[ID]'; then
63853        if test "${flag}" != "-D_DEBUG" ; then
63854          if test "${LLVM_CFLAGS}" != "" ; then
63855            LLVM_CFLAGS="${LLVM_CFLAGS} "
63856          fi
63857          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63858        fi
63859      fi
63860    done
63861    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63862    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63863
63864    unset LLVM_LDFLAGS
63865    for flag in $("${LLVM_CONFIG}" --ldflags); do
63866      if echo "${flag}" | grep -q '^-L'; then
63867        if test "${LLVM_LDFLAGS}" != ""; then
63868          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63869        fi
63870        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63871      fi
63872    done
63873
63874    unset LLVM_LIBS
63875    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63876      if echo "${flag}" | grep -q '^-l'; then
63877        if test "${LLVM_LIBS}" != ""; then
63878          LLVM_LIBS="${LLVM_LIBS} "
63879        fi
63880        LLVM_LIBS="${LLVM_LIBS}${flag}"
63881      fi
63882    done
63883
63884    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63885    # always properly detect -ltinfo
63886    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63887
63888
63889
63890
63891  fi
63892
63893
63894
63895# Check whether --with-libjpeg was given.
63896if test "${with_libjpeg+set}" = set; then :
63897  withval=$with_libjpeg;
63898fi
63899
63900
63901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63902$as_echo_n "checking for which libjpeg to use... " >&6; }
63903  # default is bundled
63904  DEFAULT_LIBJPEG=bundled
63905  # if user didn't specify, use DEFAULT_LIBJPEG
63906  if test "x${with_libjpeg}" = "x"; then
63907    with_libjpeg=${DEFAULT_LIBJPEG}
63908  fi
63909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63910$as_echo "${with_libjpeg}" >&6; }
63911
63912  if test "x${with_libjpeg}" = "xbundled"; then
63913    USE_EXTERNAL_LIBJPEG=false
63914  elif test "x${with_libjpeg}" = "xsystem"; then
63915    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63916if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63917
63918else
63919   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63920fi
63921
63922
63923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63924$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63925if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63926  $as_echo_n "(cached) " >&6
63927else
63928  ac_check_lib_save_LIBS=$LIBS
63929LIBS="-ljpeg  $LIBS"
63930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63931/* end confdefs.h.  */
63932
63933/* Override any GCC internal prototype to avoid an error.
63934   Use char because int might match the return type of a GCC
63935   builtin and then its argument prototype would still apply.  */
63936#ifdef __cplusplus
63937extern "C"
63938#endif
63939char jpeg_CreateDecompress ();
63940int
63941main ()
63942{
63943return jpeg_CreateDecompress ();
63944  ;
63945  return 0;
63946}
63947_ACEOF
63948if ac_fn_cxx_try_link "$LINENO"; then :
63949  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63950else
63951  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63952fi
63953rm -f core conftest.err conftest.$ac_objext \
63954    conftest$ac_exeext conftest.$ac_ext
63955LIBS=$ac_check_lib_save_LIBS
63956fi
63957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63958$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63959if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63960  cat >>confdefs.h <<_ACEOF
63961#define HAVE_LIBJPEG 1
63962_ACEOF
63963
63964  LIBS="-ljpeg $LIBS"
63965
63966else
63967   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63968fi
63969
63970
63971    USE_EXTERNAL_LIBJPEG=true
63972  else
63973    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63974  fi
63975
63976
63977
63978
63979
63980# Check whether --with-giflib was given.
63981if test "${with_giflib+set}" = set; then :
63982  withval=$with_giflib;
63983fi
63984
63985
63986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63987$as_echo_n "checking for which giflib to use... " >&6; }
63988  # default is bundled
63989  DEFAULT_GIFLIB=bundled
63990  # if user didn't specify, use DEFAULT_GIFLIB
63991  if test "x${with_giflib}" = "x"; then
63992    with_giflib=${DEFAULT_GIFLIB}
63993  fi
63994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63995$as_echo "${with_giflib}" >&6; }
63996
63997  if test "x${with_giflib}" = "xbundled"; then
63998    USE_EXTERNAL_LIBGIF=false
63999  elif test "x${with_giflib}" = "xsystem"; then
64000    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64001if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64002
64003else
64004   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64005fi
64006
64007
64008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64009$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64010if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64011  $as_echo_n "(cached) " >&6
64012else
64013  ac_check_lib_save_LIBS=$LIBS
64014LIBS="-lgif  $LIBS"
64015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64016/* end confdefs.h.  */
64017
64018/* Override any GCC internal prototype to avoid an error.
64019   Use char because int might match the return type of a GCC
64020   builtin and then its argument prototype would still apply.  */
64021#ifdef __cplusplus
64022extern "C"
64023#endif
64024char DGifGetCode ();
64025int
64026main ()
64027{
64028return DGifGetCode ();
64029  ;
64030  return 0;
64031}
64032_ACEOF
64033if ac_fn_cxx_try_link "$LINENO"; then :
64034  ac_cv_lib_gif_DGifGetCode=yes
64035else
64036  ac_cv_lib_gif_DGifGetCode=no
64037fi
64038rm -f core conftest.err conftest.$ac_objext \
64039    conftest$ac_exeext conftest.$ac_ext
64040LIBS=$ac_check_lib_save_LIBS
64041fi
64042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64043$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64044if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64045  cat >>confdefs.h <<_ACEOF
64046#define HAVE_LIBGIF 1
64047_ACEOF
64048
64049  LIBS="-lgif $LIBS"
64050
64051else
64052   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64053fi
64054
64055
64056    USE_EXTERNAL_LIBGIF=true
64057  else
64058    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64059  fi
64060
64061
64062
64063
64064
64065# Check whether --with-libpng was given.
64066if test "${with_libpng+set}" = set; then :
64067  withval=$with_libpng;
64068fi
64069
64070
64071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64072$as_echo_n "checking for which libpng to use... " >&6; }
64073
64074  # default is bundled
64075  DEFAULT_LIBPNG=bundled
64076  # if user didn't specify, use DEFAULT_LIBPNG
64077  if test "x${with_libpng}" = "x"; then
64078    with_libpng=${DEFAULT_LIBPNG}
64079  fi
64080
64081  if test "x${with_libpng}" = "xbundled"; then
64082    USE_EXTERNAL_LIBPNG=false
64083    PNG_CFLAGS=""
64084    PNG_LIBS=""
64085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64086$as_echo "bundled" >&6; }
64087  elif test "x${with_libpng}" = "xsystem"; then
64088
64089pkg_failed=no
64090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64091$as_echo_n "checking for PNG... " >&6; }
64092
64093if test -n "$PNG_CFLAGS"; then
64094    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64095 elif test -n "$PKG_CONFIG"; then
64096    if test -n "$PKG_CONFIG" && \
64097    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64098  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64099  ac_status=$?
64100  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64101  test $ac_status = 0; }; then
64102  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64103else
64104  pkg_failed=yes
64105fi
64106 else
64107    pkg_failed=untried
64108fi
64109if test -n "$PNG_LIBS"; then
64110    pkg_cv_PNG_LIBS="$PNG_LIBS"
64111 elif test -n "$PKG_CONFIG"; then
64112    if test -n "$PKG_CONFIG" && \
64113    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64114  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64115  ac_status=$?
64116  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64117  test $ac_status = 0; }; then
64118  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64119else
64120  pkg_failed=yes
64121fi
64122 else
64123    pkg_failed=untried
64124fi
64125
64126
64127
64128if test $pkg_failed = yes; then
64129
64130if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64131        _pkg_short_errors_supported=yes
64132else
64133        _pkg_short_errors_supported=no
64134fi
64135        if test $_pkg_short_errors_supported = yes; then
64136	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64137        else
64138	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64139        fi
64140	# Put the nasty error message in config.log where it belongs
64141	echo "$PNG_PKG_ERRORS" >&5
64142
64143	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64144$as_echo "no" >&6; }
64145                LIBPNG_FOUND=no
64146elif test $pkg_failed = untried; then
64147	LIBPNG_FOUND=no
64148else
64149	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64150	PNG_LIBS=$pkg_cv_PNG_LIBS
64151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64152$as_echo "yes" >&6; }
64153	LIBPNG_FOUND=yes
64154fi
64155    if test "x${LIBPNG_FOUND}" = "xyes"; then
64156      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64157      USE_EXTERNAL_LIBPNG=true
64158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64159$as_echo "system" >&6; }
64160    else
64161      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64162$as_echo "system not found" >&6; }
64163      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64164    fi
64165  else
64166    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64167  fi
64168
64169
64170
64171
64172
64173
64174
64175# Check whether --with-zlib was given.
64176if test "${with_zlib+set}" = set; then :
64177  withval=$with_zlib;
64178fi
64179
64180
64181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64182$as_echo_n "checking for compress in -lz... " >&6; }
64183if ${ac_cv_lib_z_compress+:} false; then :
64184  $as_echo_n "(cached) " >&6
64185else
64186  ac_check_lib_save_LIBS=$LIBS
64187LIBS="-lz  $LIBS"
64188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64189/* end confdefs.h.  */
64190
64191/* Override any GCC internal prototype to avoid an error.
64192   Use char because int might match the return type of a GCC
64193   builtin and then its argument prototype would still apply.  */
64194#ifdef __cplusplus
64195extern "C"
64196#endif
64197char compress ();
64198int
64199main ()
64200{
64201return compress ();
64202  ;
64203  return 0;
64204}
64205_ACEOF
64206if ac_fn_cxx_try_link "$LINENO"; then :
64207  ac_cv_lib_z_compress=yes
64208else
64209  ac_cv_lib_z_compress=no
64210fi
64211rm -f core conftest.err conftest.$ac_objext \
64212    conftest$ac_exeext conftest.$ac_ext
64213LIBS=$ac_check_lib_save_LIBS
64214fi
64215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64216$as_echo "$ac_cv_lib_z_compress" >&6; }
64217if test "x$ac_cv_lib_z_compress" = xyes; then :
64218   ZLIB_FOUND=yes
64219else
64220   ZLIB_FOUND=no
64221fi
64222
64223
64224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64225$as_echo_n "checking for which zlib to use... " >&6; }
64226
64227  DEFAULT_ZLIB=system
64228  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64229    # On windows default is bundled...on others default is system
64230    DEFAULT_ZLIB=bundled
64231  fi
64232
64233  if test "x${ZLIB_FOUND}" != "xyes"; then
64234    # If we don't find any system...set default to bundled
64235    DEFAULT_ZLIB=bundled
64236  fi
64237
64238  # If user didn't specify, use DEFAULT_ZLIB
64239  if test "x${with_zlib}" = "x"; then
64240    with_zlib=${DEFAULT_ZLIB}
64241  fi
64242
64243  if test "x${with_zlib}" = "xbundled"; then
64244    USE_EXTERNAL_LIBZ=false
64245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64246$as_echo "bundled" >&6; }
64247  elif test "x${with_zlib}" = "xsystem"; then
64248    if test "x${ZLIB_FOUND}" = "xyes"; then
64249      USE_EXTERNAL_LIBZ=true
64250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64251$as_echo "system" >&6; }
64252    else
64253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64254$as_echo "system not found" >&6; }
64255      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64256    fi
64257  else
64258    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64259  fi
64260
64261
64262
64263
64264
64265# Check whether --with-lcms was given.
64266if test "${with_lcms+set}" = set; then :
64267  withval=$with_lcms;
64268fi
64269
64270
64271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64272$as_echo_n "checking for which lcms to use... " >&6; }
64273
64274  DEFAULT_LCMS=bundled
64275  # If user didn't specify, use DEFAULT_LCMS
64276  if test "x${with_lcms}" = "x"; then
64277    with_lcms=${DEFAULT_LCMS}
64278  fi
64279
64280  if test "x${with_lcms}" = "xbundled"; then
64281    USE_EXTERNAL_LCMS=false
64282    LCMS_CFLAGS=""
64283    LCMS_LIBS=""
64284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64285$as_echo "bundled" >&6; }
64286  elif test "x${with_lcms}" = "xsystem"; then
64287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64288$as_echo "system" >&6; }
64289
64290pkg_failed=no
64291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64292$as_echo_n "checking for LCMS... " >&6; }
64293
64294if test -n "$LCMS_CFLAGS"; then
64295    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64296 elif test -n "$PKG_CONFIG"; then
64297    if test -n "$PKG_CONFIG" && \
64298    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64299  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64300  ac_status=$?
64301  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64302  test $ac_status = 0; }; then
64303  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64304else
64305  pkg_failed=yes
64306fi
64307 else
64308    pkg_failed=untried
64309fi
64310if test -n "$LCMS_LIBS"; then
64311    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64312 elif test -n "$PKG_CONFIG"; then
64313    if test -n "$PKG_CONFIG" && \
64314    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64315  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64316  ac_status=$?
64317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64318  test $ac_status = 0; }; then
64319  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64320else
64321  pkg_failed=yes
64322fi
64323 else
64324    pkg_failed=untried
64325fi
64326
64327
64328
64329if test $pkg_failed = yes; then
64330
64331if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64332        _pkg_short_errors_supported=yes
64333else
64334        _pkg_short_errors_supported=no
64335fi
64336        if test $_pkg_short_errors_supported = yes; then
64337	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64338        else
64339	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64340        fi
64341	# Put the nasty error message in config.log where it belongs
64342	echo "$LCMS_PKG_ERRORS" >&5
64343
64344	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64345$as_echo "no" >&6; }
64346                LCMS_FOUND=no
64347elif test $pkg_failed = untried; then
64348	LCMS_FOUND=no
64349else
64350	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64351	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64353$as_echo "yes" >&6; }
64354	LCMS_FOUND=yes
64355fi
64356    if test "x${LCMS_FOUND}" = "xyes"; then
64357      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64358      USE_EXTERNAL_LCMS=true
64359    else
64360      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64361    fi
64362  else
64363    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64364  fi
64365
64366
64367
64368
64369
64370
64371
64372
64373
64374
64375
64376
64377
64378  # Setup libm (the maths library)
64379  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64381$as_echo_n "checking for cos in -lm... " >&6; }
64382if ${ac_cv_lib_m_cos+:} false; then :
64383  $as_echo_n "(cached) " >&6
64384else
64385  ac_check_lib_save_LIBS=$LIBS
64386LIBS="-lm  $LIBS"
64387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64388/* end confdefs.h.  */
64389
64390/* Override any GCC internal prototype to avoid an error.
64391   Use char because int might match the return type of a GCC
64392   builtin and then its argument prototype would still apply.  */
64393#ifdef __cplusplus
64394extern "C"
64395#endif
64396char cos ();
64397int
64398main ()
64399{
64400return cos ();
64401  ;
64402  return 0;
64403}
64404_ACEOF
64405if ac_fn_cxx_try_link "$LINENO"; then :
64406  ac_cv_lib_m_cos=yes
64407else
64408  ac_cv_lib_m_cos=no
64409fi
64410rm -f core conftest.err conftest.$ac_objext \
64411    conftest$ac_exeext conftest.$ac_ext
64412LIBS=$ac_check_lib_save_LIBS
64413fi
64414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64415$as_echo "$ac_cv_lib_m_cos" >&6; }
64416if test "x$ac_cv_lib_m_cos" = xyes; then :
64417  cat >>confdefs.h <<_ACEOF
64418#define HAVE_LIBM 1
64419_ACEOF
64420
64421  LIBS="-lm $LIBS"
64422
64423else
64424
64425        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64426$as_echo "$as_me: Maths library was not found" >&6;}
64427
64428fi
64429
64430    LIBM="-lm"
64431  else
64432    LIBM=""
64433  fi
64434
64435
64436  # Setup libdl (for dynamic library loading)
64437  save_LIBS="$LIBS"
64438  LIBS=""
64439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64440$as_echo_n "checking for dlopen in -ldl... " >&6; }
64441if ${ac_cv_lib_dl_dlopen+:} false; then :
64442  $as_echo_n "(cached) " >&6
64443else
64444  ac_check_lib_save_LIBS=$LIBS
64445LIBS="-ldl  $LIBS"
64446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64447/* end confdefs.h.  */
64448
64449/* Override any GCC internal prototype to avoid an error.
64450   Use char because int might match the return type of a GCC
64451   builtin and then its argument prototype would still apply.  */
64452#ifdef __cplusplus
64453extern "C"
64454#endif
64455char dlopen ();
64456int
64457main ()
64458{
64459return dlopen ();
64460  ;
64461  return 0;
64462}
64463_ACEOF
64464if ac_fn_cxx_try_link "$LINENO"; then :
64465  ac_cv_lib_dl_dlopen=yes
64466else
64467  ac_cv_lib_dl_dlopen=no
64468fi
64469rm -f core conftest.err conftest.$ac_objext \
64470    conftest$ac_exeext conftest.$ac_ext
64471LIBS=$ac_check_lib_save_LIBS
64472fi
64473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64474$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64475if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64476  cat >>confdefs.h <<_ACEOF
64477#define HAVE_LIBDL 1
64478_ACEOF
64479
64480  LIBS="-ldl $LIBS"
64481
64482fi
64483
64484  LIBDL="$LIBS"
64485
64486  LIBS="$save_LIBS"
64487
64488  # Deprecated libraries, keep the flags for backwards compatibility
64489  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64490
64491
64492# Check whether --with-dxsdk was given.
64493if test "${with_dxsdk+set}" = set; then :
64494  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64495$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64496fi
64497
64498
64499
64500
64501# Check whether --with-dxsdk-lib was given.
64502if test "${with_dxsdk_lib+set}" = set; then :
64503  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64504$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64505fi
64506
64507
64508
64509
64510# Check whether --with-dxsdk-include was given.
64511if test "${with_dxsdk_include+set}" = set; then :
64512  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64513$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64514fi
64515
64516
64517  fi
64518
64519  # Control if libzip can use mmap. Available for purposes of overriding.
64520  LIBZIP_CAN_USE_MMAP=true
64521
64522
64523
64524  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64525    # Find the root of the Solaris Studio installation from the compiler path
64526    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64527    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64529$as_echo_n "checking for libstlport.so.1... " >&6; }
64530    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64531      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64532      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64533    fi
64534    if test -f "$STLPORT_LIB"; then
64535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64536$as_echo "yes, $STLPORT_LIB" >&6; }
64537
64538  # Only process if variable expands to non-empty
64539
64540  if test "x$STLPORT_LIB" != x; then
64541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64542
64543  # Input might be given as Windows format, start by converting to
64544  # unix format.
64545  path="$STLPORT_LIB"
64546  new_path=`$CYGPATH -u "$path"`
64547
64548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64551  # "foo.exe" is OK but "foo" is an error.
64552  #
64553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64554  # It is also a way to make sure we got the proper file name for the real test later on.
64555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64556  if test "x$test_shortpath" = x; then
64557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64558$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64559    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64560  fi
64561
64562  # Call helper function which possibly converts this using DOS-style short mode.
64563  # If so, the updated path is stored in $new_path.
64564
64565  input_path="$new_path"
64566  # Check if we need to convert this using DOS-style short mode. If the path
64567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64568  # take no chances and rewrite it.
64569  # Note: m4 eats our [], so we need to use [ and ] instead.
64570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64571  if test "x$has_forbidden_chars" != x; then
64572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64576      # Going to short mode and back again did indeed matter. Since short mode is
64577      # case insensitive, let's make it lowercase to improve readability.
64578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64579      # Now convert it back to Unix-style (cygpath)
64580      input_path=`$CYGPATH -u "$shortmode_path"`
64581      new_path="$input_path"
64582    fi
64583  fi
64584
64585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64586  if test "x$test_cygdrive_prefix" = x; then
64587    # As a simple fix, exclude /usr/bin since it's not a real path.
64588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64590      # a path prefixed by /cygdrive for fixpath to work.
64591      new_path="$CYGWIN_ROOT_PATH$input_path"
64592    fi
64593  fi
64594
64595
64596  if test "x$path" != "x$new_path"; then
64597    STLPORT_LIB="$new_path"
64598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64599$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64600  fi
64601
64602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64603
64604  path="$STLPORT_LIB"
64605  has_colon=`$ECHO $path | $GREP ^.:`
64606  new_path="$path"
64607  if test "x$has_colon" = x; then
64608    # Not in mixed or Windows style, start by that.
64609    new_path=`cmd //c echo $path`
64610  fi
64611
64612
64613  input_path="$new_path"
64614  # Check if we need to convert this using DOS-style short mode. If the path
64615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64616  # take no chances and rewrite it.
64617  # Note: m4 eats our [], so we need to use [ and ] instead.
64618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64619  if test "x$has_forbidden_chars" != x; then
64620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64622  fi
64623
64624
64625  windows_path="$new_path"
64626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64627    unix_path=`$CYGPATH -u "$windows_path"`
64628    new_path="$unix_path"
64629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64631    new_path="$unix_path"
64632  fi
64633
64634  if test "x$path" != "x$new_path"; then
64635    STLPORT_LIB="$new_path"
64636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64637$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64638  fi
64639
64640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64642
64643    else
64644      # We're on a unix platform. Hooray! :)
64645      path="$STLPORT_LIB"
64646      has_space=`$ECHO "$path" | $GREP " "`
64647      if test "x$has_space" != x; then
64648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64649$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64651      fi
64652
64653      # Use eval to expand a potential ~
64654      eval path="$path"
64655      if test ! -f "$path" && test ! -d "$path"; then
64656        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64657      fi
64658
64659      if test -d "$path"; then
64660        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64661      else
64662        dir="`$DIRNAME "$path"`"
64663        base="`$BASENAME "$path"`"
64664        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64665      fi
64666    fi
64667  fi
64668
64669    else
64670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64671$as_echo "no, not found at $STLPORT_LIB" >&6; }
64672      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64673    fi
64674
64675  fi
64676
64677
64678
64679# Check whether --with-libelf was given.
64680if test "${with_libelf+set}" = set; then :
64681  withval=$with_libelf;
64682fi
64683
64684
64685# Check whether --with-libelf-include was given.
64686if test "${with_libelf_include+set}" = set; then :
64687  withval=$with_libelf_include;
64688fi
64689
64690
64691# Check whether --with-libelf-lib was given.
64692if test "${with_libelf_lib+set}" = set; then :
64693  withval=$with_libelf_lib;
64694fi
64695
64696
64697  if test "x$ENABLE_AOT" = xfalse; then
64698    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64699        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64700        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64701      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64702$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64703    fi
64704    LIBELF_CFLAGS=
64705    LIBELF_LIBS=
64706  else
64707    LIBELF_FOUND=no
64708
64709    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64710      ENABLE_AOT="false"
64711      if test "x${enable_aot}" = xyes; then
64712        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64713      fi
64714    else
64715      if test "x${with_libelf}" != x; then
64716        ELF_LIBS="-L${with_libelf}/lib -lelf"
64717        ELF_CFLAGS="-I${with_libelf}/include"
64718        LIBELF_FOUND=yes
64719      fi
64720      if test "x${with_libelf_include}" != x; then
64721        ELF_CFLAGS="-I${with_libelf_include}"
64722        LIBELF_FOUND=yes
64723      fi
64724      if test "x${with_libelf_lib}" != x; then
64725        ELF_LIBS="-L${with_libelf_lib} -lelf"
64726        LIBELF_FOUND=yes
64727      fi
64728      # Do not try pkg-config if we have a sysroot set.
64729      if test "x$SYSROOT" = x; then
64730        if test "x$LIBELF_FOUND" = xno; then
64731          # Figure out ELF_CFLAGS and ELF_LIBS
64732
64733pkg_failed=no
64734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64735$as_echo_n "checking for ELF... " >&6; }
64736
64737if test -n "$ELF_CFLAGS"; then
64738    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64739 elif test -n "$PKG_CONFIG"; then
64740    if test -n "$PKG_CONFIG" && \
64741    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64742  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64743  ac_status=$?
64744  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64745  test $ac_status = 0; }; then
64746  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64747else
64748  pkg_failed=yes
64749fi
64750 else
64751    pkg_failed=untried
64752fi
64753if test -n "$ELF_LIBS"; then
64754    pkg_cv_ELF_LIBS="$ELF_LIBS"
64755 elif test -n "$PKG_CONFIG"; then
64756    if test -n "$PKG_CONFIG" && \
64757    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64758  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64759  ac_status=$?
64760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64761  test $ac_status = 0; }; then
64762  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64763else
64764  pkg_failed=yes
64765fi
64766 else
64767    pkg_failed=untried
64768fi
64769
64770
64771
64772if test $pkg_failed = yes; then
64773
64774if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64775        _pkg_short_errors_supported=yes
64776else
64777        _pkg_short_errors_supported=no
64778fi
64779        if test $_pkg_short_errors_supported = yes; then
64780	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64781        else
64782	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64783        fi
64784	# Put the nasty error message in config.log where it belongs
64785	echo "$ELF_PKG_ERRORS" >&5
64786
64787	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64788$as_echo "no" >&6; }
64789                LIBELF_FOUND=no
64790elif test $pkg_failed = untried; then
64791	LIBELF_FOUND=no
64792else
64793	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64794	ELF_LIBS=$pkg_cv_ELF_LIBS
64795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64796$as_echo "yes" >&6; }
64797	LIBELF_FOUND=yes
64798fi
64799        fi
64800      fi
64801      if test "x$LIBELF_FOUND" = xno; then
64802        for ac_header in libelf.h
64803do :
64804  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64805if test "x$ac_cv_header_libelf_h" = xyes; then :
64806  cat >>confdefs.h <<_ACEOF
64807#define HAVE_LIBELF_H 1
64808_ACEOF
64809
64810              LIBELF_FOUND=yes
64811              ELF_CFLAGS=
64812              ELF_LIBS=-lelf
64813
64814else
64815  LIBELF_FOUND=no
64816
64817fi
64818
64819done
64820
64821      fi
64822      if test "x$LIBELF_FOUND" = xno; then
64823        ENABLE_AOT="false"
64824
64825  # Print a helpful message on how to acquire the necessary build dependency.
64826  # elf is the help tag: freetype, cups, alsa etc
64827  MISSING_DEPENDENCY=elf
64828
64829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64830    cygwin_help $MISSING_DEPENDENCY
64831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64832    msys_help $MISSING_DEPENDENCY
64833  else
64834    PKGHANDLER_COMMAND=
64835
64836    case $PKGHANDLER in
64837      apt-get)
64838        apt_help     $MISSING_DEPENDENCY ;;
64839      yum)
64840        yum_help     $MISSING_DEPENDENCY ;;
64841      brew)
64842        brew_help    $MISSING_DEPENDENCY ;;
64843      port)
64844        port_help    $MISSING_DEPENDENCY ;;
64845      pkgutil)
64846        pkgutil_help $MISSING_DEPENDENCY ;;
64847      pkgadd)
64848        pkgadd_help  $MISSING_DEPENDENCY ;;
64849    esac
64850
64851    if test "x$PKGHANDLER_COMMAND" != x; then
64852      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64853    fi
64854  fi
64855
64856        if test "x${enable_aot}" = xyes; then
64857          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64858        else
64859          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64860$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64861        fi
64862      else
64863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64864$as_echo_n "checking if libelf works... " >&6; }
64865        ac_ext=c
64866ac_cpp='$CPP $CPPFLAGS'
64867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64869ac_compiler_gnu=$ac_cv_c_compiler_gnu
64870
64871        OLD_CFLAGS="$CFLAGS"
64872        CFLAGS="$CFLAGS $ELF_CFLAGS"
64873        OLD_LIBS="$LIBS"
64874        LIBS="$LIBS $ELF_LIBS"
64875        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64876/* end confdefs.h.  */
64877#include <libelf.h>
64878int
64879main ()
64880{
64881
64882              elf_version(0);
64883              return 0;
64884
64885  ;
64886  return 0;
64887}
64888_ACEOF
64889if ac_fn_c_try_link "$LINENO"; then :
64890  LIBELF_WORKS=yes
64891else
64892  LIBELF_WORKS=no
64893
64894fi
64895rm -f core conftest.err conftest.$ac_objext \
64896    conftest$ac_exeext conftest.$ac_ext
64897        CFLAGS="$OLD_CFLAGS"
64898        LIBS="$OLD_LIBS"
64899        ac_ext=cpp
64900ac_cpp='$CXXCPP $CPPFLAGS'
64901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64904
64905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64906$as_echo "$LIBELF_WORKS" >&6; }
64907
64908        if test "x$LIBELF_WORKS" = xno; then
64909          ENABLE_AOT="false"
64910
64911  # Print a helpful message on how to acquire the necessary build dependency.
64912  # elf is the help tag: freetype, cups, alsa etc
64913  MISSING_DEPENDENCY=elf
64914
64915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64916    cygwin_help $MISSING_DEPENDENCY
64917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64918    msys_help $MISSING_DEPENDENCY
64919  else
64920    PKGHANDLER_COMMAND=
64921
64922    case $PKGHANDLER in
64923      apt-get)
64924        apt_help     $MISSING_DEPENDENCY ;;
64925      yum)
64926        yum_help     $MISSING_DEPENDENCY ;;
64927      brew)
64928        brew_help    $MISSING_DEPENDENCY ;;
64929      port)
64930        port_help    $MISSING_DEPENDENCY ;;
64931      pkgutil)
64932        pkgutil_help $MISSING_DEPENDENCY ;;
64933      pkgadd)
64934        pkgadd_help  $MISSING_DEPENDENCY ;;
64935    esac
64936
64937    if test "x$PKGHANDLER_COMMAND" != x; then
64938      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64939    fi
64940  fi
64941
64942          if test "x$enable_aot" = "xyes"; then
64943            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64944          else
64945            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64946$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64947          fi
64948        fi
64949      fi
64950    fi
64951  fi
64952
64953
64954
64955
64956
64957
64958
64959
64960
64961
64962
64963
64964
64965
64966
64967
64968
64969
64970# Hotspot setup depends on lib checks (AOT needs libelf).
64971
64972
64973  # The user can in some cases supply additional jvm features. For the custom
64974  # variant, this defines the entire variant.
64975
64976# Check whether --with-jvm-features was given.
64977if test "${with_jvm_features+set}" = set; then :
64978  withval=$with_jvm_features;
64979fi
64980
64981  if test "x$with_jvm_features" != x; then
64982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64983$as_echo_n "checking additional JVM features... " >&6; }
64984    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64986$as_echo "$JVM_FEATURES" >&6; }
64987  fi
64988
64989  # Override hotspot cpu definitions for ARM platforms
64990  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64991    HOTSPOT_TARGET_CPU=arm_32
64992    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64993    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64994    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64995  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64996    HOTSPOT_TARGET_CPU=arm_64
64997    HOTSPOT_TARGET_CPU_ARCH=arm
64998    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64999    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65000  fi
65001
65002  # Verify that dependencies are met for explicitly set features.
65003  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65004    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65005  fi
65006
65007  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65008    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65009  fi
65010
65011  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65012    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65013  fi
65014
65015  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65016    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65017  fi
65018
65019  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65020    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65021  fi
65022
65023  # Turn on additional features based on other parts of configure
65024  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65025    JVM_FEATURES="$JVM_FEATURES dtrace"
65026  else
65027    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65028      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65029    fi
65030  fi
65031
65032  if test "x$STATIC_BUILD" = "xtrue"; then
65033    JVM_FEATURES="$JVM_FEATURES static-build"
65034  else
65035    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65036      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65037    fi
65038  fi
65039
65040  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65041    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65042      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65043    fi
65044  fi
65045
65046  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65047    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65048      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65049    fi
65050  fi
65051
65052  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65053  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65054     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65055     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65056    JVM_FEATURES_jvmci="jvmci"
65057  else
65058    JVM_FEATURES_jvmci=""
65059  fi
65060
65061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65062$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65063  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65065$as_echo "yes, forced" >&6; }
65066    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65067      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65068    fi
65069    INCLUDE_GRAAL="true"
65070  else
65071    # By default enable graal build where AOT is available
65072    if test "x$ENABLE_AOT" = "xtrue"; then
65073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65074$as_echo "yes" >&6; }
65075      JVM_FEATURES_graal="graal"
65076      INCLUDE_GRAAL="true"
65077    else
65078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65079$as_echo "no" >&6; }
65080      JVM_FEATURES_graal=""
65081      INCLUDE_GRAAL="false"
65082    fi
65083  fi
65084
65085
65086
65087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65088$as_echo_n "checking if aot should be enabled... " >&6; }
65089  if test "x$ENABLE_AOT" = "xtrue"; then
65090    if test "x$enable_aot" = "xyes"; then
65091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65092$as_echo "yes, forced" >&6; }
65093    else
65094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65095$as_echo "yes" >&6; }
65096    fi
65097    JVM_FEATURES_aot="aot"
65098  else
65099    if test "x$enable_aot" = "xno"; then
65100      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65101$as_echo "no, forced" >&6; }
65102    else
65103      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65104$as_echo "no" >&6; }
65105    fi
65106    JVM_FEATURES_aot=""
65107  fi
65108
65109  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65110    # Default to use link time optimizations on minimal on arm
65111    JVM_FEATURES_link_time_opt="link-time-opt"
65112  else
65113    JVM_FEATURES_link_time_opt=""
65114  fi
65115
65116  # All variants but minimal (and custom) get these features
65117  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65118
65119  # Enable features depending on variant.
65120  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65121  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65122  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65123  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65124  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65125  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65126  JVM_FEATURES_custom="$JVM_FEATURES"
65127
65128
65129
65130
65131
65132
65133
65134
65135
65136  # Used for verification of Makefiles by check-jvm-feature
65137
65138
65139  # We don't support --with-jvm-interpreter anymore, use zero instead.
65140
65141
65142# Check whether --with-jvm-interpreter was given.
65143if test "${with_jvm_interpreter+set}" = set; then :
65144  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65145$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65146fi
65147
65148
65149
65150
65151###############################################################################
65152#
65153# We need to do some final tweaking, when everything else is done.
65154#
65155###############################################################################
65156
65157
65158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65159$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65160
65161  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65162    ENABLE_INTREE_EC=true
65163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65164$as_echo "yes" >&6; }
65165  else
65166    ENABLE_INTREE_EC=false
65167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65168$as_echo "no" >&6; }
65169  fi
65170
65171
65172
65173
65174  # Check whether --enable-jtreg-failure-handler was given.
65175if test "${enable_jtreg_failure_handler+set}" = set; then :
65176  enableval=$enable_jtreg_failure_handler;
65177fi
65178
65179
65180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65181$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65182
65183  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65184    if test "x$JT_HOME" = "x"; then
65185      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65186    else
65187      BUILD_FAILURE_HANDLER=true
65188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65189$as_echo "yes, forced" >&6; }
65190    fi
65191  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65192    BUILD_FAILURE_HANDLER=false
65193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65194$as_echo "no, forced" >&6; }
65195  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65196      || test "x$enable_jtreg_failure_handler" = "x"; then
65197    if test "x$JT_HOME" = "x"; then
65198      BUILD_FAILURE_HANDLER=false
65199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65200$as_echo "no, missing jtreg" >&6; }
65201    else
65202      BUILD_FAILURE_HANDLER=true
65203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65204$as_echo "yes, jtreg present" >&6; }
65205    fi
65206  else
65207    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65208  fi
65209
65210
65211
65212
65213  # Check whether --enable-generate-classlist was given.
65214if test "${enable_generate_classlist+set}" = set; then :
65215  enableval=$enable_generate_classlist;
65216fi
65217
65218
65219  # Check if it's likely that it's possible to generate the classlist. Depending
65220  # on exact jvm configuration it could be possible anyway.
65221  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65222    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65223  else
65224    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65225  fi
65226
65227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65228$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65229  if test "x$enable_generate_classlist" = "xyes"; then
65230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65231$as_echo "yes, forced" >&6; }
65232    ENABLE_GENERATE_CLASSLIST="true"
65233    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65234      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65235$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65236    fi
65237  elif test "x$enable_generate_classlist" = "xno"; then
65238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65239$as_echo "no, forced" >&6; }
65240    ENABLE_GENERATE_CLASSLIST="false"
65241  elif test "x$enable_generate_classlist" = "x"; then
65242    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65244$as_echo "yes" >&6; }
65245      ENABLE_GENERATE_CLASSLIST="true"
65246    else
65247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65248$as_echo "no" >&6; }
65249      ENABLE_GENERATE_CLASSLIST="false"
65250    fi
65251  else
65252    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65253  fi
65254
65255
65256
65257
65258###############################################################################
65259#
65260# Configure parts of the build that only affect the build performance,
65261# not the result.
65262#
65263###############################################################################
65264
65265
65266  # How many cores do we have on this build system?
65267
65268# Check whether --with-num-cores was given.
65269if test "${with_num_cores+set}" = set; then :
65270  withval=$with_num_cores;
65271fi
65272
65273  if test "x$with_num_cores" = x; then
65274    # The number of cores were not specified, try to probe them.
65275
65276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65277$as_echo_n "checking for number of cores... " >&6; }
65278  NUM_CORES=1
65279  FOUND_CORES=no
65280
65281  if test -f /proc/cpuinfo; then
65282    # Looks like a Linux (or cygwin) system
65283    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65284    FOUND_CORES=yes
65285  elif test -x /usr/sbin/psrinfo; then
65286    # Looks like a Solaris system
65287    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65288    FOUND_CORES=yes
65289  elif test -x /usr/sbin/sysctl; then
65290    # Looks like a MacOSX system
65291    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65292    FOUND_CORES=yes
65293  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65294    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65295    FOUND_CORES=yes
65296  elif test -n "$NUMBER_OF_PROCESSORS"; then
65297    # On windows, look in the env
65298    NUM_CORES=$NUMBER_OF_PROCESSORS
65299    FOUND_CORES=yes
65300  fi
65301
65302  if test "x$FOUND_CORES" = xyes; then
65303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65304$as_echo "$NUM_CORES" >&6; }
65305  else
65306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65307$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65308    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65309$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65310  fi
65311
65312  else
65313    NUM_CORES=$with_num_cores
65314  fi
65315
65316
65317
65318  # How much memory do we have on this build system?
65319
65320# Check whether --with-memory-size was given.
65321if test "${with_memory_size+set}" = set; then :
65322  withval=$with_memory_size;
65323fi
65324
65325  if test "x$with_memory_size" = x; then
65326    # The memory size was not specified, try to probe it.
65327
65328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65329$as_echo_n "checking for memory size... " >&6; }
65330  # Default to 1024 MB
65331  MEMORY_SIZE=1024
65332  FOUND_MEM=no
65333
65334  if test -f /proc/meminfo; then
65335    # Looks like a Linux (or cygwin) system
65336    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65337    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65338    FOUND_MEM=yes
65339  elif test -x /usr/sbin/prtconf; then
65340    # Looks like a Solaris or AIX system
65341    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65342    FOUND_MEM=yes
65343  elif test -x /usr/sbin/sysctl; then
65344    # Looks like a MacOSX system
65345    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65346    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65347    FOUND_MEM=yes
65348  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65349    # Windows, but without cygwin
65350    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65351    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65352    FOUND_MEM=yes
65353  fi
65354
65355  if test "x$FOUND_MEM" = xyes; then
65356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65357$as_echo "$MEMORY_SIZE MB" >&6; }
65358  else
65359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65360$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65361    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65362$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65363  fi
65364
65365  else
65366    MEMORY_SIZE=$with_memory_size
65367  fi
65368
65369
65370
65371  # Provide a decent default number of parallel jobs for make depending on
65372  # number of cores, amount of memory and machine architecture.
65373
65374# Check whether --with-jobs was given.
65375if test "${with_jobs+set}" = set; then :
65376  withval=$with_jobs;
65377fi
65378
65379  if test "x$with_jobs" = x; then
65380    # Number of jobs was not specified, calculate.
65381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65382$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65383    # Approximate memory in GB.
65384    memory_gb=`expr $MEMORY_SIZE / 1024`
65385    # Pick the lowest of memory in gb and number of cores.
65386    if test "$memory_gb" -lt "$NUM_CORES"; then
65387      JOBS="$memory_gb"
65388    else
65389      JOBS="$NUM_CORES"
65390    fi
65391    if test "$JOBS" -eq "0"; then
65392      JOBS=1
65393    fi
65394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65395$as_echo "$JOBS" >&6; }
65396  else
65397    JOBS=$with_jobs
65398  fi
65399
65400
65401
65402  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65403
65404# Check whether --with-test-jobs was given.
65405if test "${with_test_jobs+set}" = set; then :
65406  withval=$with_test_jobs;
65407fi
65408
65409  if test "x$with_test_jobs" = x; then
65410      TEST_JOBS=0
65411  else
65412      TEST_JOBS=$with_test_jobs
65413  fi
65414
65415
65416
65417# Setup arguments for the boot jdk (after cores and memory have been setup)
65418
65419  ##############################################################################
65420  #
65421  # Specify jvm options for anything that is run with the Boot JDK.
65422  # Not all JVM:s accept the same arguments on the command line.
65423  #
65424
65425# Check whether --with-boot-jdk-jvmargs was given.
65426if test "${with_boot_jdk_jvmargs+set}" = set; then :
65427  withval=$with_boot_jdk_jvmargs;
65428fi
65429
65430
65431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65432$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65433
65434  # Disable special log output when a debug build is used as Boot JDK...
65435
65436  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65437  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65438  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65439  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65440  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65441  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65442    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65443    JVM_ARG_OK=true
65444  else
65445    $ECHO "Arg failed:" >&5
65446    $ECHO "$OUTPUT" >&5
65447    JVM_ARG_OK=false
65448  fi
65449
65450
65451  # Force en-US environment
65452
65453  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65454  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65455  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65456  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65457  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65458  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65459    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65460    JVM_ARG_OK=true
65461  else
65462    $ECHO "Arg failed:" >&5
65463    $ECHO "$OUTPUT" >&5
65464    JVM_ARG_OK=false
65465  fi
65466
65467
65468  # Apply user provided options.
65469
65470  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65471  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65472  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65473  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65474  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65475  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65476    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65477    JVM_ARG_OK=true
65478  else
65479    $ECHO "Arg failed:" >&5
65480    $ECHO "$OUTPUT" >&5
65481    JVM_ARG_OK=false
65482  fi
65483
65484
65485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65486$as_echo "$boot_jdk_jvmargs" >&6; }
65487
65488  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65489  JAVA_FLAGS=$boot_jdk_jvmargs
65490
65491
65492
65493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65494$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65495
65496  # Starting amount of heap memory.
65497
65498  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65499  $ECHO "Command: $JAVA -Xms64M -version" >&5
65500  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65501  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65502  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65503  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65504    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65505    JVM_ARG_OK=true
65506  else
65507    $ECHO "Arg failed:" >&5
65508    $ECHO "$OUTPUT" >&5
65509    JVM_ARG_OK=false
65510  fi
65511
65512  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65513
65514  # Maximum amount of heap memory and stack size.
65515  JVM_HEAP_LIMIT_32="1024"
65516  # Running a 64 bit JVM allows for and requires a bigger heap
65517  JVM_HEAP_LIMIT_64="1600"
65518  STACK_SIZE_32=768
65519  STACK_SIZE_64=1536
65520  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65521  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65522    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65523  fi
65524  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65525    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65526  fi
65527  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65528    JVM_HEAP_LIMIT_32=512
65529    JVM_HEAP_LIMIT_64=512
65530  fi
65531
65532  if test "x$BOOT_JDK_BITS" = "x32"; then
65533    STACK_SIZE=$STACK_SIZE_32
65534    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65535  else
65536    STACK_SIZE=$STACK_SIZE_64
65537    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65538  fi
65539
65540  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65541  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65542  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65543  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65544  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65545  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65546    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65547    JVM_ARG_OK=true
65548  else
65549    $ECHO "Arg failed:" >&5
65550    $ECHO "$OUTPUT" >&5
65551    JVM_ARG_OK=false
65552  fi
65553
65554
65555  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65556  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65557  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65558  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65559  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65560  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65561    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65562    JVM_ARG_OK=true
65563  else
65564    $ECHO "Arg failed:" >&5
65565    $ECHO "$OUTPUT" >&5
65566    JVM_ARG_OK=false
65567  fi
65568
65569
65570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65571$as_echo "$boot_jdk_jvmargs_big" >&6; }
65572
65573  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65574
65575
65576  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65577    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65578    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65579  else
65580    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65581    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65582  fi
65583  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65584  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65586$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65588$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65589
65590
65591  # By default, the main javac compilations use big
65592  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65593
65594
65595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65596$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65597
65598  # Use serial gc for small short lived tools if possible
65599
65600  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65601  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65602  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65603  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65604  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65605  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65606    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65607    JVM_ARG_OK=true
65608  else
65609    $ECHO "Arg failed:" >&5
65610    $ECHO "$OUTPUT" >&5
65611    JVM_ARG_OK=false
65612  fi
65613
65614
65615  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65616  $ECHO "Command: $JAVA -Xms32M -version" >&5
65617  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65618  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65619  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65620  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65621    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65622    JVM_ARG_OK=true
65623  else
65624    $ECHO "Arg failed:" >&5
65625    $ECHO "$OUTPUT" >&5
65626    JVM_ARG_OK=false
65627  fi
65628
65629
65630  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65631  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65632  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65633  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65634  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65635  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65636    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65637    JVM_ARG_OK=true
65638  else
65639    $ECHO "Arg failed:" >&5
65640    $ECHO "$OUTPUT" >&5
65641    JVM_ARG_OK=false
65642  fi
65643
65644
65645  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65646  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65647  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65648  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65649  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65650  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65651    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65652    JVM_ARG_OK=true
65653  else
65654    $ECHO "Arg failed:" >&5
65655    $ECHO "$OUTPUT" >&5
65656    JVM_ARG_OK=false
65657  fi
65658
65659
65660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65661$as_echo "$boot_jdk_jvmargs_small" >&6; }
65662
65663  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65664
65665
65666  JAVA_TOOL_FLAGS_SMALL=""
65667  for f in $JAVA_FLAGS_SMALL; do
65668    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65669  done
65670
65671
65672
65673# Setup smart javac (after cores and memory have been setup)
65674
65675
65676# Check whether --with-sjavac-server-java was given.
65677if test "${with_sjavac_server_java+set}" = set; then :
65678  withval=$with_sjavac_server_java;
65679fi
65680
65681
65682  if test "x$with_sjavac_server_java" != x; then
65683    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65684    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65685    if test "x$FOUND_VERSION" = x; then
65686      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65687    fi
65688  else
65689    SJAVAC_SERVER_JAVA="$JAVA"
65690  fi
65691
65692
65693  if test "$MEMORY_SIZE" -gt "3000"; then
65694
65695  $ECHO "Check if jvm arg is ok: -d64" >&5
65696  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65697  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65698  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65699  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65700  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65701    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65702    JVM_ARG_OK=true
65703  else
65704    $ECHO "Arg failed:" >&5
65705    $ECHO "$OUTPUT" >&5
65706    JVM_ARG_OK=false
65707  fi
65708
65709    if test "$JVM_ARG_OK" = true; then
65710      JVM_64BIT=true
65711      JVM_ARG_OK=false
65712    fi
65713  fi
65714
65715  MX_VALUE=`expr $MEMORY_SIZE / 2`
65716  if test "$JVM_64BIT" = true; then
65717    # Set ms lower than mx since more than one instance of the server might
65718    # get launched at the same time before they figure out which instance won.
65719    MS_VALUE=512
65720    if test "$MX_VALUE" -gt "2048"; then
65721      MX_VALUE=2048
65722    fi
65723  else
65724    MS_VALUE=256
65725    if test "$MX_VALUE" -gt "1500"; then
65726      MX_VALUE=1500
65727    fi
65728  fi
65729  if test "$MX_VALUE" -lt "512"; then
65730    MX_VALUE=512
65731  fi
65732
65733  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65734  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65735  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65736  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65737  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65738  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65739    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65740    JVM_ARG_OK=true
65741  else
65742    $ECHO "Arg failed:" >&5
65743    $ECHO "$OUTPUT" >&5
65744    JVM_ARG_OK=false
65745  fi
65746
65747
65748
65749  # Check whether --enable-sjavac was given.
65750if test "${enable_sjavac+set}" = set; then :
65751  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65752else
65753  ENABLE_SJAVAC="no"
65754fi
65755
65756  if test "x$JVM_ARG_OK" = "xfalse"; then
65757    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65758$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65759    ENABLE_SJAVAC="no"
65760  fi
65761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65762$as_echo_n "checking whether to use sjavac... " >&6; }
65763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65764$as_echo "$ENABLE_SJAVAC" >&6; }
65765
65766
65767  # Check whether --enable-javac-server was given.
65768if test "${enable_javac_server+set}" = set; then :
65769  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65770else
65771  ENABLE_JAVAC_SERVER="yes"
65772fi
65773
65774  if test "x$JVM_ARG_OK" = "xfalse"; then
65775    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65776$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65777    ENABLE_JAVAC_SERVER="no"
65778  fi
65779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65780$as_echo_n "checking whether to use javac server... " >&6; }
65781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65782$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65783
65784
65785  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65786    # When using a server javac, the small client instances do not need much
65787    # resources.
65788    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65789  fi
65790
65791
65792# Setup use of icecc if requested
65793
65794  # Check whether --enable-icecc was given.
65795if test "${enable_icecc+set}" = set; then :
65796  enableval=$enable_icecc;
65797fi
65798
65799
65800  if test "x${enable_icecc}" = "xyes"; then
65801
65802
65803
65804  # Publish this variable in the help.
65805
65806
65807  if [ -z "${ICECC_CMD+x}" ]; then
65808    # The variable is not set by user, try to locate tool using the code snippet
65809    for ac_prog in icecc
65810do
65811  # Extract the first word of "$ac_prog", so it can be a program name with args.
65812set dummy $ac_prog; ac_word=$2
65813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65814$as_echo_n "checking for $ac_word... " >&6; }
65815if ${ac_cv_path_ICECC_CMD+:} false; then :
65816  $as_echo_n "(cached) " >&6
65817else
65818  case $ICECC_CMD in
65819  [\\/]* | ?:[\\/]*)
65820  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65821  ;;
65822  *)
65823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65824for as_dir in $PATH
65825do
65826  IFS=$as_save_IFS
65827  test -z "$as_dir" && as_dir=.
65828    for ac_exec_ext in '' $ac_executable_extensions; do
65829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65830    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65832    break 2
65833  fi
65834done
65835  done
65836IFS=$as_save_IFS
65837
65838  ;;
65839esac
65840fi
65841ICECC_CMD=$ac_cv_path_ICECC_CMD
65842if test -n "$ICECC_CMD"; then
65843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65844$as_echo "$ICECC_CMD" >&6; }
65845else
65846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65847$as_echo "no" >&6; }
65848fi
65849
65850
65851  test -n "$ICECC_CMD" && break
65852done
65853
65854  else
65855    # The variable is set, but is it from the command line or the environment?
65856
65857    # Try to remove the string !ICECC_CMD! from our list.
65858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65860      # If it failed, the variable was not from the command line. Ignore it,
65861      # but warn the user (except for BASH, which is always set by the calling BASH).
65862      if test "xICECC_CMD" != xBASH; then
65863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65864$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65865      fi
65866      # Try to locate tool using the code snippet
65867      for ac_prog in icecc
65868do
65869  # Extract the first word of "$ac_prog", so it can be a program name with args.
65870set dummy $ac_prog; ac_word=$2
65871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65872$as_echo_n "checking for $ac_word... " >&6; }
65873if ${ac_cv_path_ICECC_CMD+:} false; then :
65874  $as_echo_n "(cached) " >&6
65875else
65876  case $ICECC_CMD in
65877  [\\/]* | ?:[\\/]*)
65878  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65879  ;;
65880  *)
65881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65882for as_dir in $PATH
65883do
65884  IFS=$as_save_IFS
65885  test -z "$as_dir" && as_dir=.
65886    for ac_exec_ext in '' $ac_executable_extensions; do
65887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65888    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65890    break 2
65891  fi
65892done
65893  done
65894IFS=$as_save_IFS
65895
65896  ;;
65897esac
65898fi
65899ICECC_CMD=$ac_cv_path_ICECC_CMD
65900if test -n "$ICECC_CMD"; then
65901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65902$as_echo "$ICECC_CMD" >&6; }
65903else
65904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65905$as_echo "no" >&6; }
65906fi
65907
65908
65909  test -n "$ICECC_CMD" && break
65910done
65911
65912    else
65913      # If it succeeded, then it was overridden by the user. We will use it
65914      # for the tool.
65915
65916      # First remove it from the list of overridden variables, so we can test
65917      # for unknown variables in the end.
65918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65919
65920      # Check if we try to supply an empty value
65921      if test "x$ICECC_CMD" = x; then
65922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65923$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65925$as_echo_n "checking for ICECC_CMD... " >&6; }
65926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65927$as_echo "disabled" >&6; }
65928      else
65929        # Check if the provided tool contains a complete path.
65930        tool_specified="$ICECC_CMD"
65931        tool_basename="${tool_specified##*/}"
65932        if test "x$tool_basename" = "x$tool_specified"; then
65933          # A command without a complete path is provided, search $PATH.
65934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65935$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65936          # Extract the first word of "$tool_basename", so it can be a program name with args.
65937set dummy $tool_basename; ac_word=$2
65938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65939$as_echo_n "checking for $ac_word... " >&6; }
65940if ${ac_cv_path_ICECC_CMD+:} false; then :
65941  $as_echo_n "(cached) " >&6
65942else
65943  case $ICECC_CMD in
65944  [\\/]* | ?:[\\/]*)
65945  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65946  ;;
65947  *)
65948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65949for as_dir in $PATH
65950do
65951  IFS=$as_save_IFS
65952  test -z "$as_dir" && as_dir=.
65953    for ac_exec_ext in '' $ac_executable_extensions; do
65954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65955    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65957    break 2
65958  fi
65959done
65960  done
65961IFS=$as_save_IFS
65962
65963  ;;
65964esac
65965fi
65966ICECC_CMD=$ac_cv_path_ICECC_CMD
65967if test -n "$ICECC_CMD"; then
65968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65969$as_echo "$ICECC_CMD" >&6; }
65970else
65971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65972$as_echo "no" >&6; }
65973fi
65974
65975
65976          if test "x$ICECC_CMD" = x; then
65977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65978          fi
65979        else
65980          # Otherwise we believe it is a complete path. Use it as it is.
65981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65982$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65984$as_echo_n "checking for ICECC_CMD... " >&6; }
65985          if test ! -x "$tool_specified"; then
65986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65987$as_echo "not found" >&6; }
65988            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65989          fi
65990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65991$as_echo "$tool_specified" >&6; }
65992        fi
65993      fi
65994    fi
65995
65996  fi
65997
65998
65999
66000  if test "x$ICECC_CMD" = x; then
66001    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66002  fi
66003
66004
66005    old_path="$PATH"
66006
66007    # Look for icecc-create-env in some known places
66008    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66009
66010
66011
66012  # Publish this variable in the help.
66013
66014
66015  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66016    # The variable is not set by user, try to locate tool using the code snippet
66017    for ac_prog in icecc-create-env
66018do
66019  # Extract the first word of "$ac_prog", so it can be a program name with args.
66020set dummy $ac_prog; ac_word=$2
66021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66022$as_echo_n "checking for $ac_word... " >&6; }
66023if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66024  $as_echo_n "(cached) " >&6
66025else
66026  case $ICECC_CREATE_ENV in
66027  [\\/]* | ?:[\\/]*)
66028  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66029  ;;
66030  *)
66031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66032for as_dir in $PATH
66033do
66034  IFS=$as_save_IFS
66035  test -z "$as_dir" && as_dir=.
66036    for ac_exec_ext in '' $ac_executable_extensions; do
66037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66038    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66040    break 2
66041  fi
66042done
66043  done
66044IFS=$as_save_IFS
66045
66046  ;;
66047esac
66048fi
66049ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66050if test -n "$ICECC_CREATE_ENV"; then
66051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66052$as_echo "$ICECC_CREATE_ENV" >&6; }
66053else
66054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66055$as_echo "no" >&6; }
66056fi
66057
66058
66059  test -n "$ICECC_CREATE_ENV" && break
66060done
66061
66062  else
66063    # The variable is set, but is it from the command line or the environment?
66064
66065    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66066    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66067    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66068      # If it failed, the variable was not from the command line. Ignore it,
66069      # but warn the user (except for BASH, which is always set by the calling BASH).
66070      if test "xICECC_CREATE_ENV" != xBASH; then
66071        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66072$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66073      fi
66074      # Try to locate tool using the code snippet
66075      for ac_prog in icecc-create-env
66076do
66077  # Extract the first word of "$ac_prog", so it can be a program name with args.
66078set dummy $ac_prog; ac_word=$2
66079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66080$as_echo_n "checking for $ac_word... " >&6; }
66081if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66082  $as_echo_n "(cached) " >&6
66083else
66084  case $ICECC_CREATE_ENV in
66085  [\\/]* | ?:[\\/]*)
66086  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66087  ;;
66088  *)
66089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66090for as_dir in $PATH
66091do
66092  IFS=$as_save_IFS
66093  test -z "$as_dir" && as_dir=.
66094    for ac_exec_ext in '' $ac_executable_extensions; do
66095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66096    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66098    break 2
66099  fi
66100done
66101  done
66102IFS=$as_save_IFS
66103
66104  ;;
66105esac
66106fi
66107ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66108if test -n "$ICECC_CREATE_ENV"; then
66109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66110$as_echo "$ICECC_CREATE_ENV" >&6; }
66111else
66112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66113$as_echo "no" >&6; }
66114fi
66115
66116
66117  test -n "$ICECC_CREATE_ENV" && break
66118done
66119
66120    else
66121      # If it succeeded, then it was overridden by the user. We will use it
66122      # for the tool.
66123
66124      # First remove it from the list of overridden variables, so we can test
66125      # for unknown variables in the end.
66126      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66127
66128      # Check if we try to supply an empty value
66129      if test "x$ICECC_CREATE_ENV" = x; then
66130        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66131$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66133$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66135$as_echo "disabled" >&6; }
66136      else
66137        # Check if the provided tool contains a complete path.
66138        tool_specified="$ICECC_CREATE_ENV"
66139        tool_basename="${tool_specified##*/}"
66140        if test "x$tool_basename" = "x$tool_specified"; then
66141          # A command without a complete path is provided, search $PATH.
66142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66143$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66144          # Extract the first word of "$tool_basename", so it can be a program name with args.
66145set dummy $tool_basename; ac_word=$2
66146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66147$as_echo_n "checking for $ac_word... " >&6; }
66148if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66149  $as_echo_n "(cached) " >&6
66150else
66151  case $ICECC_CREATE_ENV in
66152  [\\/]* | ?:[\\/]*)
66153  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66154  ;;
66155  *)
66156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66157for as_dir in $PATH
66158do
66159  IFS=$as_save_IFS
66160  test -z "$as_dir" && as_dir=.
66161    for ac_exec_ext in '' $ac_executable_extensions; do
66162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66163    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66165    break 2
66166  fi
66167done
66168  done
66169IFS=$as_save_IFS
66170
66171  ;;
66172esac
66173fi
66174ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66175if test -n "$ICECC_CREATE_ENV"; then
66176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66177$as_echo "$ICECC_CREATE_ENV" >&6; }
66178else
66179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66180$as_echo "no" >&6; }
66181fi
66182
66183
66184          if test "x$ICECC_CREATE_ENV" = x; then
66185            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66186          fi
66187        else
66188          # Otherwise we believe it is a complete path. Use it as it is.
66189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66190$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66191          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66192$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66193          if test ! -x "$tool_specified"; then
66194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66195$as_echo "not found" >&6; }
66196            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66197          fi
66198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66199$as_echo "$tool_specified" >&6; }
66200        fi
66201      fi
66202    fi
66203
66204  fi
66205
66206
66207
66208  if test "x$ICECC_CREATE_ENV" = x; then
66209    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66210  fi
66211
66212
66213    # Use icecc-create-env to create a minimal compilation environment that can
66214    # be sent to the other hosts in the icecream cluster.
66215    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66216    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66217    # Older versions of icecc does not have the --gcc parameter
66218    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66219      icecc_gcc_arg="--gcc"
66220    fi
66221    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66222
66223  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66224      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66225          ${icecc_create_env_log} 2>&1 )
66226  if test "$?" != "0"; then
66227    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66228$as_echo "$as_me: icecc-create-env output:" >&6;}
66229    cat \
66230          ${icecc_create_env_log}
66231    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66232  fi
66233
66234    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66235      # For clang, the icecc compilerwrapper is needed. It usually resides next
66236      # to icecc-create-env.
66237
66238
66239
66240  # Publish this variable in the help.
66241
66242
66243  if [ -z "${ICECC_WRAPPER+x}" ]; then
66244    # The variable is not set by user, try to locate tool using the code snippet
66245    for ac_prog in compilerwrapper
66246do
66247  # Extract the first word of "$ac_prog", so it can be a program name with args.
66248set dummy $ac_prog; ac_word=$2
66249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66250$as_echo_n "checking for $ac_word... " >&6; }
66251if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66252  $as_echo_n "(cached) " >&6
66253else
66254  case $ICECC_WRAPPER in
66255  [\\/]* | ?:[\\/]*)
66256  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66257  ;;
66258  *)
66259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66260for as_dir in $PATH
66261do
66262  IFS=$as_save_IFS
66263  test -z "$as_dir" && as_dir=.
66264    for ac_exec_ext in '' $ac_executable_extensions; do
66265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66266    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66268    break 2
66269  fi
66270done
66271  done
66272IFS=$as_save_IFS
66273
66274  ;;
66275esac
66276fi
66277ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66278if test -n "$ICECC_WRAPPER"; then
66279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66280$as_echo "$ICECC_WRAPPER" >&6; }
66281else
66282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66283$as_echo "no" >&6; }
66284fi
66285
66286
66287  test -n "$ICECC_WRAPPER" && break
66288done
66289
66290  else
66291    # The variable is set, but is it from the command line or the environment?
66292
66293    # Try to remove the string !ICECC_WRAPPER! from our list.
66294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66296      # If it failed, the variable was not from the command line. Ignore it,
66297      # but warn the user (except for BASH, which is always set by the calling BASH).
66298      if test "xICECC_WRAPPER" != xBASH; then
66299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66300$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66301      fi
66302      # Try to locate tool using the code snippet
66303      for ac_prog in compilerwrapper
66304do
66305  # Extract the first word of "$ac_prog", so it can be a program name with args.
66306set dummy $ac_prog; ac_word=$2
66307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66308$as_echo_n "checking for $ac_word... " >&6; }
66309if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66310  $as_echo_n "(cached) " >&6
66311else
66312  case $ICECC_WRAPPER in
66313  [\\/]* | ?:[\\/]*)
66314  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66315  ;;
66316  *)
66317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66318for as_dir in $PATH
66319do
66320  IFS=$as_save_IFS
66321  test -z "$as_dir" && as_dir=.
66322    for ac_exec_ext in '' $ac_executable_extensions; do
66323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66324    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66326    break 2
66327  fi
66328done
66329  done
66330IFS=$as_save_IFS
66331
66332  ;;
66333esac
66334fi
66335ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66336if test -n "$ICECC_WRAPPER"; then
66337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66338$as_echo "$ICECC_WRAPPER" >&6; }
66339else
66340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66341$as_echo "no" >&6; }
66342fi
66343
66344
66345  test -n "$ICECC_WRAPPER" && break
66346done
66347
66348    else
66349      # If it succeeded, then it was overridden by the user. We will use it
66350      # for the tool.
66351
66352      # First remove it from the list of overridden variables, so we can test
66353      # for unknown variables in the end.
66354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66355
66356      # Check if we try to supply an empty value
66357      if test "x$ICECC_WRAPPER" = x; then
66358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66359$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66361$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66363$as_echo "disabled" >&6; }
66364      else
66365        # Check if the provided tool contains a complete path.
66366        tool_specified="$ICECC_WRAPPER"
66367        tool_basename="${tool_specified##*/}"
66368        if test "x$tool_basename" = "x$tool_specified"; then
66369          # A command without a complete path is provided, search $PATH.
66370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66371$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66372          # Extract the first word of "$tool_basename", so it can be a program name with args.
66373set dummy $tool_basename; ac_word=$2
66374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66375$as_echo_n "checking for $ac_word... " >&6; }
66376if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66377  $as_echo_n "(cached) " >&6
66378else
66379  case $ICECC_WRAPPER in
66380  [\\/]* | ?:[\\/]*)
66381  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66382  ;;
66383  *)
66384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66385for as_dir in $PATH
66386do
66387  IFS=$as_save_IFS
66388  test -z "$as_dir" && as_dir=.
66389    for ac_exec_ext in '' $ac_executable_extensions; do
66390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66391    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66393    break 2
66394  fi
66395done
66396  done
66397IFS=$as_save_IFS
66398
66399  ;;
66400esac
66401fi
66402ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66403if test -n "$ICECC_WRAPPER"; then
66404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66405$as_echo "$ICECC_WRAPPER" >&6; }
66406else
66407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66408$as_echo "no" >&6; }
66409fi
66410
66411
66412          if test "x$ICECC_WRAPPER" = x; then
66413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66414          fi
66415        else
66416          # Otherwise we believe it is a complete path. Use it as it is.
66417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66418$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66420$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66421          if test ! -x "$tool_specified"; then
66422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66423$as_echo "not found" >&6; }
66424            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66425          fi
66426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66427$as_echo "$tool_specified" >&6; }
66428        fi
66429      fi
66430    fi
66431
66432  fi
66433
66434
66435
66436  if test "x$ICECC_WRAPPER" = x; then
66437    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66438  fi
66439
66440
66441
66442  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66443      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66444  if test "$?" != "0"; then
66445    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66446$as_echo "$as_me: icecc-create-env output:" >&6;}
66447    cat ${icecc_create_env_log}
66448    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66449  fi
66450
66451    else
66452      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66453    fi
66454    PATH="$old_path"
66455    # The bundle with the compiler gets a name based on checksums. Parse log file
66456    # to find it.
66457    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66458    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66459    if test ! -f ${ICECC_ENV_BUNDLE}; then
66460      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66461    fi
66462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66463$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66465$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66466    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66467
66468    if test "x${COMPILE_TYPE}" = "xcross"; then
66469      # If cross compiling, create a separate env package for the build compiler
66470      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66471      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66472      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66473
66474  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66475      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66476            ${icecc_create_env_log_build} 2>&1 )
66477  if test "$?" != "0"; then
66478    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66479$as_echo "$as_me: icecc-create-env output:" >&6;}
66480    cat \
66481            ${icecc_create_env_log_build}
66482    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66483  fi
66484
66485      elif test "x${BUILD_CC##*/}" = "xclang"; then
66486
66487  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66488      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66489  if test "$?" != "0"; then
66490    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66491$as_echo "$as_me: icecc-create-env output:" >&6;}
66492    cat ${icecc_create_env_log_build}
66493    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66494  fi
66495
66496      else
66497        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66498      fi
66499      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66500      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66501      if test ! -f ${ICECC_ENV_BUNDLE}; then
66502        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66503      fi
66504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66505$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66507$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66508      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66509          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66510    else
66511      BUILD_ICECC="${ICECC}"
66512    fi
66513
66514
66515  fi
66516
66517
66518# Can the C/C++ compiler use precompiled headers?
66519
66520
66521  ###############################################################################
66522  #
66523  # Can the C/C++ compiler use precompiled headers?
66524  #
66525  # Check whether --enable-precompiled-headers was given.
66526if test "${enable_precompiled_headers+set}" = set; then :
66527  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66528else
66529  ENABLE_PRECOMPH=yes
66530fi
66531
66532
66533  USE_PRECOMPILED_HEADER=true
66534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66535$as_echo_n "checking If precompiled header is enabled... " >&6; }
66536  if test "x$ENABLE_PRECOMPH" = xno; then
66537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66538$as_echo "no, forced" >&6; }
66539    USE_PRECOMPILED_HEADER=false
66540  elif test "x$ICECC" != "x"; then
66541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66542$as_echo "no, does not work effectively with icecc" >&6; }
66543    USE_PRECOMPILED_HEADER=false
66544  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66546$as_echo "no, does not work with Solaris Studio" >&6; }
66547    USE_PRECOMPILED_HEADER=false
66548  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66550$as_echo "no, does not work with xlc" >&6; }
66551    USE_PRECOMPILED_HEADER=false
66552  else
66553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66554$as_echo "yes" >&6; }
66555  fi
66556
66557  if test "x$ENABLE_PRECOMPH" = xyes; then
66558    # Check that the compiler actually supports precomp headers.
66559    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66561$as_echo_n "checking that precompiled headers work... " >&6; }
66562      echo "int alfa();" > conftest.h
66563      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66564      if test ! -f conftest.hpp.gch; then
66565        USE_PRECOMPILED_HEADER=false
66566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66567$as_echo "no" >&6; }
66568      else
66569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66570$as_echo "yes" >&6; }
66571      fi
66572      $RM conftest.h conftest.hpp.gch
66573    fi
66574  fi
66575
66576
66577
66578
66579# Setup use of ccache, if available
66580
66581  # Check whether --enable-ccache was given.
66582if test "${enable_ccache+set}" = set; then :
66583  enableval=$enable_ccache;
66584fi
66585
66586
66587  CCACHE_STATUS=
66588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66589$as_echo_n "checking is ccache enabled... " >&6; }
66590  if test "x$enable_ccache" = xyes; then
66591    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66593$as_echo "yes" >&6; }
66594      OLD_PATH="$PATH"
66595      if test "x$TOOLCHAIN_PATH" != x; then
66596        PATH=$TOOLCHAIN_PATH:$PATH
66597      fi
66598
66599
66600
66601  # Publish this variable in the help.
66602
66603
66604  if [ -z "${CCACHE+x}" ]; then
66605    # The variable is not set by user, try to locate tool using the code snippet
66606    for ac_prog in ccache
66607do
66608  # Extract the first word of "$ac_prog", so it can be a program name with args.
66609set dummy $ac_prog; ac_word=$2
66610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66611$as_echo_n "checking for $ac_word... " >&6; }
66612if ${ac_cv_path_CCACHE+:} false; then :
66613  $as_echo_n "(cached) " >&6
66614else
66615  case $CCACHE in
66616  [\\/]* | ?:[\\/]*)
66617  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66618  ;;
66619  *)
66620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66621for as_dir in $PATH
66622do
66623  IFS=$as_save_IFS
66624  test -z "$as_dir" && as_dir=.
66625    for ac_exec_ext in '' $ac_executable_extensions; do
66626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66627    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66629    break 2
66630  fi
66631done
66632  done
66633IFS=$as_save_IFS
66634
66635  ;;
66636esac
66637fi
66638CCACHE=$ac_cv_path_CCACHE
66639if test -n "$CCACHE"; then
66640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66641$as_echo "$CCACHE" >&6; }
66642else
66643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66644$as_echo "no" >&6; }
66645fi
66646
66647
66648  test -n "$CCACHE" && break
66649done
66650
66651  else
66652    # The variable is set, but is it from the command line or the environment?
66653
66654    # Try to remove the string !CCACHE! from our list.
66655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66657      # If it failed, the variable was not from the command line. Ignore it,
66658      # but warn the user (except for BASH, which is always set by the calling BASH).
66659      if test "xCCACHE" != xBASH; then
66660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66661$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66662      fi
66663      # Try to locate tool using the code snippet
66664      for ac_prog in ccache
66665do
66666  # Extract the first word of "$ac_prog", so it can be a program name with args.
66667set dummy $ac_prog; ac_word=$2
66668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66669$as_echo_n "checking for $ac_word... " >&6; }
66670if ${ac_cv_path_CCACHE+:} false; then :
66671  $as_echo_n "(cached) " >&6
66672else
66673  case $CCACHE in
66674  [\\/]* | ?:[\\/]*)
66675  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66676  ;;
66677  *)
66678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66679for as_dir in $PATH
66680do
66681  IFS=$as_save_IFS
66682  test -z "$as_dir" && as_dir=.
66683    for ac_exec_ext in '' $ac_executable_extensions; do
66684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66685    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66687    break 2
66688  fi
66689done
66690  done
66691IFS=$as_save_IFS
66692
66693  ;;
66694esac
66695fi
66696CCACHE=$ac_cv_path_CCACHE
66697if test -n "$CCACHE"; then
66698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66699$as_echo "$CCACHE" >&6; }
66700else
66701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66702$as_echo "no" >&6; }
66703fi
66704
66705
66706  test -n "$CCACHE" && break
66707done
66708
66709    else
66710      # If it succeeded, then it was overridden by the user. We will use it
66711      # for the tool.
66712
66713      # First remove it from the list of overridden variables, so we can test
66714      # for unknown variables in the end.
66715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66716
66717      # Check if we try to supply an empty value
66718      if test "x$CCACHE" = x; then
66719        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66720$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66722$as_echo_n "checking for CCACHE... " >&6; }
66723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66724$as_echo "disabled" >&6; }
66725      else
66726        # Check if the provided tool contains a complete path.
66727        tool_specified="$CCACHE"
66728        tool_basename="${tool_specified##*/}"
66729        if test "x$tool_basename" = "x$tool_specified"; then
66730          # A command without a complete path is provided, search $PATH.
66731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66732$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66733          # Extract the first word of "$tool_basename", so it can be a program name with args.
66734set dummy $tool_basename; ac_word=$2
66735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66736$as_echo_n "checking for $ac_word... " >&6; }
66737if ${ac_cv_path_CCACHE+:} false; then :
66738  $as_echo_n "(cached) " >&6
66739else
66740  case $CCACHE in
66741  [\\/]* | ?:[\\/]*)
66742  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66743  ;;
66744  *)
66745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66746for as_dir in $PATH
66747do
66748  IFS=$as_save_IFS
66749  test -z "$as_dir" && as_dir=.
66750    for ac_exec_ext in '' $ac_executable_extensions; do
66751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66752    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66754    break 2
66755  fi
66756done
66757  done
66758IFS=$as_save_IFS
66759
66760  ;;
66761esac
66762fi
66763CCACHE=$ac_cv_path_CCACHE
66764if test -n "$CCACHE"; then
66765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66766$as_echo "$CCACHE" >&6; }
66767else
66768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66769$as_echo "no" >&6; }
66770fi
66771
66772
66773          if test "x$CCACHE" = x; then
66774            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66775          fi
66776        else
66777          # Otherwise we believe it is a complete path. Use it as it is.
66778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66779$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66780          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66781$as_echo_n "checking for CCACHE... " >&6; }
66782          if test ! -x "$tool_specified"; then
66783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66784$as_echo "not found" >&6; }
66785            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66786          fi
66787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66788$as_echo "$tool_specified" >&6; }
66789        fi
66790      fi
66791    fi
66792
66793  fi
66794
66795
66796
66797  if test "x$CCACHE" = x; then
66798    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66799  fi
66800
66801
66802      PATH="$OLD_PATH"
66803      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66804      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66805    else
66806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66807$as_echo "no" >&6; }
66808      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66809$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66810    fi
66811  elif test "x$enable_ccache" = xno; then
66812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66813$as_echo "no, explicitly disabled" >&6; }
66814    CCACHE_STATUS="Disabled"
66815  elif test "x$enable_ccache" = x; then
66816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66817$as_echo "no" >&6; }
66818  else
66819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66820$as_echo "unknown" >&6; }
66821    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66822  fi
66823
66824
66825
66826# Check whether --with-ccache-dir was given.
66827if test "${with_ccache_dir+set}" = set; then :
66828  withval=$with_ccache_dir;
66829fi
66830
66831
66832  if test "x$with_ccache_dir" != x; then
66833    # When using a non home ccache directory, assume the use is to share ccache files
66834    # with other users. Thus change the umask.
66835    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66836    if test "x$CCACHE" = x; then
66837      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66838$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66839    fi
66840  fi
66841
66842  if test "x$CCACHE" != x; then
66843
66844  if test "x$CCACHE" != x; then
66845    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66846      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66847          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66848      if test "x$HAS_BAD_CCACHE" != "x"; then
66849        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66850      fi
66851    fi
66852    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66853      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66854          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66855      if test "x$HAS_BAD_CCACHE" != "x"; then
66856        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66857      fi
66858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66859$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66860      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66861      PUSHED_FLAGS="$CXXFLAGS"
66862      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66863      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66864/* end confdefs.h.  */
66865
66866int
66867main ()
66868{
66869
66870  ;
66871  return 0;
66872}
66873_ACEOF
66874if ac_fn_cxx_try_compile "$LINENO"; then :
66875  CC_KNOWS_CCACHE_TRICK=yes
66876else
66877  CC_KNOWS_CCACHE_TRICK=no
66878fi
66879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66880      CXXFLAGS="$PUSHED_FLAGS"
66881      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66883$as_echo "yes" >&6; }
66884        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66885
66886        CCACHE_SLOPPINESS=pch_defines,time_macros
66887      else
66888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66889$as_echo "no" >&6; }
66890        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66891      fi
66892    fi
66893
66894    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66895        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66896
66897    if test "x$SET_CCACHE_DIR" != x; then
66898      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66899      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66900    fi
66901  fi
66902
66903  fi
66904
66905
66906###############################################################################
66907#
66908# And now the finish...
66909#
66910###############################################################################
66911
66912# Check for some common pitfalls
66913
66914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66915    file_to_test="$SRC_ROOT/LICENSE"
66916    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66917      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
66918    fi
66919  fi
66920
66921
66922  # Did user specify any unknown variables?
66923
66924  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66925    # Replace the separating ! with spaces before presenting for end user.
66926    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66927    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66928$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66929  fi
66930
66931
66932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66933$as_echo_n "checking if build directory is on local disk... " >&6; }
66934
66935  # df -l lists only local disks; if the given directory is not found then
66936  # a non-zero exit code is given
66937  if test "x$DF" = x; then
66938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66939      # msys does not have df; use Windows "net use" instead.
66940      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66941      if test "x$IS_NETWORK_DISK" = x; then
66942        OUTPUT_DIR_IS_LOCAL="yes"
66943      else
66944        OUTPUT_DIR_IS_LOCAL="no"
66945      fi
66946    else
66947      # No df here, say it's local
66948      OUTPUT_DIR_IS_LOCAL="yes"
66949    fi
66950  else
66951    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66952      OUTPUT_DIR_IS_LOCAL="yes"
66953    else
66954      OUTPUT_DIR_IS_LOCAL="no"
66955    fi
66956  fi
66957
66958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66959$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66960
66961
66962
66963  # Check if the user has any old-style ALT_ variables set.
66964  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66965
66966  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66967  # Since we can't properly handle the dependencies for this, warn the user about the situation
66968  if test -e $OUTPUT_ROOT/spec.gmk; then
66969    IS_RECONFIGURE=yes
66970  else
66971    IS_RECONFIGURE=no
66972  fi
66973
66974
66975# At the end, call the custom hook. (Dummy macro if no custom sources available)
66976
66977
66978# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66979
66980  # Keep feature lists sorted and free of duplicates
66981  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66982  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66983  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66984  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66985  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66986  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66987  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66988
66989  # Validate features
66990  for variant in $JVM_VARIANTS; do
66991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66992$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66993    features_var_name=JVM_FEATURES_$variant
66994    JVM_FEATURES_TO_TEST=${!features_var_name}
66995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66996$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66997    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66998    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66999    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67000    if test "x$INVALID_FEATURES" != x; then
67001      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67002    fi
67003  done
67004
67005
67006# We're messing a bit with internal autoconf variables to put the config.status
67007# in the output directory instead of the current directory.
67008CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67009
67010# Create the actual output files. Now the main work of configure is done.
67011cat >confcache <<\_ACEOF
67012# This file is a shell script that caches the results of configure
67013# tests run on this system so they can be shared between configure
67014# scripts and configure runs, see configure's option --config-cache.
67015# It is not useful on other systems.  If it contains results you don't
67016# want to keep, you may remove or edit it.
67017#
67018# config.status only pays attention to the cache file if you give it
67019# the --recheck option to rerun configure.
67020#
67021# `ac_cv_env_foo' variables (set or unset) will be overridden when
67022# loading this file, other *unset* `ac_cv_foo' will be assigned the
67023# following values.
67024
67025_ACEOF
67026
67027# The following way of writing the cache mishandles newlines in values,
67028# but we know of no workaround that is simple, portable, and efficient.
67029# So, we kill variables containing newlines.
67030# Ultrix sh set writes to stderr and can't be redirected directly,
67031# and sets the high bit in the cache file unless we assign to the vars.
67032(
67033  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67034    eval ac_val=\$$ac_var
67035    case $ac_val in #(
67036    *${as_nl}*)
67037      case $ac_var in #(
67038      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67039$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67040      esac
67041      case $ac_var in #(
67042      _ | IFS | as_nl) ;; #(
67043      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67044      *) { eval $ac_var=; unset $ac_var;} ;;
67045      esac ;;
67046    esac
67047  done
67048
67049  (set) 2>&1 |
67050    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67051    *${as_nl}ac_space=\ *)
67052      # `set' does not quote correctly, so add quotes: double-quote
67053      # substitution turns \\\\ into \\, and sed turns \\ into \.
67054      sed -n \
67055	"s/'/'\\\\''/g;
67056	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67057      ;; #(
67058    *)
67059      # `set' quotes correctly as required by POSIX, so do not add quotes.
67060      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67061      ;;
67062    esac |
67063    sort
67064) |
67065  sed '
67066     /^ac_cv_env_/b end
67067     t clear
67068     :clear
67069     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67070     t end
67071     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67072     :end' >>confcache
67073if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67074  if test -w "$cache_file"; then
67075    if test "x$cache_file" != "x/dev/null"; then
67076      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67077$as_echo "$as_me: updating cache $cache_file" >&6;}
67078      if test ! -f "$cache_file" || test -h "$cache_file"; then
67079	cat confcache >"$cache_file"
67080      else
67081        case $cache_file in #(
67082        */* | ?:*)
67083	  mv -f confcache "$cache_file"$$ &&
67084	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67085        *)
67086	  mv -f confcache "$cache_file" ;;
67087	esac
67088      fi
67089    fi
67090  else
67091    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67092$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67093  fi
67094fi
67095rm -f confcache
67096
67097test "x$prefix" = xNONE && prefix=$ac_default_prefix
67098# Let make expand exec_prefix.
67099test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67100
67101# Transform confdefs.h into DEFS.
67102# Protect against shell expansion while executing Makefile rules.
67103# Protect against Makefile macro expansion.
67104#
67105# If the first sed substitution is executed (which looks for macros that
67106# take arguments), then branch to the quote section.  Otherwise,
67107# look for a macro that doesn't take arguments.
67108ac_script='
67109:mline
67110/\\$/{
67111 N
67112 s,\\\n,,
67113 b mline
67114}
67115t clear
67116:clear
67117s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67118t quote
67119s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67120t quote
67121b any
67122:quote
67123s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67124s/\[/\\&/g
67125s/\]/\\&/g
67126s/\$/$$/g
67127H
67128:any
67129${
67130	g
67131	s/^\n//
67132	s/\n/ /g
67133	p
67134}
67135'
67136DEFS=`sed -n "$ac_script" confdefs.h`
67137
67138
67139ac_libobjs=
67140ac_ltlibobjs=
67141U=
67142for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67143  # 1. Remove the extension, and $U if already installed.
67144  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67145  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67146  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67147  #    will be set to the directory where LIBOBJS objects are built.
67148  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67149  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67150done
67151LIBOBJS=$ac_libobjs
67152
67153LTLIBOBJS=$ac_ltlibobjs
67154
67155
67156
67157: "${CONFIG_STATUS=./config.status}"
67158ac_write_fail=0
67159ac_clean_files_save=$ac_clean_files
67160ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67161{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67162$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67163as_write_fail=0
67164cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67165#! $SHELL
67166# Generated by $as_me.
67167# Run this file to recreate the current configuration.
67168# Compiler output produced by configure, useful for debugging
67169# configure, is in config.log if it exists.
67170
67171debug=false
67172ac_cs_recheck=false
67173ac_cs_silent=false
67174
67175SHELL=\${CONFIG_SHELL-$SHELL}
67176export SHELL
67177_ASEOF
67178cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67179## -------------------- ##
67180## M4sh Initialization. ##
67181## -------------------- ##
67182
67183# Be more Bourne compatible
67184DUALCASE=1; export DUALCASE # for MKS sh
67185if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67186  emulate sh
67187  NULLCMD=:
67188  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67189  # is contrary to our usage.  Disable this feature.
67190  alias -g '${1+"$@"}'='"$@"'
67191  setopt NO_GLOB_SUBST
67192else
67193  case `(set -o) 2>/dev/null` in #(
67194  *posix*) :
67195    set -o posix ;; #(
67196  *) :
67197     ;;
67198esac
67199fi
67200
67201
67202as_nl='
67203'
67204export as_nl
67205# Printing a long string crashes Solaris 7 /usr/bin/printf.
67206as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67207as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67208as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67209# Prefer a ksh shell builtin over an external printf program on Solaris,
67210# but without wasting forks for bash or zsh.
67211if test -z "$BASH_VERSION$ZSH_VERSION" \
67212    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67213  as_echo='print -r --'
67214  as_echo_n='print -rn --'
67215elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67216  as_echo='printf %s\n'
67217  as_echo_n='printf %s'
67218else
67219  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67220    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67221    as_echo_n='/usr/ucb/echo -n'
67222  else
67223    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67224    as_echo_n_body='eval
67225      arg=$1;
67226      case $arg in #(
67227      *"$as_nl"*)
67228	expr "X$arg" : "X\\(.*\\)$as_nl";
67229	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67230      esac;
67231      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67232    '
67233    export as_echo_n_body
67234    as_echo_n='sh -c $as_echo_n_body as_echo'
67235  fi
67236  export as_echo_body
67237  as_echo='sh -c $as_echo_body as_echo'
67238fi
67239
67240# The user is always right.
67241if test "${PATH_SEPARATOR+set}" != set; then
67242  PATH_SEPARATOR=:
67243  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67244    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67245      PATH_SEPARATOR=';'
67246  }
67247fi
67248
67249
67250# IFS
67251# We need space, tab and new line, in precisely that order.  Quoting is
67252# there to prevent editors from complaining about space-tab.
67253# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67254# splitting by setting IFS to empty value.)
67255IFS=" ""	$as_nl"
67256
67257# Find who we are.  Look in the path if we contain no directory separator.
67258as_myself=
67259case $0 in #((
67260  *[\\/]* ) as_myself=$0 ;;
67261  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67262for as_dir in $PATH
67263do
67264  IFS=$as_save_IFS
67265  test -z "$as_dir" && as_dir=.
67266    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67267  done
67268IFS=$as_save_IFS
67269
67270     ;;
67271esac
67272# We did not find ourselves, most probably we were run as `sh COMMAND'
67273# in which case we are not to be found in the path.
67274if test "x$as_myself" = x; then
67275  as_myself=$0
67276fi
67277if test ! -f "$as_myself"; then
67278  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67279  exit 1
67280fi
67281
67282# Unset variables that we do not need and which cause bugs (e.g. in
67283# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67284# suppresses any "Segmentation fault" message there.  '((' could
67285# trigger a bug in pdksh 5.2.14.
67286for as_var in BASH_ENV ENV MAIL MAILPATH
67287do eval test x\${$as_var+set} = xset \
67288  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67289done
67290PS1='$ '
67291PS2='> '
67292PS4='+ '
67293
67294# NLS nuisances.
67295LC_ALL=C
67296export LC_ALL
67297LANGUAGE=C
67298export LANGUAGE
67299
67300# CDPATH.
67301(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67302
67303
67304# as_fn_error STATUS ERROR [LINENO LOG_FD]
67305# ----------------------------------------
67306# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67307# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67308# script with STATUS, using 1 if that was 0.
67309as_fn_error ()
67310{
67311  as_status=$1; test $as_status -eq 0 && as_status=1
67312  if test "$4"; then
67313    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67314    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67315  fi
67316  $as_echo "$as_me: error: $2" >&2
67317  as_fn_exit $as_status
67318} # as_fn_error
67319
67320
67321# as_fn_set_status STATUS
67322# -----------------------
67323# Set $? to STATUS, without forking.
67324as_fn_set_status ()
67325{
67326  return $1
67327} # as_fn_set_status
67328
67329# as_fn_exit STATUS
67330# -----------------
67331# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67332as_fn_exit ()
67333{
67334  set +e
67335  as_fn_set_status $1
67336  exit $1
67337} # as_fn_exit
67338
67339# as_fn_unset VAR
67340# ---------------
67341# Portably unset VAR.
67342as_fn_unset ()
67343{
67344  { eval $1=; unset $1;}
67345}
67346as_unset=as_fn_unset
67347# as_fn_append VAR VALUE
67348# ----------------------
67349# Append the text in VALUE to the end of the definition contained in VAR. Take
67350# advantage of any shell optimizations that allow amortized linear growth over
67351# repeated appends, instead of the typical quadratic growth present in naive
67352# implementations.
67353if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67354  eval 'as_fn_append ()
67355  {
67356    eval $1+=\$2
67357  }'
67358else
67359  as_fn_append ()
67360  {
67361    eval $1=\$$1\$2
67362  }
67363fi # as_fn_append
67364
67365# as_fn_arith ARG...
67366# ------------------
67367# Perform arithmetic evaluation on the ARGs, and store the result in the
67368# global $as_val. Take advantage of shells that can avoid forks. The arguments
67369# must be portable across $(()) and expr.
67370if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67371  eval 'as_fn_arith ()
67372  {
67373    as_val=$(( $* ))
67374  }'
67375else
67376  as_fn_arith ()
67377  {
67378    as_val=`expr "$@" || test $? -eq 1`
67379  }
67380fi # as_fn_arith
67381
67382
67383if expr a : '\(a\)' >/dev/null 2>&1 &&
67384   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67385  as_expr=expr
67386else
67387  as_expr=false
67388fi
67389
67390if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67391  as_basename=basename
67392else
67393  as_basename=false
67394fi
67395
67396if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67397  as_dirname=dirname
67398else
67399  as_dirname=false
67400fi
67401
67402as_me=`$as_basename -- "$0" ||
67403$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67404	 X"$0" : 'X\(//\)$' \| \
67405	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67406$as_echo X/"$0" |
67407    sed '/^.*\/\([^/][^/]*\)\/*$/{
67408	    s//\1/
67409	    q
67410	  }
67411	  /^X\/\(\/\/\)$/{
67412	    s//\1/
67413	    q
67414	  }
67415	  /^X\/\(\/\).*/{
67416	    s//\1/
67417	    q
67418	  }
67419	  s/.*/./; q'`
67420
67421# Avoid depending upon Character Ranges.
67422as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67423as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67424as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67425as_cr_digits='0123456789'
67426as_cr_alnum=$as_cr_Letters$as_cr_digits
67427
67428ECHO_C= ECHO_N= ECHO_T=
67429case `echo -n x` in #(((((
67430-n*)
67431  case `echo 'xy\c'` in
67432  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67433  xy)  ECHO_C='\c';;
67434  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67435       ECHO_T='	';;
67436  esac;;
67437*)
67438  ECHO_N='-n';;
67439esac
67440
67441rm -f conf$$ conf$$.exe conf$$.file
67442if test -d conf$$.dir; then
67443  rm -f conf$$.dir/conf$$.file
67444else
67445  rm -f conf$$.dir
67446  mkdir conf$$.dir 2>/dev/null
67447fi
67448if (echo >conf$$.file) 2>/dev/null; then
67449  if ln -s conf$$.file conf$$ 2>/dev/null; then
67450    as_ln_s='ln -s'
67451    # ... but there are two gotchas:
67452    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67453    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67454    # In both cases, we have to default to `cp -pR'.
67455    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67456      as_ln_s='cp -pR'
67457  elif ln conf$$.file conf$$ 2>/dev/null; then
67458    as_ln_s=ln
67459  else
67460    as_ln_s='cp -pR'
67461  fi
67462else
67463  as_ln_s='cp -pR'
67464fi
67465rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67466rmdir conf$$.dir 2>/dev/null
67467
67468
67469# as_fn_mkdir_p
67470# -------------
67471# Create "$as_dir" as a directory, including parents if necessary.
67472as_fn_mkdir_p ()
67473{
67474
67475  case $as_dir in #(
67476  -*) as_dir=./$as_dir;;
67477  esac
67478  test -d "$as_dir" || eval $as_mkdir_p || {
67479    as_dirs=
67480    while :; do
67481      case $as_dir in #(
67482      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67483      *) as_qdir=$as_dir;;
67484      esac
67485      as_dirs="'$as_qdir' $as_dirs"
67486      as_dir=`$as_dirname -- "$as_dir" ||
67487$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67488	 X"$as_dir" : 'X\(//\)[^/]' \| \
67489	 X"$as_dir" : 'X\(//\)$' \| \
67490	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67491$as_echo X"$as_dir" |
67492    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67493	    s//\1/
67494	    q
67495	  }
67496	  /^X\(\/\/\)[^/].*/{
67497	    s//\1/
67498	    q
67499	  }
67500	  /^X\(\/\/\)$/{
67501	    s//\1/
67502	    q
67503	  }
67504	  /^X\(\/\).*/{
67505	    s//\1/
67506	    q
67507	  }
67508	  s/.*/./; q'`
67509      test -d "$as_dir" && break
67510    done
67511    test -z "$as_dirs" || eval "mkdir $as_dirs"
67512  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67513
67514
67515} # as_fn_mkdir_p
67516if mkdir -p . 2>/dev/null; then
67517  as_mkdir_p='mkdir -p "$as_dir"'
67518else
67519  test -d ./-p && rmdir ./-p
67520  as_mkdir_p=false
67521fi
67522
67523
67524# as_fn_executable_p FILE
67525# -----------------------
67526# Test if FILE is an executable regular file.
67527as_fn_executable_p ()
67528{
67529  test -f "$1" && test -x "$1"
67530} # as_fn_executable_p
67531as_test_x='test -x'
67532as_executable_p=as_fn_executable_p
67533
67534# Sed expression to map a string onto a valid CPP name.
67535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67536
67537# Sed expression to map a string onto a valid variable name.
67538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67539
67540
67541exec 6>&1
67542## ----------------------------------- ##
67543## Main body of $CONFIG_STATUS script. ##
67544## ----------------------------------- ##
67545_ASEOF
67546test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67547
67548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67549# Save the log message, to keep $0 and so on meaningful, and to
67550# report actual input values of CONFIG_FILES etc. instead of their
67551# values after options handling.
67552ac_log="
67553This file was extended by OpenJDK $as_me jdk9, which was
67554generated by GNU Autoconf 2.69.  Invocation command line was
67555
67556  CONFIG_FILES    = $CONFIG_FILES
67557  CONFIG_HEADERS  = $CONFIG_HEADERS
67558  CONFIG_LINKS    = $CONFIG_LINKS
67559  CONFIG_COMMANDS = $CONFIG_COMMANDS
67560  $ $0 $@
67561
67562on `(hostname || uname -n) 2>/dev/null | sed 1q`
67563"
67564
67565_ACEOF
67566
67567case $ac_config_files in *"
67568"*) set x $ac_config_files; shift; ac_config_files=$*;;
67569esac
67570
67571
67572
67573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67574# Files that config.status was made for.
67575config_files="$ac_config_files"
67576
67577_ACEOF
67578
67579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67580ac_cs_usage="\
67581\`$as_me' instantiates files and other configuration actions
67582from templates according to the current configuration.  Unless the files
67583and actions are specified as TAGs, all are instantiated by default.
67584
67585Usage: $0 [OPTION]... [TAG]...
67586
67587  -h, --help       print this help, then exit
67588  -V, --version    print version number and configuration settings, then exit
67589      --config     print configuration, then exit
67590  -q, --quiet, --silent
67591                   do not print progress messages
67592  -d, --debug      don't remove temporary files
67593      --recheck    update $as_me by reconfiguring in the same conditions
67594      --file=FILE[:TEMPLATE]
67595                   instantiate the configuration file FILE
67596
67597Configuration files:
67598$config_files
67599
67600Report bugs to <build-dev@openjdk.java.net>.
67601OpenJDK home page: <http://openjdk.java.net>."
67602
67603_ACEOF
67604cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67605ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67606ac_cs_version="\\
67607OpenJDK config.status jdk9
67608configured by $0, generated by GNU Autoconf 2.69,
67609  with options \\"\$ac_cs_config\\"
67610
67611Copyright (C) 2012 Free Software Foundation, Inc.
67612This config.status script is free software; the Free Software Foundation
67613gives unlimited permission to copy, distribute and modify it."
67614
67615ac_pwd='$ac_pwd'
67616srcdir='$srcdir'
67617AWK='$AWK'
67618test -n "\$AWK" || AWK=awk
67619_ACEOF
67620
67621cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67622# The default lists apply if the user does not specify any file.
67623ac_need_defaults=:
67624while test $# != 0
67625do
67626  case $1 in
67627  --*=?*)
67628    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67629    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67630    ac_shift=:
67631    ;;
67632  --*=)
67633    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67634    ac_optarg=
67635    ac_shift=:
67636    ;;
67637  *)
67638    ac_option=$1
67639    ac_optarg=$2
67640    ac_shift=shift
67641    ;;
67642  esac
67643
67644  case $ac_option in
67645  # Handling of the options.
67646  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67647    ac_cs_recheck=: ;;
67648  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67649    $as_echo "$ac_cs_version"; exit ;;
67650  --config | --confi | --conf | --con | --co | --c )
67651    $as_echo "$ac_cs_config"; exit ;;
67652  --debug | --debu | --deb | --de | --d | -d )
67653    debug=: ;;
67654  --file | --fil | --fi | --f )
67655    $ac_shift
67656    case $ac_optarg in
67657    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67658    '') as_fn_error $? "missing file argument" ;;
67659    esac
67660    as_fn_append CONFIG_FILES " '$ac_optarg'"
67661    ac_need_defaults=false;;
67662  --he | --h |  --help | --hel | -h )
67663    $as_echo "$ac_cs_usage"; exit ;;
67664  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67665  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67666    ac_cs_silent=: ;;
67667
67668  # This is an error.
67669  -*) as_fn_error $? "unrecognized option: \`$1'
67670Try \`$0 --help' for more information." ;;
67671
67672  *) as_fn_append ac_config_targets " $1"
67673     ac_need_defaults=false ;;
67674
67675  esac
67676  shift
67677done
67678
67679ac_configure_extra_args=
67680
67681if $ac_cs_silent; then
67682  exec 6>/dev/null
67683  ac_configure_extra_args="$ac_configure_extra_args --silent"
67684fi
67685
67686_ACEOF
67687cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67688if \$ac_cs_recheck; then
67689  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67690  shift
67691  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67692  CONFIG_SHELL='$SHELL'
67693  export CONFIG_SHELL
67694  exec "\$@"
67695fi
67696
67697_ACEOF
67698cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67699exec 5>>config.log
67700{
67701  echo
67702  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67703## Running $as_me. ##
67704_ASBOX
67705  $as_echo "$ac_log"
67706} >&5
67707
67708_ACEOF
67709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67710_ACEOF
67711
67712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67713
67714# Handling of arguments.
67715for ac_config_target in $ac_config_targets
67716do
67717  case $ac_config_target in
67718    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67719    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67720    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67721    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67722    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67723
67724  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67725  esac
67726done
67727
67728
67729# If the user did not use the arguments to specify the items to instantiate,
67730# then the envvar interface is used.  Set only those that are not.
67731# We use the long form for the default assignment because of an extremely
67732# bizarre bug on SunOS 4.1.3.
67733if $ac_need_defaults; then
67734  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67735fi
67736
67737# Have a temporary directory for convenience.  Make it in the build tree
67738# simply because there is no reason against having it here, and in addition,
67739# creating and moving files from /tmp can sometimes cause problems.
67740# Hook for its removal unless debugging.
67741# Note that there is a small window in which the directory will not be cleaned:
67742# after its creation but before its name has been assigned to `$tmp'.
67743$debug ||
67744{
67745  tmp= ac_tmp=
67746  trap 'exit_status=$?
67747  : "${ac_tmp:=$tmp}"
67748  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67749' 0
67750  trap 'as_fn_exit 1' 1 2 13 15
67751}
67752# Create a (secure) tmp directory for tmp files.
67753
67754{
67755  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67756  test -d "$tmp"
67757}  ||
67758{
67759  tmp=./conf$$-$RANDOM
67760  (umask 077 && mkdir "$tmp")
67761} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67762ac_tmp=$tmp
67763
67764# Set up the scripts for CONFIG_FILES section.
67765# No need to generate them if there are no CONFIG_FILES.
67766# This happens for instance with `./config.status config.h'.
67767if test -n "$CONFIG_FILES"; then
67768
67769
67770ac_cr=`echo X | tr X '\015'`
67771# On cygwin, bash can eat \r inside `` if the user requested igncr.
67772# But we know of no other shell where ac_cr would be empty at this
67773# point, so we can use a bashism as a fallback.
67774if test "x$ac_cr" = x; then
67775  eval ac_cr=\$\'\\r\'
67776fi
67777ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67778if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67779  ac_cs_awk_cr='\\r'
67780else
67781  ac_cs_awk_cr=$ac_cr
67782fi
67783
67784echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67785_ACEOF
67786
67787
67788{
67789  echo "cat >conf$$subs.awk <<_ACEOF" &&
67790  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67791  echo "_ACEOF"
67792} >conf$$subs.sh ||
67793  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67794ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67795ac_delim='%!_!# '
67796for ac_last_try in false false false false false :; do
67797  . ./conf$$subs.sh ||
67798    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67799
67800  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67801  if test $ac_delim_n = $ac_delim_num; then
67802    break
67803  elif $ac_last_try; then
67804    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67805  else
67806    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67807  fi
67808done
67809rm -f conf$$subs.sh
67810
67811cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67812cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67813_ACEOF
67814sed -n '
67815h
67816s/^/S["/; s/!.*/"]=/
67817p
67818g
67819s/^[^!]*!//
67820:repl
67821t repl
67822s/'"$ac_delim"'$//
67823t delim
67824:nl
67825h
67826s/\(.\{148\}\)..*/\1/
67827t more1
67828s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67829p
67830n
67831b repl
67832:more1
67833s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67834p
67835g
67836s/.\{148\}//
67837t nl
67838:delim
67839h
67840s/\(.\{148\}\)..*/\1/
67841t more2
67842s/["\\]/\\&/g; s/^/"/; s/$/"/
67843p
67844b
67845:more2
67846s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67847p
67848g
67849s/.\{148\}//
67850t delim
67851' <conf$$subs.awk | sed '
67852/^[^""]/{
67853  N
67854  s/\n//
67855}
67856' >>$CONFIG_STATUS || ac_write_fail=1
67857rm -f conf$$subs.awk
67858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67859_ACAWK
67860cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67861  for (key in S) S_is_set[key] = 1
67862  FS = ""
67863
67864}
67865{
67866  line = $ 0
67867  nfields = split(line, field, "@")
67868  substed = 0
67869  len = length(field[1])
67870  for (i = 2; i < nfields; i++) {
67871    key = field[i]
67872    keylen = length(key)
67873    if (S_is_set[key]) {
67874      value = S[key]
67875      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67876      len += length(value) + length(field[++i])
67877      substed = 1
67878    } else
67879      len += 1 + keylen
67880  }
67881
67882  print line
67883}
67884
67885_ACAWK
67886_ACEOF
67887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67888if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67889  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67890else
67891  cat
67892fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67893  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67894_ACEOF
67895
67896# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67897# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67898# trailing colons and then remove the whole line if VPATH becomes empty
67899# (actually we leave an empty line to preserve line numbers).
67900if test "x$srcdir" = x.; then
67901  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67902h
67903s///
67904s/^/:/
67905s/[	 ]*$/:/
67906s/:\$(srcdir):/:/g
67907s/:\${srcdir}:/:/g
67908s/:@srcdir@:/:/g
67909s/^:*//
67910s/:*$//
67911x
67912s/\(=[	 ]*\).*/\1/
67913G
67914s/\n//
67915s/^[^=]*=[	 ]*$//
67916}'
67917fi
67918
67919cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67920fi # test -n "$CONFIG_FILES"
67921
67922
67923eval set X "  :F $CONFIG_FILES      "
67924shift
67925for ac_tag
67926do
67927  case $ac_tag in
67928  :[FHLC]) ac_mode=$ac_tag; continue;;
67929  esac
67930  case $ac_mode$ac_tag in
67931  :[FHL]*:*);;
67932  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67933  :[FH]-) ac_tag=-:-;;
67934  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67935  esac
67936  ac_save_IFS=$IFS
67937  IFS=:
67938  set x $ac_tag
67939  IFS=$ac_save_IFS
67940  shift
67941  ac_file=$1
67942  shift
67943
67944  case $ac_mode in
67945  :L) ac_source=$1;;
67946  :[FH])
67947    ac_file_inputs=
67948    for ac_f
67949    do
67950      case $ac_f in
67951      -) ac_f="$ac_tmp/stdin";;
67952      *) # Look for the file first in the build tree, then in the source tree
67953	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67954	 # because $ac_f cannot contain `:'.
67955	 test -f "$ac_f" ||
67956	   case $ac_f in
67957	   [\\/$]*) false;;
67958	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67959	   esac ||
67960	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67961      esac
67962      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67963      as_fn_append ac_file_inputs " '$ac_f'"
67964    done
67965
67966    # Let's still pretend it is `configure' which instantiates (i.e., don't
67967    # use $as_me), people would be surprised to read:
67968    #    /* config.h.  Generated by config.status.  */
67969    configure_input='Generated from '`
67970	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67971	`' by configure.'
67972    if test x"$ac_file" != x-; then
67973      configure_input="$ac_file.  $configure_input"
67974      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67975$as_echo "$as_me: creating $ac_file" >&6;}
67976    fi
67977    # Neutralize special characters interpreted by sed in replacement strings.
67978    case $configure_input in #(
67979    *\&* | *\|* | *\\* )
67980       ac_sed_conf_input=`$as_echo "$configure_input" |
67981       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67982    *) ac_sed_conf_input=$configure_input;;
67983    esac
67984
67985    case $ac_tag in
67986    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67987      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67988    esac
67989    ;;
67990  esac
67991
67992  ac_dir=`$as_dirname -- "$ac_file" ||
67993$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67994	 X"$ac_file" : 'X\(//\)[^/]' \| \
67995	 X"$ac_file" : 'X\(//\)$' \| \
67996	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67997$as_echo X"$ac_file" |
67998    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67999	    s//\1/
68000	    q
68001	  }
68002	  /^X\(\/\/\)[^/].*/{
68003	    s//\1/
68004	    q
68005	  }
68006	  /^X\(\/\/\)$/{
68007	    s//\1/
68008	    q
68009	  }
68010	  /^X\(\/\).*/{
68011	    s//\1/
68012	    q
68013	  }
68014	  s/.*/./; q'`
68015  as_dir="$ac_dir"; as_fn_mkdir_p
68016  ac_builddir=.
68017
68018case "$ac_dir" in
68019.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68020*)
68021  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68022  # A ".." for each directory in $ac_dir_suffix.
68023  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68024  case $ac_top_builddir_sub in
68025  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68026  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68027  esac ;;
68028esac
68029ac_abs_top_builddir=$ac_pwd
68030ac_abs_builddir=$ac_pwd$ac_dir_suffix
68031# for backward compatibility:
68032ac_top_builddir=$ac_top_build_prefix
68033
68034case $srcdir in
68035  .)  # We are building in place.
68036    ac_srcdir=.
68037    ac_top_srcdir=$ac_top_builddir_sub
68038    ac_abs_top_srcdir=$ac_pwd ;;
68039  [\\/]* | ?:[\\/]* )  # Absolute name.
68040    ac_srcdir=$srcdir$ac_dir_suffix;
68041    ac_top_srcdir=$srcdir
68042    ac_abs_top_srcdir=$srcdir ;;
68043  *) # Relative name.
68044    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68045    ac_top_srcdir=$ac_top_build_prefix$srcdir
68046    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68047esac
68048ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68049
68050
68051  case $ac_mode in
68052  :F)
68053  #
68054  # CONFIG_FILE
68055  #
68056
68057_ACEOF
68058
68059cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68060# If the template does not know about datarootdir, expand it.
68061# FIXME: This hack should be removed a few years after 2.60.
68062ac_datarootdir_hack=; ac_datarootdir_seen=
68063ac_sed_dataroot='
68064/datarootdir/ {
68065  p
68066  q
68067}
68068/@datadir@/p
68069/@docdir@/p
68070/@infodir@/p
68071/@localedir@/p
68072/@mandir@/p'
68073case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68074*datarootdir*) ac_datarootdir_seen=yes;;
68075*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68076  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68077$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68078_ACEOF
68079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68080  ac_datarootdir_hack='
68081  s&@datadir@&$datadir&g
68082  s&@docdir@&$docdir&g
68083  s&@infodir@&$infodir&g
68084  s&@localedir@&$localedir&g
68085  s&@mandir@&$mandir&g
68086  s&\\\${datarootdir}&$datarootdir&g' ;;
68087esac
68088_ACEOF
68089
68090# Neutralize VPATH when `$srcdir' = `.'.
68091# Shell code in configure.ac might set extrasub.
68092# FIXME: do we really want to maintain this feature?
68093cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68094ac_sed_extra="$ac_vpsub
68095$extrasub
68096_ACEOF
68097cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68098:t
68099/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68100s|@configure_input@|$ac_sed_conf_input|;t t
68101s&@top_builddir@&$ac_top_builddir_sub&;t t
68102s&@top_build_prefix@&$ac_top_build_prefix&;t t
68103s&@srcdir@&$ac_srcdir&;t t
68104s&@abs_srcdir@&$ac_abs_srcdir&;t t
68105s&@top_srcdir@&$ac_top_srcdir&;t t
68106s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68107s&@builddir@&$ac_builddir&;t t
68108s&@abs_builddir@&$ac_abs_builddir&;t t
68109s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68110$ac_datarootdir_hack
68111"
68112eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68113  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68114
68115test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68116  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68117  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68118      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68119  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68120which seems to be undefined.  Please make sure it is defined" >&5
68121$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68122which seems to be undefined.  Please make sure it is defined" >&2;}
68123
68124  rm -f "$ac_tmp/stdin"
68125  case $ac_file in
68126  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68127  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68128  esac \
68129  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68130 ;;
68131
68132
68133
68134  esac
68135
68136done # for ac_tag
68137
68138
68139as_fn_exit 0
68140_ACEOF
68141ac_clean_files=$ac_clean_files_save
68142
68143test $ac_write_fail = 0 ||
68144  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68145
68146
68147# configure is writing to config.log, and then calls config.status.
68148# config.status does its own redirection, appending to config.log.
68149# Unfortunately, on DOS this fails, as config.log is still kept open
68150# by configure, so config.status won't be able to write to it; its
68151# output is simply discarded.  So we exec the FD to /dev/null,
68152# effectively closing config.log, so it can be properly (re)opened and
68153# appended to by config.status.  When coming back to configure, we
68154# need to make the FD available again.
68155if test "$no_create" != yes; then
68156  ac_cs_success=:
68157  ac_config_status_args=
68158  test "$silent" = yes &&
68159    ac_config_status_args="$ac_config_status_args --quiet"
68160  exec 5>/dev/null
68161  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68162  exec 5>>config.log
68163  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68164  # would make configure fail if this is the last instruction.
68165  $ac_cs_success || as_fn_exit 1
68166fi
68167if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68168  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68169$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68170fi
68171
68172
68173# After AC_OUTPUT, we need to do final work
68174
68175
68176  # Try to move config.log (generated by autoconf) to the configure-support directory.
68177  if test -e ./config.log; then
68178    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68179  fi
68180
68181  # Rotate our log file (configure.log)
68182  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68183    $RM -f "$OUTPUT_ROOT/configure.log.old"
68184  fi
68185  if test -e "$OUTPUT_ROOT/configure.log"; then
68186    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68187  fi
68188
68189  # Move configure.log from current directory to the build output root
68190  if test -e ./configure.log; then
68191    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68192  fi
68193
68194  # Make the compare script executable
68195  $CHMOD +x $OUTPUT_ROOT/compare.sh
68196
68197
68198# Finally output some useful information to the user
68199
68200  # Finally output some useful information to the user
68201
68202  printf "\n"
68203  printf "====================================================\n"
68204  if test "x$no_create" != "xyes"; then
68205    if test "x$IS_RECONFIGURE" != "xyes"; then
68206      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68207    else
68208      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68209    fi
68210  else
68211    if test "x$IS_RECONFIGURE" != "xyes"; then
68212      printf "A configuration has been successfully checked but not created\n"
68213    else
68214      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68215    fi
68216  fi
68217  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68218    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68219  else
68220    printf "using default settings.\n"
68221  fi
68222
68223  printf "\n"
68224  printf "Configuration summary:\n"
68225  printf "* Debug level:    $DEBUG_LEVEL\n"
68226  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68227  printf "* JDK variant:    $JDK_VARIANT\n"
68228  printf "* JVM variants:   $JVM_VARIANTS\n"
68229  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68230  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68231
68232  printf "\n"
68233  printf "Tools summary:\n"
68234  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68235    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68236  fi
68237  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68238  if test "x$TOOLCHAIN_VERSION" != "x"; then
68239    print_version=" $TOOLCHAIN_VERSION"
68240  fi
68241  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68242  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68243  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68244
68245  printf "\n"
68246  printf "Build performance summary:\n"
68247  printf "* Cores to use:   $JOBS\n"
68248  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68249  if test "x$CCACHE_STATUS" != "x"; then
68250    printf "* ccache status:  $CCACHE_STATUS\n"
68251  fi
68252  printf "\n"
68253
68254  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68255    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68256    printf "will result in longer build times.\n"
68257    printf "\n"
68258  fi
68259
68260  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68261    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68262    printf "These are not respected, and will be ignored. It is recommended\n"
68263    printf "that you clean your environment. The following variables are set:\n"
68264    printf "$FOUND_ALT_VARIABLES\n"
68265    printf "\n"
68266  fi
68267
68268  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68269    printf "WARNING: Your build output directory is not on a local disk.\n"
68270    printf "This will severely degrade build performance!\n"
68271    printf "It is recommended that you create an output directory on a local disk,\n"
68272    printf "and run the configure script again from that directory.\n"
68273    printf "\n"
68274  fi
68275
68276  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68277    printf "WARNING: The result of this configuration has overridden an older\n"
68278    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68279    printf "proper build. Failure to do so might result in strange build problems.\n"
68280    printf "\n"
68281  fi
68282
68283  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68284    printf "WARNING: The result of this configuration was not saved.\n"
68285    printf "You should run without '--no-create | -n' to create the configuration.\n"
68286    printf "\n"
68287  fi
68288
68289
68290
68291  # Locate config.log.
68292  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68293    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68294  elif test -e "./config.log"; then
68295    CONFIG_LOG_PATH="."
68296  fi
68297
68298  if test -e "$CONFIG_LOG_PATH/config.log"; then
68299    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68300    if test $? -eq 0; then
68301      printf "The following warnings were produced. Repeated here for convenience:\n"
68302      # We must quote sed expression (using []) to stop m4 from eating the [].
68303      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68304      printf "\n"
68305    fi
68306  fi
68307
68308